@everymatrix/cashier-methods-list 1.43.0 → 1.43.2
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/CHANGELOG.md +1 -0
- package/dist/cashier-methods-list.js +101 -100
- package/dist/cashier-methods-list.js.map +1 -1
- package/package.json +2 -2
- package/src/CashierMethodsList.svelte +16 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everymatrix/cashier-methods-list",
|
|
3
|
-
"version": "1.43.
|
|
3
|
+
"version": "1.43.2",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"svelte": "src/index.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "0477411e57fe6c3eda8ff28059aa540dcada8ae0"
|
|
39
39
|
}
|
|
@@ -4,19 +4,22 @@
|
|
|
4
4
|
import { TRANSLATIONS } from './translations';
|
|
5
5
|
import type { PaymentMethod } from './CashierMethodItem.types';
|
|
6
6
|
import {createEventDispatcher, onMount} from "svelte";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export let
|
|
7
|
+
import dayjs from 'dayjs';
|
|
8
|
+
import utc from 'dayjs/plugin/utc';
|
|
9
|
+
dayjs.extend(utc);
|
|
10
|
+
|
|
11
|
+
export let lang: string = 'en';
|
|
12
|
+
export let local: string = 'en-US';
|
|
13
|
+
export let endpoint: string;
|
|
14
|
+
export let session: string;
|
|
12
15
|
export let customerid: string;
|
|
13
16
|
export let assetsurl: string;
|
|
14
17
|
export let currency: string;
|
|
15
18
|
export let numberofmethodsshown: string;
|
|
16
|
-
export let translationurl:string='';
|
|
17
|
-
export let clientstyling:string = '';
|
|
18
|
-
export let clientstylingurl:string = '';
|
|
19
|
-
export let ismobileview:string
|
|
19
|
+
export let translationurl: string='';
|
|
20
|
+
export let clientstyling: string = '';
|
|
21
|
+
export let clientstylingurl: string = '';
|
|
22
|
+
export let ismobileview: string
|
|
20
23
|
|
|
21
24
|
let paymethnames = [];
|
|
22
25
|
let logoSrc = '';
|
|
@@ -77,6 +80,7 @@
|
|
|
77
80
|
const headers = new Headers();
|
|
78
81
|
headers.append("accept", "application/json");
|
|
79
82
|
headers.append("Content-Type", "application/json");
|
|
83
|
+
headers.append("X-Client-Request-Timestamp", dayjs.utc().format("YYYY-MM-DD HH:mm:ss.SSS"));
|
|
80
84
|
const requestParams:RequestInit = {
|
|
81
85
|
method: "POST",
|
|
82
86
|
headers: headers,
|
|
@@ -96,7 +100,7 @@
|
|
|
96
100
|
setErrorResponseCode();
|
|
97
101
|
return;
|
|
98
102
|
}
|
|
99
|
-
|
|
103
|
+
|
|
100
104
|
if (data.ResponseCode === ResponseCode.JwtTokenError) {
|
|
101
105
|
errorResponseCode = data.ResponseCode;
|
|
102
106
|
setErrorResponseCode();
|
|
@@ -111,7 +115,7 @@
|
|
|
111
115
|
paymentMethods = data.PaymentMethods?.Ordering ? payMethOrderedList(data) : payMethUnorderedList(data);
|
|
112
116
|
methodsButtonToggleText = (numberofmethodsshown && +numberofmethodsshown > 0 && paymentMethods.length > +numberofmethodsshown) ? $_('showAll') : '';
|
|
113
117
|
paymentMethodsToShow = methodsButtonToggleText ? paymentMethods.slice(0, +numberofmethodsshown) : paymentMethods;
|
|
114
|
-
window.postMessage({ type: 'StartSessionCountdown', paymentMethodName: paymentMethods[0].Name, xPaymentSessionToken:
|
|
118
|
+
window.postMessage({ type: 'StartSessionCountdown', paymentMethodName: paymentMethods[0].Name, xPaymentSessionToken: data.XPaymentSessionToken }, window.location.href);
|
|
115
119
|
}).finally(() => showSpinner = false)
|
|
116
120
|
}
|
|
117
121
|
const payMethOrderedList = (data: any) => {
|
|
@@ -315,7 +319,7 @@
|
|
|
315
319
|
.MethodTitle {
|
|
316
320
|
color: var(--mmw--color-grey-10, #111);
|
|
317
321
|
font-size: var(--emw--font-size-small, 14px);
|
|
318
|
-
word-break: break-all;
|
|
322
|
+
word-break: break-all;
|
|
319
323
|
}
|
|
320
324
|
|
|
321
325
|
.MethodLimits {
|