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 5f489de5 authored by Rik ter Beek's avatar Rik ter Beek

#133 do not allow to change address details on the HPP page for all open invoice methods

parent dc9aa04b
......@@ -221,7 +221,9 @@ class Redirect extends \Magento\Payment\Block\Form
$recurringType = trim($this->_adyenHelper->getAdyenAbstractConfigData(
'recurring_type')
);
$brandCode = $this->_order->getPayment()->getAdditionalInformation("brand_code");
$brandCode = $this->_order->getPayment()->getAdditionalInformation(
\Adyen\Payment\Observer\AdyenHppDataAssignObserver::BRAND_CODE
);
// Paypal does not allow ONECLICK,RECURRING only RECURRING
if ($brandCode == "paypal" && $recurringType == 'ONECLICK,RECURRING') {
......@@ -270,13 +272,15 @@ class Redirect extends \Magento\Payment\Block\Form
$formFields['shopper.dateOfBirthYear'] = trim($this->_getDate($dob, 'Y'));
}
if ($this->_order->getPayment()->getAdditionalInformation(
\Adyen\Payment\Observer\AdyenHppDataAssignObserver::BRAND_CODE) == "klarna"
) {
// For klarna acceptPrivacyPolicy to skip HPP page
if ($brandCode == "klarna") {
// // needed for DE and AT
$formFields['klarna.acceptPrivacyPolicy'] = 'true';
}
// OpenInvoice don't allow to edit billing and delivery items
if ($this->_adyenHelper->isPaymentMethodOpenInvoiceMethod($brandCode)) {
// don't allow editable shipping/delivery address
$formFields['billingAddressType'] = "1";
$formFields['deliveryAddressType'] = "1";
......
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