1. Go to this page and download the library: Download escapeboy/epay 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/ */
return [
'submit_url' => 'https://devep2.datamax.bg/ep2/epay2_demo/', // test submit url
// 'submit_url' => 'https://www.epay.bg/', // production submit url
'secret' => REQUIRED, // client secret
'client_id' => REQUIRED, // client id
'expire_days' => 1 // expire time for transations in days
'success_url' => 'epay/success', // return url for success
'cancel_url' => 'epay/cancel', // return url for cancel
];
echo \Epay::generateInputFields([
'invoice' => '000001', // invoice ID
'amount' => 100, // amount
'descr' => 'Some info about order' // info about order
]);