atlantpayments / paymentpage-sdk
There is no license information available for the latest version (v1.0.0) of this package.
Atlant payments SDK
v1.0.0
2021-09-15 08:39 UTC
Requires (Dev)
- phpunit/phpunit: ^6.5||^7.2
- squizlabs/php_codesniffer: ^3.3
This package is auto-updated.
Last update: 2025-06-15 22:31:11 UTC
README
This is a set of libraries in the PHP language to ease integration of your service with the Atlant payments Payment Page.
Please note that for correct SDK operating you must have at least PHP 7.0.
Payment flow
Installation
Install with composer
composer require atlantpayments/paymentpage-sdk
Get URL for payment
$gate = new atlantpayments\Gate('secret'); $payment = new atlantpayments\Payment('11', 'some payment id'); $payment->setPaymentAmount(1000)->setPaymentCurrency('RUB'); $url = $gate->getPurchasePaymentPageUrl($payment);
$url
here is the signed URL.
If you want to use another domain for URL you can change it with optional Gate
constructor parameter:
new atlantpayments\Gate('secret', 'https://mydomain.com/payment');
or change it with method
$gate->setPaymentBaseUrl('https://mydomain.com/payment');
Handle callback from Atlant payments
You'll need to autoload this code in order to handle notifications:
$gate = new atlantpayments\Gate('secret'); $callback = $gate->handleCallback($data);
$data
is the JSON data received from payment system;
$callback
is the Callback object describing properties received from payment system;
$callback
implements these methods:
Callback::getPaymentStatus();
Get payment status.Callback::getPayment();
Get all payment data.Callback::getPaymentId();
Get payment ID in your system.
TODO
- Payment Page opening
- Notifications handling
- Direct Gate requests
- PHPDoc