@everymatrix/cashier-page 1.34.1 → 1.34.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/index.html CHANGED
@@ -36,20 +36,17 @@
36
36
  local="en-US"
37
37
  channel="Desktop"
38
38
  type="Deposit"
39
- session="fb4ad4b9-3ac7-4d3a-a5aa-2820635e8bc2"
39
+ session="b54930b8-1e79-496b-bb20-ac07d5098e39"
40
40
  translationurl="https://static.everymatrix.com/mmstage/translations/1995/mm-localization-en.json"
41
41
  assetsurl="https://static.everymatrix.com/mmstage/cashier/operator-assets/1995"
42
- endpoint="https://api-stage-odeonbet-norway.apiopp.com/"
42
+ endpoint="https://odeonbet-api.stage.norway.mazeday.com"
43
43
  merchantid="1995"
44
- successurl="https://api-stage-odeonbet-norway.apiopp.com/en"
45
- failurl="https://api-stage-odeonbet-norway.apiopp.com/en"
46
- cancelurl="https://api-stage-odeonbet-norway.apiopp.com/en"
44
+ successurl="https://odeonbet-stage.mazeday.com/tr/receipt"
45
+ failurl="https://odeonbet-stage.mazeday.com/tr/receipt"
46
+ cancelurl="https://odeonbet-stage.mazeday.com/tr/receipt"
47
47
  customerid="6246443"
48
- currency="EUR"
48
+ currency="TRY"
49
49
  numberofmethodsshown="1"
50
- dateformat = "d.m.Y"
51
- timeformat = 'H:i'
52
- dateandtimeformat = 'd.m.Y H:i'
53
50
  >
54
51
  </cashier-page>
55
52
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/cashier-page",
3
- "version": "1.34.1",
3
+ "version": "1.34.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": "5ce0bbd8d4005bb9f6fbed830e8882a14e79712a"
38
+ "gitHead": "99004a0501ea8fb9219aac803a986e470f556838"
39
39
  }
@@ -33,9 +33,6 @@
33
33
  export let session: string;
34
34
  export let lang: string = 'en';
35
35
  export let local: string = 'en-US';
36
- export let dateformat: string = "d/m/Y";
37
- export let timeformat: string = "H:i";
38
- export let dateandtimeformat: string = 'd/m/Y H:i';
39
36
  export let translationurl: string;
40
37
  export let successurl: string;
41
38
  export let failurl: string;
@@ -78,7 +75,7 @@
78
75
  let hideAmountField: boolean;
79
76
  let redirectMode: RedirectionModeStringEnum;
80
77
 
81
- $: endpoint && session && customerid && lang && channel && type && getPlayerSession();
78
+ $: endpoint && session && customerid && lang && channel && type && successurl && failurl && cancelurl && getPlayerSession();
82
79
  $: clientstyling && customStylingContainer && setClientStyling();
83
80
  $: clientstylingurl && customStylingContainer && setClientStylingURL();
84
81
  $: lang && setActiveLanguage();
@@ -132,9 +129,15 @@
132
129
  if (data.error) {
133
130
  errorMessage = data.error
134
131
  }
132
+ if (data.ResponseCode !== 'Success') {
133
+ errorResponseCode = data.ResponseCode;
134
+ setErrorResponseCode();
135
+ return;
136
+ }
135
137
  xPaymentSessionToken = data.XPaymentSessionToken;
136
138
  isLoading = false;
137
139
  })
140
+ .catch(error => console.log(error))
138
141
  }
139
142
 
140
143
  const setDevice = () => {
@@ -144,7 +147,9 @@
144
147
  selectedPaymentMethod.Name = e.detail.Name;
145
148
  showMethodDetailsPage = true;
146
149
  }
147
-
150
+ const setErrorResponseCode = () => {
151
+ window.postMessage({type: 'ErrorResponseCode', errorResponseCode}, window.location.href);
152
+ }
148
153
  const setClientStyling = ():void => {
149
154
  let sheet = document.createElement('style');
150
155
  sheet.innerHTML = clientstyling;
@@ -256,7 +261,7 @@
256
261
  </cashier-confirm-modal>
257
262
  {/if}
258
263
  {/if}
259
- {#if !errorMessage}
264
+ {#if !errorMessage && !errorResponseCode}
260
265
  <div class="CashierPage">
261
266
  <div class="CashierMethodListWrapper">
262
267
  <cashier-methods-list
@@ -277,9 +282,6 @@
277
282
  <cashier-method-details
278
283
  {lang}
279
284
  {local}
280
- {timeformat}
281
- {dateformat}
282
- {dateandtimeformat}
283
285
  {translationurl}
284
286
  {endpoint}
285
287
  {customerid}
@@ -304,8 +306,11 @@
304
306
  {clientstylingurl}
305
307
  {clientstyling}
306
308
  hidebuttons="true"
309
+ errorcode={errorResponseCode}
307
310
  >
308
- <span slot="text">{errorMessage}</span>
311
+ {#if !errorResponseCode}
312
+ <span slot="text">{errorMessage}</span>
313
+ {/if}
309
314
  </cashier-error>
310
315
  {/if}
311
316
  </div>