skytech / payment-php-sdk
Skytech's Payment SDK for PHP
1.0.2
2018-03-01 13:55 UTC
Requires
- php: >=5.6|>=7.0
- guzzlehttp/guzzle: ~5.1
- league/iso3166: ^2.0
- matriphe/iso-639: ^1.2
- monolog/monolog: ^1.23
- respect/validation: 1.1.14
- sabre/xml: ^1.5
Requires (Dev)
- codeception/codeception: 2.3.6
- consolidation/robo: ^1.0.0
- dealerdirect/phpcodesniffer-composer-installer: ^0.4.4
- phploc/phploc: ^4.0
- phpmd/phpmd: ^2.6
- sebastian/phpdcd: ^1.0
- squizlabs/php_codesniffer: ^3.1
- symfony/process: ^3.3.0
- wimg/php-compatibility: *
This package is not auto-updated.
Last update: 2025-03-30 07:41:12 UTC
README
PHP Payment SDK
Install
Via Composer
composer require skytech/payment-php-sdk
Usage
Purchase
$order = new \Skytech\Sdk\Order(); $order->setAmount(100); $order->setCurrency(643); //Russian rubles. ISO 4217 numeric-3 $order->setDescription("Test description"); $merchant = new \Skytech\Sdk\Merchant(); $merchant->setLanguage('RU'); // ISO 639-1 $merchant->setMerchantId("ES000000"); $merchant->setApproveUrl($approveUrl); $merchant->setCancelUrl($cancelUrl); $merchant->setDeclineUrl($declineUrl); $address = new \Skytech\Sdk\Customer\Address(); $address->setCountry(643); // ISO 3166-1 numeric $address->setRegion("Moscow"); $address->setCity("Moscow"); $address->setAddressline("evergreen street"); $address->setZip("123123"); $customer = new \Skytech\Sdk\Customer($address); $customer->setEmail($email); $customer->setPhone($phone); $customer->setIp($clientIp); $connector = new \Skytech\Sdk\Connector(); $connector->setCert('C:\Payment_php_sdk\test.pem', ''); // Path to the client certificate $payment = new \Skytech\Sdk\Payment($order, $merchant, $customer, $connector); try { $response = $payment->purchase(); } catch (Exception $e) { echo $e->getMessage(); } $url = $response->getPaymentUrl(); // Redirect client to payment page by this url header('Location: ' . $url);
Changelog
Please see CHANGELOG for more information on what has changed recently.
Testing
Security
If you discover any security related issues, please email sv@skytecrussia.com instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.