We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit 28656f7a authored by Alessio Zampatti's avatar Alessio Zampatti Committed by GitHub

PW-1887: fix for pms(afterpaytouch) with checkoutIssuerDirectLinkEnabled (#593)

* PW-1887: fix for pms(afterpaytouch) with checkoutIssuerDirectLinkEnabled

* remove unnecessary if

* fix variable

* refactor
parent 98723b54
......@@ -391,6 +391,18 @@ class Result extends \Magento\Framework\App\Action\Action
$request["details"] = $response;
if (!empty($this->_session->getLastRealOrder()) &&
!empty($this->_session->getLastRealOrder()->getPayment()) &&
!empty($this->_session->getLastRealOrder()->getPayment()->getAdditionalInformation("details"))
) {
$details = $this->_session->getLastRealOrder()->getPayment()->getAdditionalInformation("details");
$key = array_search('returnUrlQueryString', $details[0]);
if ($key !== false) {
$request["details"] = array("returnUrlQueryString" => http_build_query($response));
}
}
try {
$response = $service->paymentsDetails($request);
} catch(\Adyen\AdyenException $e) {
......
......@@ -184,6 +184,9 @@ class CheckoutResponseValidator extends AbstractValidator
// Flag to show we are in the checkoutAPM flow
$payment->setAdditionalInformation('checkoutAPM', true);
if (!empty($response['details'])) {
$payment->setAdditionalInformation('details', $response['details']);
}
if ($redirectUrl && $paymentData && $redirectMethod) {
$payment->setAdditionalInformation('redirectUrl', $redirectUrl);
$payment->setAdditionalInformation('redirectMethod', $redirectMethod);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment