From 9b5a82f5924c9fdc6a732d6bdde26b201a076d31 Mon Sep 17 00:00:00 2001 From: Ly Boubacar <59172284+Bbcar225@users.noreply.github.com> Date: Mon, 12 Sep 2022 10:59:59 +0000 Subject: [PATCH] Fixed bug : when token not equal a payement When token return not found payement; in return endpoint it's not present key status --- paydunya/checkout/checkout_invoice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paydunya/checkout/checkout_invoice.php b/paydunya/checkout/checkout_invoice.php index 05c1b4c..34db9d0 100644 --- a/paydunya/checkout/checkout_invoice.php +++ b/paydunya/checkout/checkout_invoice.php @@ -140,7 +140,7 @@ public function confirm($token="") { } $result = Paydunya_Utilities::httpGetRequest(Paydunya_Setup::getCheckoutConfirmUrl().$token); - if(count($result) > 0) { + if(count($result) > 0 && array_key_exists('status', $result)) { switch ($result['status']) { case 'completed': $this->status = $result['status'];