@everymatrix/cashier-methods-list 1.43.2 → 1.43.3
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everymatrix/cashier-methods-list",
|
|
3
|
-
"version": "1.43.
|
|
3
|
+
"version": "1.43.3",
|
|
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": "4723f5370b2d6fc913a8cf6770f9f492038e54e8"
|
|
39
39
|
}
|
|
@@ -21,12 +21,9 @@
|
|
|
21
21
|
export let clientstylingurl: string = '';
|
|
22
22
|
export let ismobileview: string
|
|
23
23
|
|
|
24
|
-
let paymethnames = [];
|
|
25
|
-
let logoSrc = '';
|
|
26
|
-
let limitString = '';
|
|
27
24
|
let paymentMethods: PaymentMethod[] = [];
|
|
28
25
|
let isTranslationLoaded = false;
|
|
29
|
-
let displayNone:boolean = false;
|
|
26
|
+
let displayNone: boolean = false;
|
|
30
27
|
let customStylingContainer:HTMLElement;
|
|
31
28
|
let selectedPaymentMethod: string;
|
|
32
29
|
let methodsButtonToggleText: string = '';
|
|
@@ -36,7 +33,7 @@
|
|
|
36
33
|
let errorMessage = '';
|
|
37
34
|
let errorResponseCode: string;
|
|
38
35
|
let desktopView: boolean = true;
|
|
39
|
-
let showSpinner: boolean =
|
|
36
|
+
let showSpinner: boolean = false;
|
|
40
37
|
|
|
41
38
|
enum ResponseCode {
|
|
42
39
|
PlayerSessionIsNotValid = 'PlayerSessionIsNotValid',
|
|
@@ -48,9 +45,11 @@
|
|
|
48
45
|
$: lang && setActiveLanguage();
|
|
49
46
|
$: clientstyling && customStylingContainer && setClientStyling();
|
|
50
47
|
$: clientstylingurl && customStylingContainer && setClientStylingURL();
|
|
51
|
-
$: ismobileview && setDevice()
|
|
48
|
+
$: ismobileview && setDevice();
|
|
49
|
+
$: lang && translationurl && setTranslationUrl();
|
|
52
50
|
|
|
53
51
|
const dispatch = createEventDispatcher();
|
|
52
|
+
|
|
54
53
|
const setTranslationUrl = () => {
|
|
55
54
|
let url:string = translationurl;
|
|
56
55
|
if (url) {
|
|
@@ -76,6 +75,7 @@
|
|
|
76
75
|
}
|
|
77
76
|
|
|
78
77
|
const getMetaData = () => {
|
|
78
|
+
showSpinner = true;
|
|
79
79
|
const url:URL = new URL(`${endpoint}/v1/player/${customerid}/payment/GetPaymentMetadata`);
|
|
80
80
|
const headers = new Headers();
|
|
81
81
|
headers.append("accept", "application/json");
|
|
@@ -94,19 +94,6 @@
|
|
|
94
94
|
errorMessage = data.error;
|
|
95
95
|
return;
|
|
96
96
|
}
|
|
97
|
-
|
|
98
|
-
if (data.ResponseCode === ResponseCode.PlayerSessionIsNotValid) {
|
|
99
|
-
errorResponseCode = data.ResponseCode;
|
|
100
|
-
setErrorResponseCode();
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
if (data.ResponseCode === ResponseCode.JwtTokenError) {
|
|
105
|
-
errorResponseCode = data.ResponseCode;
|
|
106
|
-
setErrorResponseCode();
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
97
|
if (data.ResponseCode !== ResponseCode.Success) {
|
|
111
98
|
errorResponseCode = data.ResponseCode;
|
|
112
99
|
setErrorResponseCode();
|
|
@@ -118,6 +105,7 @@
|
|
|
118
105
|
window.postMessage({ type: 'StartSessionCountdown', paymentMethodName: paymentMethods[0].Name, xPaymentSessionToken: data.XPaymentSessionToken }, window.location.href);
|
|
119
106
|
}).finally(() => showSpinner = false)
|
|
120
107
|
}
|
|
108
|
+
|
|
121
109
|
const payMethOrderedList = (data: any) => {
|
|
122
110
|
const payMeths = [];
|
|
123
111
|
data.PaymentMethods.Ordering.DefaultPaymentMethodsOrder.forEach(Name => {
|
|
@@ -155,6 +143,7 @@
|
|
|
155
143
|
const showAllMethodsToggle = () => {
|
|
156
144
|
paymentMethodsToShow == paymentMethods ? showLessMethods() : showAllMethods()
|
|
157
145
|
}
|
|
146
|
+
|
|
158
147
|
const showAllMethods = () => {
|
|
159
148
|
paymentMethodsToShow = paymentMethods;
|
|
160
149
|
methodsButtonToggleText = $_('showLess');
|