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 1861b02a authored by cyattilakiss's avatar cyattilakiss Committed by GitHub

Use 3DS2 toggle configuration fix (#604)

The 3DS2 toggle setting is ignored since version 5.0.0 because of a
major change. Add the check back in the Request buildThreeDS2Data()
parent 0efb78c7
......@@ -62,8 +62,9 @@ class ThreeDS2DataBuilder implements BuilderInterface
/** @var \Magento\Payment\Gateway\Data\PaymentDataObject $paymentDataObject */
$paymentDataObject = \Magento\Payment\Gateway\Helper\SubjectReader::readPayment($buildSubject);
$payment = $paymentDataObject->getPayment();
$order = $paymentDataObject->getOrder();
$additionalInformation = $payment->getAdditionalInformation();
$request['body'] = $this->adyenRequestsHelper->buildThreeDS2Data([], $additionalInformation);
$request['body'] = $this->adyenRequestsHelper->buildThreeDS2Data([], $additionalInformation, $order->getStoreId());
return $request;
}
}
......@@ -298,12 +298,13 @@ class Requests extends AbstractHelper
/**
* @param array $request
* @param $payment
* @param $store
* @param $additionalData
* @param $storeId
* @return array
*/
public function buildThreeDS2Data($request = [], $additionalData)
public function buildThreeDS2Data($request = [], $additionalData, $storeId)
{
if ($this->adyenHelper->isCreditCardThreeDS2Enabled($storeId)) {
$request['additionalData']['allow3DS2'] = true;
$request['origin'] = $this->adyenHelper->getOrigin();
$request['channel'] = 'web';
......@@ -318,6 +319,12 @@ class Requests extends AbstractHelper
} else {
$request['browserInfo']['javaEnabled'] = false;
}
} else {
$request['additionalData']['allow3DS2'] = false;
$request['origin'] = $this->adyenHelper->getOrigin();
$request['channel'] = 'web';
}
return $request;
}
......
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