@everymatrix/cashier-method-details 1.35.0 → 1.36.0

Sign up to get free protection for your applications and to get access to all the features.
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.0",
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": "09be81de9c66446d0062303022d5f036d874d153"
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
  }
@@ -419,7 +421,7 @@
419
421
  setConfirmModalInfo();
420
422
  setErrorResponseCode();
421
423
  hideMethodsList();
422
- })
424
+ }).finally(() => showSpinner = false)
423
425
  }
424
426
 
425
427
  const setClientStyling = ():void => {
@@ -445,13 +447,16 @@
445
447
  }
446
448
 
447
449
  const messageHandler = (e:any) => {
448
- if (e.data.type == 'ErrorResponseCode') {
450
+ if (e.data.type === 'ErrorResponseCode') {
449
451
  errorResponseCode = e.data.errorResponseCode;
450
452
  showReceiptPage = e.data.showErrorOutsideReceiptPage;
451
453
  }
452
- if (e.data.type == 'ReceiptLoaded') {
454
+ if (e.data.type === 'ReceiptLoaded') {
453
455
  closeIframe()
454
456
  }
457
+ if (e.data.type === 'BackCashier') {
458
+ backToMethodList()
459
+ }
455
460
  }
456
461
 
457
462
  onMount(() => {
@@ -828,8 +833,14 @@
828
833
  <script src={qrCodeScriptSrc}></script>
829
834
  </svelte:head>
830
835
  <div class="CashierMethodDetails" bind:this={customStylingContainer}>
836
+ {#if showSpinner}
837
+ <cashier-spinner
838
+ {clientstylingurl}
839
+ {clientstyling}
840
+ ></cashier-spinner>
841
+ {/if}
831
842
  {#if selectedPaymentMethod?.Name}
832
- <div class="MethodsDetails">
843
+ <div class="MethodsDetails" class:DisabledPage={showRetryNotification}>
833
844
  {#if !showReceiptPage && !errorResponseCode || (errorResponseCode && showErrorModal)}
834
845
  <form on:submit|preventDefault={prepareTxn} novalidate>
835
846
  <div class="FieldWrapper">
@@ -979,6 +990,8 @@
979
990
  {/if}
980
991
  {#if showRetryNotification}
981
992
  <cashier-notifications
993
+ {clientstylingurl}
994
+ {clientstyling}
982
995
  text="{$_('retryText')}"
983
996
  button="{$_('retryButton')}"
984
997
  >
@@ -1003,6 +1016,8 @@
1003
1016
  {endpoint}
1004
1017
  {customerid}
1005
1018
  {assetsurl}
1019
+ {clientstylingurl}
1020
+ {clientstyling}
1006
1021
  showerrors="false"
1007
1022
  showclosebutton="true"
1008
1023
  showcontactbutton="true"
@@ -1069,7 +1084,11 @@
1069
1084
  }
1070
1085
  .CashierMethodDetails {
1071
1086
  width: 100%;
1072
- height: inherit;
1087
+ height: 100%;
1088
+ overflow-y: auto;
1089
+ box-sizing: border-box;
1090
+ scrollbar-gutter: stable both-edges;
1091
+ padding: var(--emw--spacing-large, 20px) var(--emw--spacing-x-small, 10px) var(--emw--spacing-small, 12px) var(--emw--spacing-x-small, 10px);
1073
1092
  container-name: method-details;
1074
1093
  container-type: inline-size;
1075
1094
  }
@@ -1084,10 +1103,21 @@
1084
1103
  position: relative;
1085
1104
  display: flex;
1086
1105
  flex-direction: column;
1106
+ height: 100%;
1087
1107
  gap: var(--mmw--spacing-2x-small-plus, 5px);
1088
1108
  &:has(.RedirectionNotification) form {
1089
1109
  visibility: hidden;
1090
1110
  }
1111
+ &.DisabledPage:after {
1112
+ content: '';
1113
+ position: absolute;
1114
+ height: 100%;
1115
+ width: 100%;
1116
+ z-index: 1;
1117
+ top: 0;
1118
+ left: 0;
1119
+ background-color: var(--emw--color-background, rgba(255, 255, 255, 0.5));
1120
+ }
1091
1121
  }
1092
1122
  .FormLogo {
1093
1123
  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
+ }