We will work on Apr 26th (Saturday) and will be off from Apr 30th (Wednesday) until May 2nd (Friday) for public holiday 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 ...@@ -391,6 +391,18 @@ class Result extends \Magento\Framework\App\Action\Action
$request["details"] = $response; $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 { try {
$response = $service->paymentsDetails($request); $response = $service->paymentsDetails($request);
} catch(\Adyen\AdyenException $e) { } catch(\Adyen\AdyenException $e) {
......
...@@ -184,6 +184,9 @@ class CheckoutResponseValidator extends AbstractValidator ...@@ -184,6 +184,9 @@ class CheckoutResponseValidator extends AbstractValidator
// Flag to show we are in the checkoutAPM flow // Flag to show we are in the checkoutAPM flow
$payment->setAdditionalInformation('checkoutAPM', true); $payment->setAdditionalInformation('checkoutAPM', true);
if (!empty($response['details'])) {
$payment->setAdditionalInformation('details', $response['details']);
}
if ($redirectUrl && $paymentData && $redirectMethod) { if ($redirectUrl && $paymentData && $redirectMethod) {
$payment->setAdditionalInformation('redirectUrl', $redirectUrl); $payment->setAdditionalInformation('redirectUrl', $redirectUrl);
$payment->setAdditionalInformation('redirectMethod', $redirectMethod); $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