For accessing AltaPay payment gateway through the API
composer require altapay/api-php
For doing a capture
the following can be used
$auth = new \Altapay\Authentication('username', 'password' , 'myshop.gateway.com');
$api = new \Altapay\Api\Payments\CaptureReservation($auth);
$api->setTransactionId('transaction id');
// Or you can use a transaction object you got from a previous API call
// $api->setTransaction($transactionObject);
try {
$response = $api->call();
// If everything went perfect, you will get a \Altapay\Api\Document\Capture in the response
} catch (\Altapay\Api\Exceptions\ClientException $e) {
// If anything went wrong, you will get a exception where you can see the raw request and the raw response
}
The AltaPay API PHP requires PHP 5.6.0 or greater with the following extensions installed:
- date
- filter
- mbstring
- pcre
- Reflection
- SimpleXML
- spl
See Changelog for all the release notes.
Distributed under the MIT License. See LICENSE for more information.
For more details please see documentation