1. Go to this page and download the library: Download asdh/imepay 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 Asdh\ImePay\ImePay;
$imepay = new ImePay();
// refId can be any unique id or the order id through which you can get all the details of the order/product that the user is buying
$refId = Str::uuid();
$amount = 100;
$response = $imepay->getToken($refId, $amount);
$token = $response->tokenId();
use Asdh\ImePay\ImePay;
$imepay = new ImePay();
$response = $imepay->verify($request->all());
if ($response->isVerified()) {
// do your stuffs...
}
$response->responseCode();
$response->responseDescription();
$response->refId();
$response->msisdn(); // phone number of paying user
$response->tokenId();
$response->transactionId();