From caebcf8ca5eb91cf09cb3eca717f1ee29e8a36d6 Mon Sep 17 00:00:00 2001 From: kGablo Date: Tue, 10 Dec 2024 12:49:34 +0100 Subject: [PATCH] Refund validation fix --- Model/TpayPayment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Model/TpayPayment.php b/Model/TpayPayment.php index 42456bf..3b13933 100755 --- a/Model/TpayPayment.php +++ b/Model/TpayPayment.php @@ -267,7 +267,7 @@ public function refund(InfoInterface $payment, $amount) $refundResult = $refundService->makeRefund($payment, (float) $amount); try { - if ($refundResult) { + if ($refundResult['result'] === 'success' && $refundResult['status'] === 'correct') { $payment ->setTransactionId(Transaction::TYPE_REFUND) ->setParentTransactionId($payment->getParentTransactionId())