2017 © Pedro Peláez
 

library payment-php-sdk

Skytech's Payment SDK for PHP

image

skytech/payment-php-sdk

Skytech's Payment SDK for PHP

  • Thursday, March 1, 2018
  • by Skytech
  • Repository
  • 1 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

codecov, (*1)

PHP Payment SDK

Install

Via Composer, (*2)

composer require skytech/payment-php-sdk

Usage

Purchase, (*3)

$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., (*4)

Testing

Security

If you discover any security related issues, please email sv@skytecrussia.com instead of using the issue tracker., (*5)

License

The MIT License (MIT). Please see License File for more information., (*6)

The Versions

23/10 2017

v0.2

0.2.0.0

Prototipe

  Sources   Download

proprietary

The Requires

 

The Development Requires

by Elena Arevkina
by Sergei Ivanov