1. Go to this page and download the library: Download obanach/zen-php-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use Zen\ZenClient;
$client = new ZenClient('PAYWALL_SECRET', 'IPN_SECRET', 'TERMINAL_UUID');
// raw json data received from IPN
$json = '{"merchantTransactionId":"myCustomTransactionId","amount":"10.00","currency":"EUR","status":"PAID","hash":"5CD4255C8BEE2A45ADF57DA13CADCA406FF4C5D2A1046E5EF719890A8FB09807"}'
$validate = $client->validateIpn($json);
if ($validate->getStatus()) {
// validate on your own if currency and amount are correct
$validate->getMerchantTransactionId();
$validate->getCurrency();
$validate->getAmount();
$validate->getPaymentStatus();
} else {
// handle error
$validate->getMessage();
}
bash
composer
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.