diff --git a/upload/catalog/controller/extension/payment/paynl_ideal.php b/upload/catalog/controller/extension/payment/paynl_ideal.php index d61a177..9d68301 100644 --- a/upload/catalog/controller/extension/payment/paynl_ideal.php +++ b/upload/catalog/controller/extension/payment/paynl_ideal.php @@ -87,12 +87,11 @@ public function exchangeFastCheckout() $apiInfo->setApiToken($apiToken); $apiInfo->setServiceId($serviceId); $apiInfo->setTransactionId($transactionId); - $apiInfo->doRequest(); + $infoResult = $apiInfo->doRequest(); + $status = Pay_Helper::getStatus($infoResult['paymentDetails']['state']); } catch (\Exception $e) { die('FALSE| Error fetching transaction. ' . $e->getMessage()); - } - - $status = Pay_Helper::getStatus($webhookData['object']['status']['code']); + } $this->load->model('extension/payment/' . $this->_paymentMethodName); $modelName = 'model_extension_payment_' . $this->_paymentMethodName; diff --git a/upload/catalog/controller/extension/payment/paynl_paypal.php b/upload/catalog/controller/extension/payment/paynl_paypal.php index c7e47fa..3443870 100755 --- a/upload/catalog/controller/extension/payment/paynl_paypal.php +++ b/upload/catalog/controller/extension/payment/paynl_paypal.php @@ -154,15 +154,16 @@ public function exchangeFastCheckout() { $serviceId = $this->model_setting_setting->getSettingValue('payment_paynl_general_serviceid'); $transactionId = $webhookData['object']['orderId']; - try { + try { $apiInfo = new Pay_Api_Info(); $apiInfo->setApiToken($apiToken); $apiInfo->setServiceId($serviceId); $apiInfo->setTransactionId($transactionId); - $apiInfo->doRequest(); + $infoResult = $apiInfo->doRequest(); + $status = Pay_Helper::getStatus($infoResult['paymentDetails']['state']); } catch (\Exception $e) { - die('FALSE| Error fetching transaction. ' . $e->getMessage()); - } + die('FALSE| Error fetching transaction. ' . $e->getMessage()); + } $accessToken = $this->getAccessToken(); $paypalOrderDetails = $this->getOrderDetails($orderId, $accessToken); @@ -188,8 +189,6 @@ public function exchangeFastCheckout() { $order_id = $webhookData['object']['reference']; - $status = Pay_Helper::getStatus($webhookData['object']['status']['code']); - $this->load->model('extension/payment/' . $this->_paymentMethodName); $modelName = 'model_extension_payment_' . $this->_paymentMethodName;