1. Go to this page and download the library: Download nordsoftware/paytrail-php 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/ */
$client = new Client('13466', '6pKF4jkv97zmqBJ3ZL8gUw5DfT2NMQ');
$client->connect();
if ($client->validateChecksum($_GET["RETURN_AUTHCODE"], $_GET["ORDER_NUMBER"], $_GET["TIMESTAMP"], $_GET["PAID"], $_GET["METHOD"])) {
// Payment receipt is valid
// If needed, the used payment method can be found from the variable $_GET["METHOD"]
// and order number for the payment from the variable $_GET["ORDER_NUMBER"]
}
else {
// Payment receipt was not valid, possible payment fraud attempt
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.