This class can generate RRR, check transaction status either using RRR or transaction id. It can also save RRR details into the database and update them accordingly.
A dedicated page listens to payments
You can set a cron job to also fetch payment status and update them equally.
use ezeasorekene\NGPaymentGateway\RemitaPayments;
$demo = new RemitaPayments("DEMO");
$live = new RemitaPayments("LIVE",$merchantId,$apiKey,$serviceTypeId);
$demo->setAmount(20000);
$live->setAmount(20000);
$parameters =
array
(
'serviceTypeId' => $this->serviceTypeId,
'amount' => $this->amount,
'orderId' => $this->transaction_id,
'payerName' => $payerName,
'payerEmail' => $payerEmail,
'payerPhone' => $payerPhone,
'description' => $paymentDescription
);
$rrr = $demo->generateRRR($parameters)
$rrr = $live->generateRRR($parameters)
RRR | false
$status = $demo->checkRRRStatus($rrr)
$status = $live->checkRRRStatus($rrr)
true | false
Check out different examples here
You can read more about the class here
Copyright (c) 2021, Ekene Ezeasor