@infosoftas/s4-orders-js-sdk 0.0.1-beta1.4 → 0.0.1-beta1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/utils/order.helper.ts +1 -12
package/package.json
CHANGED
|
@@ -14,17 +14,6 @@ type AgreementModelType = {
|
|
|
14
14
|
accountId?: string;
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
const mapToSwedbankLanguage = (language: string) => {
|
|
18
|
-
const allowedLanguages = [ 'en-US', 'sv-SE', 'nb-NO', 'da-DK', 'fi-FI', 'en-GB', 'nn-NO', 'no-NO', 'se-NO' ];
|
|
19
|
-
if (allowedLanguages.includes(language)) {
|
|
20
|
-
return language;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
console.warn(`Language ${language} not supported.`);
|
|
24
|
-
|
|
25
|
-
return 'en-US'; // Default value for 'Swedbank'
|
|
26
|
-
};
|
|
27
|
-
|
|
28
17
|
export const prepareAgreementModel = ({
|
|
29
18
|
paymentMethod,
|
|
30
19
|
redirectUrl,
|
|
@@ -68,7 +57,7 @@ export const prepareAgreementModel = ({
|
|
|
68
57
|
model.swedbankPay = {
|
|
69
58
|
cancelUrl: `${cancelUrl}`,
|
|
70
59
|
completeUrl: `${confirmUrl}`,
|
|
71
|
-
language
|
|
60
|
+
language,
|
|
72
61
|
accountId,
|
|
73
62
|
};
|
|
74
63
|
|