1. Go to this page and download the library: Download deepay/deepay-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/ */
deepay / deepay-php example snippets
use DeePay\DeePay;
$deepay = new DeePay('Merchant ID', 'Api Key');
$order = $deepay->checkoutOrder('20181121113652525198');
// or use out_trade_id
$order = $deepay->checkoutOrder('E113652525198');
var_dump($order->toArray());
$order = $_POST;
if ($deepay->checkSign($order) {
if ($order['status'] == 'confirmed') {
// process the order according to status
}
// echo 'ok' when you finish the job
exit('ok');
} else {
echo 'Notifycation is invalid';
}