diff --git a/Gateway/Response/PaymentPosCloudHandler.php b/Gateway/Response/PaymentPosCloudHandler.php index a519c9986..dc51d5432 100644 --- a/Gateway/Response/PaymentPosCloudHandler.php +++ b/Gateway/Response/PaymentPosCloudHandler.php @@ -69,6 +69,10 @@ public function handle(array $handlingSubject, array $paymentResponse) // do not send order confirmation mail $payment->getOrder()->setCanSendNewEmailFlag(false); + if (!empty($paymentResponse) && isset($paymentResponse['Response']['Result'])) { + $payment->setAdditionalInformation('resultCode', $paymentResponse['Response']['Result']); + } + if (!empty($paymentResponse['Response']['AdditionalResponse']) ) { $pairs = \explode('&', $paymentResponse['Response']['AdditionalResponse']); diff --git a/Helper/PaymentResponseHandler.php b/Helper/PaymentResponseHandler.php index 9f2c5b3b2..8d3075791 100644 --- a/Helper/PaymentResponseHandler.php +++ b/Helper/PaymentResponseHandler.php @@ -38,6 +38,7 @@ class PaymentResponseHandler const CANCELLED = 'Cancelled'; const ADYEN_TOKENIZATION = 'Adyen Tokenization'; const VAULT = 'Magento Vault'; + const POS_SUCCESS = 'Success'; /** * @var AdyenLogger @@ -118,6 +119,7 @@ public function formatPaymentResponse($resultCode, $action = null, $additionalDa case self::AUTHORISED: case self::REFUSED: case self::ERROR: + case self::POS_SUCCESS: return [ "isFinal" => true, "resultCode" => $resultCode,