@everymatrix/cashier-page 1.44.0 → 1.45.0
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/components/CashierConfirmModal-BzlPDqCa.cjs +4 -0
- package/components/CashierConfirmModal-DUs77Z87.js +1071 -0
- package/components/CashierError-B6P10jDb.js +3758 -0
- package/components/CashierError-CPdkGqU9.cjs +5 -0
- package/components/CashierHeader-WPbfJpfK.cjs +1 -0
- package/components/CashierHeader-sNXvMDOE.js +361 -0
- package/components/CashierIframeRedirect-D-wtyZlJ.js +384 -0
- package/components/CashierIframeRedirect-D51bquYH.cjs +1 -0
- package/components/CashierMethodDetails-BMH-N9d_.js +8096 -0
- package/components/CashierMethodDetails-BRk_7FCh.cjs +18 -0
- package/components/CashierMethodsList-BzKakG_f.cjs +1 -0
- package/components/CashierMethodsList-C2cZyeSz.js +652 -0
- package/components/CashierModal-34pFwTKh.cjs +1 -0
- package/components/CashierModal-CSXMOh9Q.js +225 -0
- package/components/CashierNotifications-Bb_aXGZ9.cjs +1 -0
- package/components/CashierNotifications-CHJocFp_.js +136 -0
- package/components/CashierPage-CReuHHpH.js +1959 -0
- package/components/CashierPage-DMz34mKD.cjs +1 -0
- package/components/CashierReceiptPage-Bx1bgMaF.cjs +1 -0
- package/components/CashierReceiptPage-CCmpwoHS.js +1093 -0
- package/components/CashierSessionExpirationModal-CTAwPOlx.js +1116 -0
- package/components/CashierSessionExpirationModal-DgofnoWR.cjs +2 -0
- package/components/CashierSpinner---P14FXy.cjs +1 -0
- package/components/CashierSpinner-w2LALF8s.js +71 -0
- package/components/CashierVerifications-DR2HJAoY.js +496 -0
- package/components/CashierVerifications-T_tbaHJ5.cjs +1 -0
- package/es2015/cashier-page.cjs +1 -0
- package/es2015/cashier-page.js +16 -0
- package/package.json +23 -32
- package/CHANGELOG.md +0 -22
- package/README.md +0 -30
- package/dist/cashier-page.js +0 -1346
- package/dist/cashier-page.js.map +0 -1
- package/index.html +0 -37
- package/index.js +0 -1
- package/public/favicon.png +0 -0
- package/public/reset.css +0 -48
- package/rollup.config.js +0 -65
- package/src/CashierPage.svelte +0 -669
- package/src/CashierPage.types.ts +0 -81
- package/src/assets/maintenance.png +0 -0
- package/src/assets/session-expired-icon.png +0 -0
- package/src/i18n.js +0 -33
- package/src/index.ts +0 -4
- package/src/translations.js +0 -73
- package/stories/CashierPage.stories.js +0 -13
- package/tsconfig.json +0 -6
package/src/CashierPage.svelte
DELETED
|
@@ -1,669 +0,0 @@
|
|
|
1
|
-
<svelte:options tag={null} />
|
|
2
|
-
<script lang="ts">
|
|
3
|
-
import {onMount} from "svelte";
|
|
4
|
-
import { _, addNewMessages, setLocale, setupI18n } from './i18n';
|
|
5
|
-
import {TRANSLATIONS} from './translations';
|
|
6
|
-
|
|
7
|
-
import type {PaymentMethod} from "./CashierPage.types";
|
|
8
|
-
import {TxnChannel, TxnType, ResponseCode} from "./CashierPage.types";
|
|
9
|
-
import errorSessionImage from './assets/session-expired-icon.png';
|
|
10
|
-
import maintenanceImage from './assets/maintenance.png';
|
|
11
|
-
|
|
12
|
-
import '@everymatrix/cashier-header';
|
|
13
|
-
import '@everymatrix/cashier-spinner';
|
|
14
|
-
import '@everymatrix/cashier-verifications';
|
|
15
|
-
import '@everymatrix/cashier-methods-list';
|
|
16
|
-
import '@everymatrix/cashier-method-details';
|
|
17
|
-
import '@everymatrix/cashier-error';
|
|
18
|
-
import '@everymatrix/cashier-modal';
|
|
19
|
-
import '@everymatrix/cashier-confirm-modal';
|
|
20
|
-
import '@everymatrix/cashier-iframe-redirect';
|
|
21
|
-
import '@everymatrix/cashier-session-expiration-modal';
|
|
22
|
-
import dayjs from 'dayjs';
|
|
23
|
-
import utc from 'dayjs/plugin/utc';
|
|
24
|
-
dayjs.extend(utc);
|
|
25
|
-
|
|
26
|
-
enum RedirectionModeStringEnum {
|
|
27
|
-
Default = 'Default',
|
|
28
|
-
RedirectWithRetry = 'Redirect'
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const mapReducer = (arr, [keys, val]) => [
|
|
32
|
-
...arr,
|
|
33
|
-
...(Array.isArray(keys) ? [...keys.map(key => [key, val])] : [[keys, val]]
|
|
34
|
-
)
|
|
35
|
-
];
|
|
36
|
-
const redirectModeMap = new Map([
|
|
37
|
-
[['Default', 0], RedirectionModeStringEnum.Default],
|
|
38
|
-
[['Redirect', 1], RedirectionModeStringEnum.RedirectWithRetry]
|
|
39
|
-
].reduce(mapReducer, []));
|
|
40
|
-
|
|
41
|
-
export let endpoint: string;
|
|
42
|
-
export let session: string;
|
|
43
|
-
export let lang: string = 'en';
|
|
44
|
-
export let local: string = 'en-US';
|
|
45
|
-
export let translationurl: string;
|
|
46
|
-
export let successurl: string;
|
|
47
|
-
export let failurl: string;
|
|
48
|
-
export let cancelurl: string;
|
|
49
|
-
export let customerid: string;
|
|
50
|
-
export let currency: string;
|
|
51
|
-
export let amount: number;
|
|
52
|
-
export let assetsurl: string;
|
|
53
|
-
export let type: string = TxnType.Deposit;
|
|
54
|
-
export let channel: string = TxnChannel.Desktop;
|
|
55
|
-
export let showheader: string = 'true';
|
|
56
|
-
export let numberofmethodsshown: string;
|
|
57
|
-
export let clientstyling: string = '';
|
|
58
|
-
export let clientstylingurl: string = '';
|
|
59
|
-
export let showsessionexpirationmodal: string = 'true';
|
|
60
|
-
export let showverifications: string = 'true';
|
|
61
|
-
|
|
62
|
-
let xPlayerSessionId: string;
|
|
63
|
-
let xPaymentSessionToken: string;
|
|
64
|
-
let xConfirmSessionToken: string;
|
|
65
|
-
let selectedPaymentMethod: PaymentMethod = {} as PaymentMethod;
|
|
66
|
-
let formatter = new Intl.NumberFormat(local, {minimumFractionDigits: 2 });
|
|
67
|
-
let displayNone:boolean = false;
|
|
68
|
-
let customStylingContainer:HTMLElement;
|
|
69
|
-
let widgetWidth: number;
|
|
70
|
-
let mobileView: string;
|
|
71
|
-
let showConfirmModal:boolean = false;
|
|
72
|
-
let redirectUrl: string;
|
|
73
|
-
let windowRedirect: Window;
|
|
74
|
-
let showRedirectNotification: boolean;
|
|
75
|
-
let showRetryNotification: boolean;
|
|
76
|
-
let isProcessingTxn: boolean;
|
|
77
|
-
let isTranslationLoaded: boolean;
|
|
78
|
-
let showMethodDetailsPage: boolean = false;
|
|
79
|
-
let errorMessage: string;
|
|
80
|
-
let errorResponseCode: string;
|
|
81
|
-
let confirmAmount: number;
|
|
82
|
-
let hideAmountField: boolean;
|
|
83
|
-
let redirectMode: RedirectionModeStringEnum;
|
|
84
|
-
let modalErrorMessage: string;
|
|
85
|
-
let title: string;
|
|
86
|
-
let showHeaderBack: string;
|
|
87
|
-
let showSpinner = true;
|
|
88
|
-
const setActiveLanguage = ():void => {
|
|
89
|
-
setLocale(lang);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
Object.keys(TRANSLATIONS).forEach((item:any):void => {
|
|
93
|
-
addNewMessages(item, TRANSLATIONS[item]);
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
if (!translationurl) {
|
|
97
|
-
isTranslationLoaded = true;
|
|
98
|
-
}
|
|
99
|
-
const setTranslationUrl = () => {
|
|
100
|
-
let url:string = translationurl;
|
|
101
|
-
if (url) {
|
|
102
|
-
return fetch(url).then((res:any) => res.json())
|
|
103
|
-
.then((res) => {
|
|
104
|
-
Object.keys(res).forEach((item:any):void => {
|
|
105
|
-
addNewMessages(item, res[item]);
|
|
106
|
-
isTranslationLoaded = true;
|
|
107
|
-
});
|
|
108
|
-
}).catch((err:any) => {
|
|
109
|
-
isTranslationLoaded = true;
|
|
110
|
-
console.log(err);
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
const reinitMethod = () => {
|
|
116
|
-
showMethodDetailsPage = false;
|
|
117
|
-
selectedPaymentMethod = {} as PaymentMethod;
|
|
118
|
-
setTitle()
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
const getPlayerSession = () => {
|
|
122
|
-
xPaymentSessionToken = '';
|
|
123
|
-
showSpinner = true
|
|
124
|
-
const url:URL = new URL(`${endpoint}/v2/player/${customerid}/payment/GetPaymentSession`);
|
|
125
|
-
const headers = new Headers();
|
|
126
|
-
headers.append("accept", "application/json");
|
|
127
|
-
headers.append("Content-Type", "application/json");
|
|
128
|
-
headers.append("X-SessionId", `${session}`);
|
|
129
|
-
headers.append("X-Client-Request-Timestamp", dayjs.utc().format("YYYY-MM-DD HH:mm:ss.SSS"));
|
|
130
|
-
const requestParams:RequestInit = {
|
|
131
|
-
method: "POST",
|
|
132
|
-
mode: "cors",
|
|
133
|
-
headers: headers,
|
|
134
|
-
body: JSON.stringify({
|
|
135
|
-
"Channel": channel,
|
|
136
|
-
"Type": type,
|
|
137
|
-
"SuccessUrl": successurl,
|
|
138
|
-
"CancelUrl": cancelurl,
|
|
139
|
-
"FailUrl": failurl,
|
|
140
|
-
"Language": lang,
|
|
141
|
-
})
|
|
142
|
-
};
|
|
143
|
-
fetch(url, requestParams)
|
|
144
|
-
.then(res => res.json())
|
|
145
|
-
.then(data => {
|
|
146
|
-
if (data.error) {
|
|
147
|
-
errorMessage = data.error;
|
|
148
|
-
}
|
|
149
|
-
if (data.ResponseCode !== ResponseCode.Success) {
|
|
150
|
-
errorResponseCode = data.ResponseCode;
|
|
151
|
-
setErrorResponseCode();
|
|
152
|
-
return;
|
|
153
|
-
}
|
|
154
|
-
xPaymentSessionToken = data.XPaymentSessionToken;
|
|
155
|
-
window.postMessage({ type: 'StartSessionCountdown', xPaymentSessionToken }, window.location.href);
|
|
156
|
-
})
|
|
157
|
-
.catch(error => console.log(error))
|
|
158
|
-
.finally(() => showSpinner = false)
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
const setTitle = () => {
|
|
162
|
-
if (showMethodDetailsPage && isMobileWidth() && !errorResponseCode) {
|
|
163
|
-
title = selectedPaymentMethod.Label || selectedPaymentMethod.Name;
|
|
164
|
-
showHeaderBack = 'true'
|
|
165
|
-
} else {
|
|
166
|
-
title = `header.${type.toLowerCase()}`
|
|
167
|
-
showHeaderBack = 'false'
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
const setDevice = () => {
|
|
171
|
-
mobileView = isMobileWidth().toString();
|
|
172
|
-
setTitle()
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
const isMobileWidth = () => {
|
|
176
|
-
return widgetWidth < 750
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
const selectPayMeth = (e) => {
|
|
180
|
-
selectedPaymentMethod.Name = e.detail.Name;
|
|
181
|
-
selectedPaymentMethod.Label = e.detail.Label
|
|
182
|
-
showMethodDetailsPage = true;
|
|
183
|
-
setTitle()
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
const setErrorResponseCode = () => {
|
|
187
|
-
window.postMessage({type: 'ErrorResponseCode', errorResponseCode}, window.location.href);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
const setClientStyling = ():void => {
|
|
191
|
-
let sheet = document.createElement('style');
|
|
192
|
-
sheet.innerHTML = clientstyling;
|
|
193
|
-
customStylingContainer.appendChild(sheet);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
const setClientStylingURL = ():void => {
|
|
197
|
-
displayNone = true;
|
|
198
|
-
|
|
199
|
-
let url:URL = new URL(clientstylingurl);
|
|
200
|
-
let cssFile:HTMLElement = document.createElement('style');
|
|
201
|
-
|
|
202
|
-
fetch(url.href)
|
|
203
|
-
.then((res:any) => res.text())
|
|
204
|
-
.then((data:any) => {
|
|
205
|
-
cssFile.innerHTML = data
|
|
206
|
-
|
|
207
|
-
setTimeout(() => { customStylingContainer.appendChild(cssFile) }, 1);
|
|
208
|
-
setTimeout(() => { displayNone = false; }, 500);
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
const hideMethodDetails = (e) => {
|
|
213
|
-
showMethodDetailsPage = !e.detail.hideMethodDetails
|
|
214
|
-
setTitle()
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
onMount(() => {
|
|
218
|
-
window.addEventListener('selectPayMeth', selectPayMeth, false);
|
|
219
|
-
window.addEventListener('hidePaymentDetails', hideMethodDetails, false);
|
|
220
|
-
window.addEventListener('message', messageHandler, false);
|
|
221
|
-
window.addEventListener('closeModal', closeModal, false);
|
|
222
|
-
|
|
223
|
-
return () => {
|
|
224
|
-
window.removeEventListener('hidePaymentDetails', hideMethodDetails);
|
|
225
|
-
window.removeEventListener('selectPayMeth', selectPayMeth);
|
|
226
|
-
window.removeEventListener('message', messageHandler);
|
|
227
|
-
window.removeEventListener('closeModal', closeModal);
|
|
228
|
-
}
|
|
229
|
-
});
|
|
230
|
-
|
|
231
|
-
const preventDefault = (e) => {
|
|
232
|
-
e.preventDefault();
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
const hideModal = () => {
|
|
236
|
-
window.postMessage({ type: 'HideCashierModal' }, window.location.href);
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
const renewSession = () => {
|
|
240
|
-
errorResponseCode = null;
|
|
241
|
-
setErrorResponseCode();
|
|
242
|
-
getPlayerSession();
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
const closeModal = () => {
|
|
246
|
-
showConfirmModal = false;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
const messageHandler = (e:any) => {
|
|
250
|
-
if (e.data.type === 'ShowSessionError') {
|
|
251
|
-
errorMessage = e.data.error;
|
|
252
|
-
}
|
|
253
|
-
if (e.data.type === 'ToggleDisableActionOnPage') {
|
|
254
|
-
isProcessingTxn = e.data.disable;
|
|
255
|
-
}
|
|
256
|
-
if (e.data.type === 'ErrorResponseCode') {
|
|
257
|
-
errorResponseCode = e.data.errorResponseCode;
|
|
258
|
-
setTitle();
|
|
259
|
-
}
|
|
260
|
-
if (e.data.type === 'ShowConfirmModal') {
|
|
261
|
-
showConfirmModal = e.data.showConfirmModal;
|
|
262
|
-
confirmAmount = e.data.editedAmount;
|
|
263
|
-
hideAmountField = e.data.hideAmountField;
|
|
264
|
-
}
|
|
265
|
-
if (e.data.type === 'RedirectInfo') {
|
|
266
|
-
redirectUrl = e.data.redirectUrl;
|
|
267
|
-
redirectMode = e.data.redirectMode;
|
|
268
|
-
setTitle();
|
|
269
|
-
}
|
|
270
|
-
if (e.data.type === 'ShowCashierModal') {
|
|
271
|
-
modalErrorMessage = e.data.modalErrorMessage;
|
|
272
|
-
}
|
|
273
|
-
if (e.data.type === 'SessionExpired') {
|
|
274
|
-
errorResponseCode = ResponseCode.JwtTokenError;
|
|
275
|
-
setErrorResponseCode();
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
$: endpoint && session && customerid && lang && channel && type && successurl && failurl && cancelurl && getPlayerSession();
|
|
279
|
-
$: clientstyling && customStylingContainer && setClientStyling();
|
|
280
|
-
$: clientstylingurl && customStylingContainer && setClientStylingURL();
|
|
281
|
-
$: lang && setActiveLanguage();
|
|
282
|
-
$: lang && setTitle();
|
|
283
|
-
$: lang && translationurl && setTranslationUrl();
|
|
284
|
-
$: widgetWidth && setDevice();
|
|
285
|
-
$: xPaymentSessionToken && reinitMethod();
|
|
286
|
-
</script>
|
|
287
|
-
{#if showSpinner}
|
|
288
|
-
<cashier-spinner
|
|
289
|
-
{clientstylingurl}
|
|
290
|
-
{clientstyling}
|
|
291
|
-
></cashier-spinner>
|
|
292
|
-
{/if}
|
|
293
|
-
<div class={showMethodDetailsPage ? "CashierPageWidget BothSections" : "CashierPageWidget"}
|
|
294
|
-
class:MobileView={mobileView === 'true'}
|
|
295
|
-
bind:this={customStylingContainer}
|
|
296
|
-
bind:clientWidth={widgetWidth}
|
|
297
|
-
>
|
|
298
|
-
{#if isProcessingTxn}
|
|
299
|
-
<div class="DisablePage"></div>
|
|
300
|
-
{/if}
|
|
301
|
-
{#if lang && isTranslationLoaded}
|
|
302
|
-
{#if !!showheader && showheader !== 'false'}
|
|
303
|
-
<cashier-header class="Header"
|
|
304
|
-
{lang}
|
|
305
|
-
{translationurl}
|
|
306
|
-
{clientstylingurl}
|
|
307
|
-
{title}
|
|
308
|
-
{clientstyling}
|
|
309
|
-
showbackbutton="{showHeaderBack}"
|
|
310
|
-
>
|
|
311
|
-
</cashier-header>
|
|
312
|
-
{/if}
|
|
313
|
-
{#if redirectUrl && redirectMode === RedirectionModeStringEnum.Default}
|
|
314
|
-
<div class="IframeRedirect">
|
|
315
|
-
<cashier-iframe-redirect
|
|
316
|
-
{lang}
|
|
317
|
-
{translationurl}
|
|
318
|
-
{title}
|
|
319
|
-
{clientstylingurl}
|
|
320
|
-
{clientstyling}
|
|
321
|
-
showbackbutton="{showheader}"
|
|
322
|
-
iframeurl="{redirectUrl}"
|
|
323
|
-
></cashier-iframe-redirect>
|
|
324
|
-
</div>
|
|
325
|
-
{/if}
|
|
326
|
-
<cashier-modal
|
|
327
|
-
{clientstylingurl}
|
|
328
|
-
{clientstyling}
|
|
329
|
-
>
|
|
330
|
-
<cashier-error
|
|
331
|
-
{assetsurl}
|
|
332
|
-
{translationurl}
|
|
333
|
-
{clientstylingurl}
|
|
334
|
-
{clientstyling}
|
|
335
|
-
{lang}
|
|
336
|
-
errorcode={modalErrorMessage}
|
|
337
|
-
>
|
|
338
|
-
{#if modalErrorMessage}
|
|
339
|
-
<button slot="button" class="CashierErrorButton" on:click={hideModal}>{$_('closeModal')}</button>
|
|
340
|
-
{/if}
|
|
341
|
-
</cashier-error>
|
|
342
|
-
</cashier-modal>
|
|
343
|
-
{#if showsessionexpirationmodal === 'true'}
|
|
344
|
-
<cashier-session-expiration-modal
|
|
345
|
-
{assetsurl}
|
|
346
|
-
{translationurl}
|
|
347
|
-
{clientstylingurl}
|
|
348
|
-
{clientstyling}
|
|
349
|
-
{lang}
|
|
350
|
-
{local}
|
|
351
|
-
{endpoint}
|
|
352
|
-
{currency}
|
|
353
|
-
{customerid}
|
|
354
|
-
selectedpaymentmethodname="{selectedPaymentMethod.Name}"
|
|
355
|
-
>
|
|
356
|
-
</cashier-session-expiration-modal>
|
|
357
|
-
{/if}
|
|
358
|
-
{#if showConfirmModal}
|
|
359
|
-
<cashier-confirm-modal
|
|
360
|
-
{clientstylingurl}
|
|
361
|
-
{clientstyling}
|
|
362
|
-
>
|
|
363
|
-
<span class="CashierConfirmModalText" slot="text">{ confirmAmount && !hideAmountField ? $_(`${type.toLowerCase()}.confirmTextWithAmount`,
|
|
364
|
-
{ values:{ amount: formatter.format(confirmAmount), currency }}): $_(`${type.toLowerCase()}.confirmText`)}</span>
|
|
365
|
-
<div slot="confirm">{$_(`${type.toLowerCase()}.confirmButton`)}</div>
|
|
366
|
-
</cashier-confirm-modal>
|
|
367
|
-
{/if}
|
|
368
|
-
{/if}
|
|
369
|
-
{#if !errorMessage && !errorResponseCode}
|
|
370
|
-
<div class="CashierPage">
|
|
371
|
-
{#if !!showverifications && showverifications !== 'false' && mobileView === 'true'}
|
|
372
|
-
<cashier-verifications class="CashierVerificationsMobile"
|
|
373
|
-
{lang}
|
|
374
|
-
{translationurl}
|
|
375
|
-
{endpoint}
|
|
376
|
-
{clientstylingurl}
|
|
377
|
-
{clientstyling}
|
|
378
|
-
{customerid}
|
|
379
|
-
ismobileview="{mobileView}"
|
|
380
|
-
session="{xPaymentSessionToken}"
|
|
381
|
-
></cashier-verifications>
|
|
382
|
-
{/if}
|
|
383
|
-
<div class="CashierMethodListWrapper">
|
|
384
|
-
{#if !!showverifications && showverifications !== 'false' && mobileView !== 'true'}
|
|
385
|
-
<cashier-verifications class="CashierVerificationsMethodList"
|
|
386
|
-
{lang}
|
|
387
|
-
{translationurl}
|
|
388
|
-
{endpoint}
|
|
389
|
-
{clientstylingurl}
|
|
390
|
-
{clientstyling}
|
|
391
|
-
{customerid}
|
|
392
|
-
ismobileview="{mobileView}"
|
|
393
|
-
session="{xPaymentSessionToken}"
|
|
394
|
-
></cashier-verifications>
|
|
395
|
-
{/if}
|
|
396
|
-
<cashier-methods-list
|
|
397
|
-
{lang}
|
|
398
|
-
{local}
|
|
399
|
-
{translationurl}
|
|
400
|
-
{endpoint}
|
|
401
|
-
{customerid}
|
|
402
|
-
{currency}
|
|
403
|
-
{numberofmethodsshown}
|
|
404
|
-
{clientstylingurl}
|
|
405
|
-
{clientstyling}
|
|
406
|
-
{assetsurl}
|
|
407
|
-
session="{xPaymentSessionToken}"
|
|
408
|
-
ismobileview="{mobileView}"
|
|
409
|
-
></cashier-methods-list>
|
|
410
|
-
</div>
|
|
411
|
-
<div class="CashierMethodDetailsWrapper">
|
|
412
|
-
<cashier-method-details
|
|
413
|
-
{lang}
|
|
414
|
-
{local}
|
|
415
|
-
{translationurl}
|
|
416
|
-
{endpoint}
|
|
417
|
-
{customerid}
|
|
418
|
-
{currency}
|
|
419
|
-
{amount}
|
|
420
|
-
{assetsurl}
|
|
421
|
-
{type}
|
|
422
|
-
{clientstylingurl}
|
|
423
|
-
{clientstyling}
|
|
424
|
-
ismobileview="{mobileView}"
|
|
425
|
-
selectedpaymentmethodname="{selectedPaymentMethod.Name}"
|
|
426
|
-
session="{xPaymentSessionToken}"
|
|
427
|
-
playersession="{session}"
|
|
428
|
-
></cashier-method-details>
|
|
429
|
-
</div>
|
|
430
|
-
</div>
|
|
431
|
-
{:else}
|
|
432
|
-
<cashier-error
|
|
433
|
-
{lang}
|
|
434
|
-
{assetsurl}
|
|
435
|
-
{translationurl}
|
|
436
|
-
{clientstylingurl}
|
|
437
|
-
{clientstyling}
|
|
438
|
-
hidebuttons= {errorResponseCode !== ResponseCode.JwtTokenError}
|
|
439
|
-
errorcode={errorResponseCode}
|
|
440
|
-
>
|
|
441
|
-
{#if !errorResponseCode}
|
|
442
|
-
<span slot="text">{errorMessage}</span>
|
|
443
|
-
{/if}
|
|
444
|
-
{#if errorResponseCode === ResponseCode.JwtTokenError}
|
|
445
|
-
<div slot="icon">
|
|
446
|
-
{#if assetsurl}
|
|
447
|
-
<img src="{`${assetsurl}/session-expired-icon.png`}" width="300px" alt="error">
|
|
448
|
-
{:else}
|
|
449
|
-
<img src={errorSessionImage} width="300px" alt="error">
|
|
450
|
-
{/if}
|
|
451
|
-
</div>
|
|
452
|
-
<span slot="title">{$_('sessionExpiredTitle')}</span>
|
|
453
|
-
<span slot="text">{$_('sessionExpiredText')}</span>
|
|
454
|
-
<button slot="button" class="CashierErrorButton" on:click={renewSession}>{$_('continueSession')}</button>
|
|
455
|
-
{/if}
|
|
456
|
-
{#if errorResponseCode === ResponseCode.Maintenance}
|
|
457
|
-
<div slot="icon">
|
|
458
|
-
{#if assetsurl}
|
|
459
|
-
<img src="{`${assetsurl}/maintenance.png`}" width="300px" alt="error">
|
|
460
|
-
{:else}
|
|
461
|
-
<img src={maintenanceImage} width="300px" alt="error">
|
|
462
|
-
{/if}
|
|
463
|
-
</div>
|
|
464
|
-
<span slot="title">{$_('maintenanceTitle')}</span>
|
|
465
|
-
<span slot="text">{$_('maintenanceText')}</span>
|
|
466
|
-
{/if}
|
|
467
|
-
</cashier-error>
|
|
468
|
-
{/if}
|
|
469
|
-
</div>
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
<style lang="scss">
|
|
473
|
-
@keyframes loading-spinner {
|
|
474
|
-
from {
|
|
475
|
-
transform: rotate(0deg)
|
|
476
|
-
}
|
|
477
|
-
to {
|
|
478
|
-
transform: rotate(360deg)
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
@mixin container-height {
|
|
482
|
-
height: 100%;
|
|
483
|
-
overflow: auto;
|
|
484
|
-
box-sizing: border-box;
|
|
485
|
-
scrollbar-gutter: stable both-edges;
|
|
486
|
-
}
|
|
487
|
-
.DisablePage {
|
|
488
|
-
container-type: inline-size;
|
|
489
|
-
container-name: confirm-modal;
|
|
490
|
-
position: absolute;
|
|
491
|
-
width: 100%;
|
|
492
|
-
height: 100%;
|
|
493
|
-
z-index: 4;
|
|
494
|
-
top: 0;
|
|
495
|
-
left: 0;
|
|
496
|
-
background-color: transparent;
|
|
497
|
-
}
|
|
498
|
-
.CashierPageWidget {
|
|
499
|
-
container-type: inline-size;
|
|
500
|
-
container-name: deposit-page;
|
|
501
|
-
height: 100%;
|
|
502
|
-
position: relative;
|
|
503
|
-
box-sizing: border-box;
|
|
504
|
-
.CashierMethodDetailsWrapper {
|
|
505
|
-
display: none;
|
|
506
|
-
}
|
|
507
|
-
&:has(.Header) {
|
|
508
|
-
border-radius: 6px;
|
|
509
|
-
border: 1px solid var(--mmw--color-grey-105, #E8E9EB);
|
|
510
|
-
box-sizing: border-box;
|
|
511
|
-
.IframeRedirect {
|
|
512
|
-
border-radius: 6px;
|
|
513
|
-
}
|
|
514
|
-
.Content, .CashierPage, .DisablePage {
|
|
515
|
-
height: calc(100% - var(--mmw--header-height, 32px));
|
|
516
|
-
}
|
|
517
|
-
.DisablePage {
|
|
518
|
-
top: var(--mmw--header-height, 32px);
|
|
519
|
-
}
|
|
520
|
-
cashier-error {
|
|
521
|
-
height: calc(100% - 32px);
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
.CashierVerificationsMobile {
|
|
526
|
-
display: none;
|
|
527
|
-
}
|
|
528
|
-
.CashierVerificationsMethodList {
|
|
529
|
-
display: block;
|
|
530
|
-
border-radius: var(--mmw--border-radius-medium-plus, 6px);
|
|
531
|
-
}
|
|
532
|
-
.Content {
|
|
533
|
-
height: 100%;
|
|
534
|
-
position: relative;
|
|
535
|
-
}
|
|
536
|
-
.CashierMethodListWrapper {
|
|
537
|
-
@include container-height;
|
|
538
|
-
padding: var(--emw--spacing-large, 20px) var(--emw--spacing-x-small, 10px) var(--emw--spacing-small, 12px) var(--emw--spacing-x-small, 10px);
|
|
539
|
-
width: 50%;
|
|
540
|
-
display: flex;
|
|
541
|
-
flex-direction: column;
|
|
542
|
-
&::-webkit-scrollbar {
|
|
543
|
-
border-right: none;
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
.BothSections {
|
|
547
|
-
.CashierMethodDetailsWrapper {
|
|
548
|
-
@include container-height;
|
|
549
|
-
padding: var(--emw--spacing-large, 20px) var(--emw--spacing-x-small, 10px) var(--emw--spacing-small, 12px) var(--emw--spacing-x-small, 10px);
|
|
550
|
-
display: block;
|
|
551
|
-
transition: all 1s;
|
|
552
|
-
width: 50%;
|
|
553
|
-
justify-content: center;
|
|
554
|
-
position: relative;
|
|
555
|
-
}
|
|
556
|
-
.CashierMethodListWrapper {
|
|
557
|
-
&::-webkit-scrollbar {
|
|
558
|
-
border-right: 1px solid var(--emw--color-gray-100, #E0E0E0 );
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
.CashierPage {
|
|
563
|
-
position: relative;
|
|
564
|
-
display: flex;
|
|
565
|
-
flex-direction: row;
|
|
566
|
-
justify-content: center;
|
|
567
|
-
height: inherit;
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
cashier-method-details {
|
|
571
|
-
width: 0;
|
|
572
|
-
}
|
|
573
|
-
cashier-iframe-redirect {
|
|
574
|
-
height: inherit;
|
|
575
|
-
width: inherit;
|
|
576
|
-
}
|
|
577
|
-
cashier-error {
|
|
578
|
-
height: inherit;
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
.IframeRedirect {
|
|
582
|
-
display: flex;
|
|
583
|
-
position: absolute;
|
|
584
|
-
align-items: center;
|
|
585
|
-
justify-content: center;
|
|
586
|
-
width: 100%;
|
|
587
|
-
height: 100%;
|
|
588
|
-
z-index: 4;
|
|
589
|
-
top: 0;
|
|
590
|
-
left: 0;
|
|
591
|
-
background-color: var(--emw--color-white, #FFF);
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
.CashierConfirmModalText {
|
|
595
|
-
color: var(--mmw--color-grey-10, #111);
|
|
596
|
-
font-size: var(--emw--font-size-small, 14px);
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
.CashierErrorButton {
|
|
601
|
-
width: 100%;
|
|
602
|
-
height: 36px;
|
|
603
|
-
color: var(--emw--color-white, #FFF);
|
|
604
|
-
text-align: center;
|
|
605
|
-
cursor: pointer;
|
|
606
|
-
font-size: var(--emw--font-size-x-small, 12px);
|
|
607
|
-
font-style: normal;
|
|
608
|
-
font-weight: var(--emw--font-weight-semibold, 500);
|
|
609
|
-
font-family: inherit;
|
|
610
|
-
line-height: 36px;
|
|
611
|
-
border: none;
|
|
612
|
-
border-radius: var(--emw--border-radius-medium, 4px);
|
|
613
|
-
background: var(--emw--color-primary, #7EC51E);
|
|
614
|
-
&:hover {
|
|
615
|
-
background: var(--mmw--color-main-button-hover, #71B11B);
|
|
616
|
-
}
|
|
617
|
-
&:active {
|
|
618
|
-
background: var(--mmw--color-main-button-active, #5C950F);
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
.MobileView {
|
|
622
|
-
.CashierVerificationsMobile {
|
|
623
|
-
display: block;
|
|
624
|
-
}
|
|
625
|
-
.CashierVerificationsMethodList {
|
|
626
|
-
display: none;
|
|
627
|
-
}
|
|
628
|
-
&.BothSections .CashierMethodListWrapper {
|
|
629
|
-
display: none;
|
|
630
|
-
}
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
@container deposit-page (max-width:750px) {
|
|
634
|
-
.CashierPage, .BothSections .CashierPage {
|
|
635
|
-
flex-direction: column;
|
|
636
|
-
justify-content: flex-start;
|
|
637
|
-
gap: 0;
|
|
638
|
-
cashier-methods-list, cashier-method-details, .CashierMethodDetailsWrapper {
|
|
639
|
-
width: 100%;
|
|
640
|
-
height: 100%;
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
|
-
cashier-method-details {
|
|
644
|
-
display: none;
|
|
645
|
-
}
|
|
646
|
-
.BothSections cashier-method-details {
|
|
647
|
-
display: flex;
|
|
648
|
-
}
|
|
649
|
-
.BothSections .CashierMethodListWrapper {
|
|
650
|
-
display: none;
|
|
651
|
-
}
|
|
652
|
-
.CashierMethodListWrapper {
|
|
653
|
-
width: 100%;
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
::-webkit-scrollbar {
|
|
657
|
-
width: 4px;
|
|
658
|
-
}
|
|
659
|
-
::-webkit-scrollbar-track {
|
|
660
|
-
background: transparent;
|
|
661
|
-
}
|
|
662
|
-
::-webkit-scrollbar-thumb {
|
|
663
|
-
background: var(--mmw--color-grey-105, #E8E9EB);
|
|
664
|
-
}
|
|
665
|
-
::-webkit-scrollbar-thumb:hover {
|
|
666
|
-
background: var(--mmw--color-grey-290, #666);
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
</style>
|