PHP code example of wucdbm / epay
1. Go to this page and download the library: Download wucdbm/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/ */
wucdbm / epay example snippets
$id = $payment->getId();
$amount = $payment->getAmount();
$description = 'Payment #' . $payment->getId();
$expiry = $payment->getExpiryDate();
try {
$response = $this->client->getEasyPayIdn($id, $amount, $description, $expiry);
$idn = $response->getIdn();
// display idn to the user, do some logging.
// the response body is available at $response->getBody();
return $idn;
} catch (\Wucdbm\Component\Epay\Exception\EasyPayGetIdnError $ex) {
$this->logEasyPayRequest($payment, $ex->getBody(), true);
throw $ex;
}