@everymatrix/cashier-method-details 1.35.0 → 1.36.1

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-method-details",
3
- "version": "1.35.0",
3
+ "version": "1.36.1",
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": "cad27ef6706d0e17f1eda3810fee31f1ec373fa9"
38
+ "gitHead": "5ffc382ef56d1d1736e48fec65bba06fbdadc8cf"
39
39
  }
@@ -252,7 +252,7 @@
252
252
  let isDisabled: boolean;
253
253
  let showErrorModal = false;
254
254
  let transactionId = '';
255
-
255
+ let showSpinner: boolean = true;
256
256
  $: endpoint && session && selectedpaymentmethodname && currency && reinitMethod();
257
257
  $: clientstyling && customStylingContainer && setClientStyling();
258
258
  $: clientstylingurl && customStylingContainer && setClientStylingURL();
@@ -273,6 +273,7 @@
273
273
  })
274
274
  }
275
275
  showReceiptPage = false;
276
+ showRetryNotification = false;
276
277
  flatpickrEl = [];
277
278
  fields = [];
278
279
  prepareFields = {};
@@ -282,6 +283,7 @@
282
283
  selectedPaymentMethod = null;
283
284
  errorResponseCode = '';
284
285
  showErrorModal = false;
286
+ showSpinner = true;
285
287
  setErrorResponseCode();
286
288
  getPaymentDetails();
287
289
  }
@@ -399,6 +401,7 @@
399
401
 
400
402
  if (data.ResponseCode !== ResponseCode.Success) {
401
403
  errorResponseCode = data.ResponseCode;
404
+ setErrorResponseCode();
402
405
  return;
403
406
  }
404
407
  xPaymentSessionToken = data.XPaymentSessionToken;
@@ -419,7 +422,7 @@
419
422
  setConfirmModalInfo();
420
423
  setErrorResponseCode();
421
424
  hideMethodsList();
422
- })
425
+ }).finally(() => showSpinner = false)
423
426
  }
424
427
 
425
428
  const setClientStyling = ():void => {
@@ -445,13 +448,16 @@
445
448
  }
446
449
 
447
450
  const messageHandler = (e:any) => {
448
- if (e.data.type == 'ErrorResponseCode') {
451
+ if (e.data.type === 'ErrorResponseCode') {
449
452
  errorResponseCode = e.data.errorResponseCode;
450
453
  showReceiptPage = e.data.showErrorOutsideReceiptPage;
451
454
  }
452
- if (e.data.type == 'ReceiptLoaded') {
455
+ if (e.data.type === 'ReceiptLoaded') {
453
456
  closeIframe()
454
457
  }
458
+ if (e.data.type === 'BackCashier') {
459
+ backToMethodList()
460
+ }
455
461
  }
456
462
 
457
463
  onMount(() => {
@@ -828,8 +834,14 @@
828
834
  <script src={qrCodeScriptSrc}></script>
829
835
  </svelte:head>
830
836
  <div class="CashierMethodDetails" bind:this={customStylingContainer}>
837
+ {#if showSpinner}
838
+ <cashier-spinner
839
+ {clientstylingurl}
840
+ {clientstyling}
841
+ ></cashier-spinner>
842
+ {/if}
831
843
  {#if selectedPaymentMethod?.Name}
832
- <div class="MethodsDetails">
844
+ <div class="MethodsDetails" class:DisabledPage={showRetryNotification}>
833
845
  {#if !showReceiptPage && !errorResponseCode || (errorResponseCode && showErrorModal)}
834
846
  <form on:submit|preventDefault={prepareTxn} novalidate>
835
847
  <div class="FieldWrapper">
@@ -979,6 +991,8 @@
979
991
  {/if}
980
992
  {#if showRetryNotification}
981
993
  <cashier-notifications
994
+ {clientstylingurl}
995
+ {clientstyling}
982
996
  text="{$_('retryText')}"
983
997
  button="{$_('retryButton')}"
984
998
  >
@@ -1003,6 +1017,8 @@
1003
1017
  {endpoint}
1004
1018
  {customerid}
1005
1019
  {assetsurl}
1020
+ {clientstylingurl}
1021
+ {clientstyling}
1006
1022
  showerrors="false"
1007
1023
  showclosebutton="true"
1008
1024
  showcontactbutton="true"
@@ -1069,7 +1085,11 @@
1069
1085
  }
1070
1086
  .CashierMethodDetails {
1071
1087
  width: 100%;
1072
- height: inherit;
1088
+ height: 100%;
1089
+ overflow-y: auto;
1090
+ box-sizing: border-box;
1091
+ scrollbar-gutter: stable both-edges;
1092
+ padding: var(--emw--spacing-large, 20px) var(--emw--spacing-x-small, 10px) var(--emw--spacing-small, 12px) var(--emw--spacing-x-small, 10px);
1073
1093
  container-name: method-details;
1074
1094
  container-type: inline-size;
1075
1095
  }
@@ -1084,10 +1104,21 @@
1084
1104
  position: relative;
1085
1105
  display: flex;
1086
1106
  flex-direction: column;
1107
+ height: 100%;
1087
1108
  gap: var(--mmw--spacing-2x-small-plus, 5px);
1088
1109
  &:has(.RedirectionNotification) form {
1089
1110
  visibility: hidden;
1090
1111
  }
1112
+ &.DisabledPage:after {
1113
+ content: '';
1114
+ position: absolute;
1115
+ height: 100%;
1116
+ width: 100%;
1117
+ z-index: 1;
1118
+ top: 0;
1119
+ left: 0;
1120
+ background-color: var(--emw--color-background, rgba(255, 255, 255, 0.5));
1121
+ }
1091
1122
  }
1092
1123
  .FormLogo {
1093
1124
  align-items: center;
@@ -31,6 +31,40 @@ export const TRANSLATIONS = {
31
31
  "confirmText": "You're going to withdraw from your account",
32
32
  "confirmTextWithAmount": "You're going to withdraw {amount} {currency} from your account",
33
33
  "confirmButton": "Ok"
34
+ },
35
+ },
36
+ "tr": {
37
+ "loading": "Yükleniyor...",
38
+ "amountLabel": "Miktar",
39
+ "redirectTitle": "Ödeme sağlayıcısı sayfasına yönlendirilirsiniz",
40
+ "redirectMessage": "Lütfen ödeme sağlayıcısı sayfasında işleminizi tamamlayın.",
41
+ "backToPayment": "KAPALI",
42
+ "retryText": "Açılır pencere engelleyicinizin ödeme penceresinin görünmesini engelleyebileceğini lütfen unutmayın",
43
+ "retryButton": "Yeniden Dene",
44
+ "processingButton": "İŞLEME...",
45
+ "generalMin": "Min:",
46
+ "generalMax": "Maks:",
47
+ "amountPlaceholder": "0",
48
+ "change": "Değiştir",
49
+ "errorEmptyField": "Lütfen verileri girin",
50
+ "minAmountError": "Tutar {amount} {currency}'den küçük olamaz",
51
+ "maxAmountError": "Tutar {amount} {currency}'den büyük olamaz",
52
+ "amountMultiplierError": "Tutar {multiplier}'nin katı olmalıdır",
53
+ "amountIntError": "Tutar tam sayı olmalıdır",
54
+ "amountDecimalError": "Tutarın ondalık noktadan sonra 2 veya daha az hanesi olmalıdır",
55
+ "invalidFieldError": "{field} geçersiz",
56
+ "backToMethodList": "ÖDEME YÖNTEMLERİNE GERİ DÖN",
57
+ "deposit": {
58
+ "makeTxnButton": "YATIR",
59
+ "confirmText": "Hesabınıza yatırıyorsunuz",
60
+ "confirmTextWithAmount": "Hesabınıza {amount} {currency} yatırıyorsunuz",
61
+ "confirmButton": "Tamam"
62
+ },
63
+ "withdraw": {
64
+ "makeTxnButton": "ÇEK",
65
+ "confirmText": "Hesabınızdan çekiyorsunuz",
66
+ "confirmTextWithAmount": "Hesabınıza {amount} {currency} yatırıyorsunuz",
67
+ "confirmButton": "Tamam"
34
68
  }
35
69
  }
36
- }
70
+ }