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 9fdbf163 authored by Rik ter Beek's avatar Rik ter Beek Committed by GitHub

Merge pull request #134 from Adyen/develop-rik

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