A php library to use the Saferpay Json API.
Add the library in your composer.json:
composer require ticketpark/saferpay-json-api
In order to perform a payment as you would typically do it in an online shop, you need to handle the following steps:
- Initialize the payment page (see /example/PaymentPage/example-initialize.php)
- Redirect the user to the payment page and let them enter their payment data
- Assert that the payment was successfully done (see /example/PaymentPage/example-assert.php)
- Capture the payment to make it final (see /example/Transaction/example-capture.php)
Have a look at the example folder for more.
Find the most current documentation of the Saferpay JSON API here:
https://saferpay.github.io/jsonapi/
This library is currently based on v1.18 of the Saferpay JSON API.
You are welcome to contribute to this repo.
- v3.1 bases on v1.18 of the Saferpay JSON API
- v3 added more major refactoring and based v1.17 of Saferpay API
- v2.3 added support for PHP 7.4
- v2 added type-hints with major refactoring and required PHP 7.3
- v1 was the initial version of this library based on PHP 5.6 and the Saferpay API v1.2