Skip to content

Commit a00ab5c

Browse files
committed
[fix] Add logic to avoid duplication of payment verification
1 parent d17a1e2 commit a00ab5c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

modules/gateways/callback/paystack.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,16 @@
163163
*/
164164
$invoiceId = checkCbInvoiceID($invoiceId, $gatewayModuleName);
165165

166+
/**
167+
* Check Callback Transaction ID.
168+
*
169+
* Performs a check for any existing transactions with the same given
170+
* transaction number.
171+
*
172+
* Performs a die upon encountering a duplicate.
173+
*/
174+
checkCbTransID($trxref);
175+
166176
$amount = floatval($txStatus->amount)/100;
167177
if ($gatewayParams['convertto']) {
168178
$result = select_query("tblclients", "tblinvoices.invoicenum,tblclients.currency,tblcurrencies.code", array("tblinvoices.id" => $invoiceId), "", "", "", "tblinvoices ON tblinvoices.userid=tblclients.id INNER JOIN tblcurrencies ON tblcurrencies.id=tblclients.currency");

0 commit comments

Comments
 (0)