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 1617a20d authored by basm's avatar basm

PW-304 Inserted Personal number for Nordic countries

parent 0e3c72ec
...@@ -285,7 +285,7 @@ class Redirect extends \Magento\Payment\Block\Form ...@@ -285,7 +285,7 @@ class Redirect extends \Magento\Payment\Block\Form
if ($brandCode == "klarna") { if ($brandCode == "klarna") {
$ssn = $this->_order->getPayment()->getAdditionalInformation('ssn'); $ssn = $this->_order->getPayment()->getAdditionalInformation('ssn');
if (!empty($ssn)) { if (!empty($ssn)) {
$formFields['shopper.socialSecurityNumber'] = $this->_order->getPayment()->getAdditionalInformation('ssn'); $formFields['shopper.socialSecurityNumber'] = $ssn;
} }
// // needed for DE and AT // // needed for DE and AT
$formFields['klarna.acceptPrivacyPolicy'] = 'true'; $formFields['klarna.acceptPrivacyPolicy'] = 'true';
......
...@@ -140,11 +140,13 @@ define( ...@@ -140,11 +140,13 @@ define(
result.isPaymentMethodOpenInvoiceMethod = function () { result.isPaymentMethodOpenInvoiceMethod = function () {
return value.isPaymentMethodOpenInvoiceMethod; return value.isPaymentMethodOpenInvoiceMethod;
} }
result.getSsnFormat = function(){ result.getSsnLength = function(){
if (quote.billingAddress().countryId == "NO") { if (quote.billingAddress().countryId == "NO") {
//5 digits for Norway
return 5; return 5;
} }
else { else {
//4 digits for other Nordic countries
return 4; return 4;
} }
} }
......
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
title: $t('Social Security Number'), title: $t('Social Security Number'),
'data-container': getCode() + '-ssn', 'data-container': getCode() + '-ssn',
'data-validate': JSON.stringify({'required-number':true }), 'data-validate': JSON.stringify({'required-number':true }),
maxlength : getSsnFormat() maxlength : getSsnLength()
}, },
value: ssn" value: ssn"
/> />
......
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