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