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 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') {
......@@ -269,14 +271,16 @@ class Redirect extends \Magento\Payment\Block\Form
$formFields['shopper.dateOfBirthMonth'] = trim($this->_getDate($dob, 'm'));
$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