@everymatrix/cashier-method-details 1.25.0 → 1.27.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.25.0",
3
+ "version": "1.27.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": "668756b576877a7c33679408591fa2b7f93e0f37"
38
+ "gitHead": "f6ec9c7a552b5acad22390148d440b8050572424"
39
39
  }
@@ -105,7 +105,8 @@
105
105
  }
106
106
  export let endpoint: string;
107
107
  export let session: string;
108
- export let lang: string;
108
+ export let lang: string = 'en';
109
+ export let local: string = 'en-US';
109
110
  export let translationurl: string;
110
111
  export let customerid: string;
111
112
  export let currency: string;
@@ -138,7 +139,7 @@
138
139
  let showRetryNotification: boolean;
139
140
  let isProcessingTxn: boolean;
140
141
  let isTranslationLoaded: boolean;
141
- let openedLookup: number | null;
142
+ let openedLookup: string | null;
142
143
  let clickedElem: HTMLElement;
143
144
  let qrCodeContainer: HTMLElement[] = [];
144
145
  let qrCodeScriptSrc: string = 'https://cdn.rawgit.com/davidshimjs/qrcodejs/gh-pages/qrcode.min.js';
@@ -148,6 +149,10 @@
148
149
  let userAgent:string = window.navigator.userAgent;
149
150
  let mediaQuery = window.matchMedia('(max-width: 750px)');
150
151
  let innerWidth: number;
152
+ let formatter = new Intl.NumberFormat(local, {minimumFractionDigits: 2 });
153
+ let amountError = '';
154
+ let showError = {};
155
+ let fieldValidation = {};
151
156
 
152
157
  $: endpoint && session && selectedpaymentmethodname && currency && getPaymentDetails();
153
158
  $: clientstyling && customStylingContainer && setClientStyling();
@@ -156,7 +161,8 @@
156
161
  $: lang && translationurl && setTranslationUrl();
157
162
  $: selectedpaymentmethodname && qrCodeContainer.length && generateQr();
158
163
  $: innerWidth && onWindowResize();
159
- $: mobileView.toString() && hideMethodsList()
164
+ $: mobileView.toString() && hideMethodsList();
165
+
160
166
  const generateQr = () => {
161
167
  qrCodeContainer.forEach(elem => {
162
168
  if (elem && elem.innerText) {
@@ -210,8 +216,12 @@
210
216
  fetch(url, requestParams).then(res => res.json()).then(data => {
211
217
  xPaymentSessionToken = data.XPaymentSessionToken;
212
218
  selectedPaymentMethod = data.PaymentMethod;
213
- fields = selectedPaymentMethod.Fields && selectedPaymentMethod.Fields.map(field => new PaymentMethodDetails(field));
219
+ showError = {};
214
220
  prepareFields = {};
221
+ fieldValidation = {};
222
+ validateAmount();
223
+ fields = selectedPaymentMethod.Fields && selectedPaymentMethod.Fields.map(field => new PaymentMethodDetails(field));
224
+ fields.forEach(field => { validateField(field) })
215
225
  hideMethodsList();
216
226
  })
217
227
  }
@@ -258,18 +268,22 @@
258
268
  });
259
269
 
260
270
  const closeAllLookups = (e) => {
271
+ if (openedLookup) {
272
+ showError[openedLookup] = true;
273
+ validateField(fields.find(field => field.name === openedLookup));
274
+ }
261
275
  if(!e.composedPath().includes(clickedElem)){
262
276
  openedLookup = null;
263
277
  }
264
278
  }
265
279
 
266
- const showLookup = (event, index) => {
267
- if (index === openedLookup) {
280
+ const showLookup = (event, name) => {
281
+ if (name === openedLookup) {
268
282
  openedLookup = null
269
283
  return;
270
284
  }
271
285
  clickedElem = event.composedPath()[0]
272
- openedLookup = index
286
+ openedLookup = name
273
287
  }
274
288
 
275
289
  const prepareTxn = () => {
@@ -373,6 +387,11 @@
373
387
  window.postMessage({ type: 'NavigateTo', path: url, target: blankPageTarget || null, externalLink: externalLink || false }, window.location.href);
374
388
  }
375
389
 
390
+ const onLookUpChanged = (field, value) => {
391
+ prepareFields[field.name] = value;
392
+ validateField(field);
393
+ }
394
+
376
395
  const showField = (field) => {
377
396
  if (!field.correlationFieldName) {
378
397
  return true;
@@ -384,17 +403,102 @@
384
403
  return isCorrelatedFieldVisible
385
404
  }
386
405
 
406
+ const emptyAmountError = ():string => {
407
+ if (!amount) {
408
+ return $_('errorEmptyField')
409
+ }
410
+ return ''
411
+ }
412
+
413
+ const minAmountError = () => {
414
+ if (selectedPaymentMethod.DisplayCurrency.MinAmountLimit > amount) {
415
+ return $_('minAmountError', {
416
+ values: {
417
+ amount: formatter.format(selectedPaymentMethod.DisplayCurrency.MinAmountLimit),
418
+ currency: selectedPaymentMethod.DisplayCurrency.Name
419
+ }
420
+ })
421
+ }
422
+ return ''
423
+ }
424
+
425
+ const maxAmountError = () => {
426
+ if (selectedPaymentMethod.DisplayCurrency.MaxAmountLimit < amount) {
427
+ return $_('maxAmountError', {
428
+ values: {
429
+ amount: formatter.format(selectedPaymentMethod.DisplayCurrency.MaxAmountLimit),
430
+ currency: selectedPaymentMethod.DisplayCurrency.Name
431
+ }
432
+ })
433
+ }
434
+ return ''
435
+ }
436
+
437
+ const amountMultiplierError = () => {
438
+ if (selectedPaymentMethod.AmountMultiplier && (selectedPaymentMethod.AmountMultiplier % amount !== 0)) {
439
+ return $_('amountMultiplierError', {
440
+ values: {
441
+ multiplier: selectedPaymentMethod.AmountMultiplier
442
+ }
443
+ })
444
+ }
445
+ return ''
446
+ }
447
+
448
+ const amountIntError = ():string => {
449
+ if (selectedPaymentMethod.IsIntegerAmount && !Number.isInteger(amount)) {
450
+ return $_('amountIntError')
451
+ }
452
+ return ''
453
+ }
454
+
455
+ const amountDecimalError = ():string => {
456
+ if (Number(amount).toFixed(2) != amount) {
457
+ return $_('amountDecimalError')
458
+ }
459
+ return ''
460
+ }
461
+
462
+ const patternMatchesError = (field, value):string => {
463
+ if (field.format && !value.toString().match(field.format)) {
464
+ return $_('invalidFieldError',{ values: { field: field.label }})
465
+ }
466
+ return ''
467
+ }
468
+
469
+ const emptyFieldError = (field, value):string => {
470
+ if (field.isRequired && (!value || !value.toString().trim())) {
471
+ return $_('errorEmptyField')
472
+ }
473
+ return ''
474
+ }
475
+
476
+ const validateAmount = () => {
477
+ amountError = emptyAmountError() || minAmountError() ||
478
+ maxAmountError() || amountMultiplierError() ||
479
+ amountIntError() || amountDecimalError();
480
+ }
481
+
482
+ const validateField = (field) => {
483
+ const value = prepareFields[field.name]
484
+ fieldValidation[field.name] = emptyFieldError(field, value) || patternMatchesError(field, value);
485
+ }
486
+
487
+ const isSubmitDisabled = (amountError, fieldValidation) => {
488
+ return !!amountError || Object.values(fieldValidation).some(error => !!error)
489
+ }
490
+
387
491
  </script>
388
492
  <svelte:window bind:innerWidth={innerWidth} />
389
493
  <svelte:head>
390
494
  <script src={qrCodeScriptSrc}></script>
391
495
  </svelte:head>
392
496
  <div class="CashierMethodDetails" bind:this={customStylingContainer}>
393
- {#if selectedPaymentMethod.Name}
497
+ {#if selectedPaymentMethod?.Name}
394
498
  <div class="MethodsDetails">
395
499
  <form on:submit|preventDefault={prepareTxn}>
396
500
  <div class="FieldWrapper">
397
- <div class="form-logo">
501
+ <div class="FormLogo">
398
502
  <div class="SelectedLogoWrapper">
399
503
  <img src={selectedPaymentMethod.Logos[0].LogoUrl} alt={selectedPaymentMethod.Label} />
400
504
  </div>
@@ -405,23 +509,34 @@
405
509
  <div on:click={() => backToMethodList()} class="ChangePaymeth">{$_('change')}</div>
406
510
  {/if}
407
511
  </div>
512
+ {#if selectedPaymentMethod.Description}
513
+ <div class="SelectedMethodDescription">
514
+ {selectedPaymentMethod.Description}
515
+ </div>
516
+ {/if}
408
517
  {#if !selectedPaymentMethod.HideAmountField}
409
- <div class="Amount">
518
+ <div class="Amount" class:Invalid={amountError && showError['amount']}>
410
519
  <label>
411
520
  <span class="Required">
412
521
  {$_('amountLabel')}
413
522
  </span>
414
523
  {#if selectedPaymentMethod.IsAmountConfigurable}
415
- <input type="number" bind:value={amount} placeholder="{$_('amountPlaceholder')}">
524
+ <input type="number"
525
+ bind:value={amount}
526
+ on:input={() => validateAmount()}
527
+ on:blur={() => {showError['amount'] = true; validateAmount()}}
528
+ placeholder="{$_('amountPlaceholder')}"
529
+ >
530
+ <span class="Alert">{amountError}</span>
416
531
  {#if selectedPaymentMethod.DisplayCurrency}
417
532
  <span class="AmountLimits">
418
- {selectedPaymentMethod.DisplayCurrency.MinAmountLimit ? `${$_('generalMin')} ${selectedPaymentMethod.DisplayCurrency.MinAmountLimit} ${currency}` : ''}
419
- {selectedPaymentMethod.DisplayCurrency.MaxAmountLimit ? `/ ${$_('generalMax')} ${selectedPaymentMethod.DisplayCurrency.MaxAmountLimit} ${currency}` : ''}
533
+ {selectedPaymentMethod.DisplayCurrency.MinAmountLimit ? `${$_('generalMin')} ${formatter.format(selectedPaymentMethod.DisplayCurrency.MinAmountLimit)} ${currency}` : ''}
534
+ {selectedPaymentMethod.DisplayCurrency.MaxAmountLimit ? `/ ${$_('generalMax')} ${formatter.format(selectedPaymentMethod.DisplayCurrency.MaxAmountLimit)} ${currency}` : ''}
420
535
  </span>
421
536
  {/if}
422
537
  {:else}
423
538
  <span class="NonConfigurableAmount">
424
- {amount} {currency}
539
+ {formatter.format(amount)} {currency}
425
540
  </span>
426
541
  {/if}
427
542
  </label>
@@ -430,65 +545,77 @@
430
545
  </div>
431
546
  {#each fields as field, index}
432
547
  {#if showField(field)}
433
- <div class="FieldWrapper" class:Hidden={field.type === FieldTypes.Hidden}>
434
- <label>
435
- {#if field.label && field.type !== FieldTypes.Link && field.type !== FieldTypes.Boolean}
436
- <span class:Required={field.isRequired}>{field.label}</span>
437
- {/if}
438
- {#if field.description && field.description !== field.label && field.type !== FieldTypes.QRCode && field.type !== FieldTypes.Boolean && field.type !== FieldTypes.Link}
439
- <span class="Description">{field.description}</span>
440
- {/if}
441
- {#if field.type === FieldTypes.Text}
442
- <input type="text" bind:value={prepareFields[field.name]} placeholder="{field.placeholder}">
443
-
444
- {:else if field.type === FieldTypes.Number || field.type === FieldTypes.Money}
445
- <input type="number" placeholder="{field.placeholder}" bind:value={prepareFields[field.name]}>
446
-
447
- {:else if field.type === FieldTypes.Password}
448
- <input type="password" bind:value={prepareFields[field.name]} placeholder="{field.placeholder}">
449
-
450
- {:else if field.type === FieldTypes.Hidden}
451
- <input type="hidden" bind:value={prepareFields[field.name]} placeholder="{field.placeholder}">
452
-
453
- {:else if field.type === FieldTypes.Lookup}
454
- <div class="CustomSelect">
455
- <div class="Selected" id="{index}" on:click="{(e) => showLookup(e,index)}">{prepareFields[field.name] || ''}</div>
456
- <div class="OptionList" class:Opened={openedLookup === index}>
457
- {#each field.values as value}
458
- <div on:click="{() => {prepareFields[field.name] = value.Name; fields = fields}}">
459
- <span>{value.Value}</span>
460
- </div>
461
- {/each}
548
+ <div class="FieldWrapper"
549
+ class:Hidden={field.type === FieldTypes.Hidden}
550
+ class:Invalid={showError[field.name] && fieldValidation[field.name]}>
551
+ <label>
552
+ {#if field.label && field.type !== FieldTypes.Link && field.type !== FieldTypes.Boolean}
553
+ <span class:Required={field.isRequired}>{field.label}</span>
554
+ {/if}
555
+ {#if field.description && field.description !== field.label && field.type !== FieldTypes.QRCode && field.type !== FieldTypes.Boolean && field.type !== FieldTypes.Link}
556
+ <span class="Description">{field.description}</span>
557
+ {/if}
558
+ {#if field.type === FieldTypes.Text}
559
+ <input type="text" bind:value={prepareFields[field.name]}
560
+ placeholder="{field.placeholder}"
561
+ on:input="{() => { validateField(field) }}"
562
+ on:blur="{() => { showError[field.name] = true; validateField(field) }}">
563
+
564
+ {:else if field.type === FieldTypes.Number || field.type === FieldTypes.Money}
565
+ <input type="number" placeholder="{field.placeholder}" bind:value={prepareFields[field.name]}
566
+ on:input="{() => { validateField(field) }}"
567
+ on:blur="{() => { showError[field.name] = true; validateField(field) }}"
568
+ >
569
+ {:else if field.type === FieldTypes.Password}
570
+ <input type="password" bind:value={prepareFields[field.name]} placeholder="{field.placeholder}"
571
+ on:input="{() => { validateField(field) }}"
572
+ on:blur="{() => { showError[field.name] = true; validateField(field) }}"
573
+ >
574
+ {:else if field.type === FieldTypes.Hidden}
575
+ <input type="hidden" bind:value={prepareFields[field.name]} placeholder="{field.placeholder}">
576
+
577
+ {:else if field.type === FieldTypes.Lookup}
578
+ <div class="CustomSelect">
579
+ <div class="Selected" id="{index}" on:click="{(e) => showLookup(e, field.name)}">{prepareFields[field.name] || ''}</div>
580
+ <div class="OptionList" class:Opened={openedLookup === field.name}>
581
+ {#each field.values as value}
582
+ <div on:click="{() => {prepareFields[field.name] = value.Name; fields = fields}}">
583
+ <span>{value.Value}</span>
584
+ </div>
585
+ {/each}
586
+ </div>
462
587
  </div>
463
- </div>
464
- {:else if field.type === FieldTypes.Boolean}
465
- <div class="Checkbox">
466
- <input type="checkbox" bind:value={prepareFields[field.name]} placeholder="{field.placeholder}">
467
- <span class="Checkmark"></span>
468
- <span class="Description">{@html field.descriptionWithLink}</span>
469
- </div>
470
- {:else if field.type === FieldTypes.QRCode}
471
- <div class="QRCode" on:click={() => {openUrlInNewTab(field.description)}}>
472
- <div bind:this={qrCodeContainer[qrCodeContainer.length]}>{field.defaultValue}</div>
473
- </div>
474
- {:else if field.type === FieldTypes.Link}
475
- <span>{@html field.descriptionWithLink}</span>
476
- {:else if field.type === FieldTypes.Label}
477
- <span class="Label"></span>
478
- {:else}
479
- <input type="text" bind:value={prepareFields[field.name]} placeholder="{field.placeholder}">
480
- {/if}
481
- </label>
588
+ {:else if field.type === FieldTypes.Boolean}
589
+ <div class="Checkbox">
590
+ <input type="checkbox" bind:checked={prepareFields[field.name]} placeholder="{field.placeholder}"
591
+ on:change="{() => { showError[field.name] = true; validateField(field) }}"
592
+ >
593
+ <span class="Checkmark"></span>
594
+ <span class="Description">{@html field.descriptionWithLink}</span>
595
+ </div>
596
+ {:else if field.type === FieldTypes.QRCode}
597
+ <div class="QRCode" on:click={() => {openUrlInNewTab(field.description)}}>
598
+ <div bind:this={qrCodeContainer[qrCodeContainer.length]}>{field.defaultValue}</div>
599
+ </div>
600
+ {:else if field.type === FieldTypes.Link}
601
+ <span>{@html field.descriptionWithLink}</span>
602
+ {:else if field.type === FieldTypes.Label}
603
+ <span class="Label"></span>
604
+ {:else}
605
+ <input type="text" bind:value={prepareFields[field.name]} placeholder="{field.placeholder}">
606
+ {/if}
607
+ </label>
608
+ <span class="Alert">{ fieldValidation[field.name] || '' }</span>
482
609
  </div>
483
610
  {/if}
484
611
  {/each}
485
612
  {#if !isProcessingTxn}
486
- <button class="PrimaryButton" type="submit">
613
+ <button class="PrimaryButton" type="submit" disabled="{isSubmitDisabled(amountError, fieldValidation)}">
487
614
  <svg class="ButtonLock" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
488
615
  <path fill-rule="evenodd" clip-rule="evenodd" d="M7.51564 0.574496C6.49714 0.733152 5.5928 1.46162 5.21164 2.43037C5.01714 2.92471 4.98674 3.24368 4.98671 4.78987L4.98668 5.99306L4.55336 6.00671C4.20693 6.01762 4.08258 6.03221 3.93336 6.07946C3.43136 6.23846 3.00318 6.58293 2.73943 7.04C2.70133 7.106 2.63639 7.256 2.59508 7.37334L2.52002 7.58665V13.9067L2.59268 14.12C2.6993 14.4331 2.83849 14.6518 3.09336 14.9067C3.34821 15.1615 3.56693 15.3007 3.88002 15.4073L4.09336 15.48H11.9067L12.12 15.4073C12.4331 15.3007 12.6518 15.1615 12.9067 14.9067C13.1616 14.6518 13.3007 14.4331 13.4074 14.12L13.48 13.9067V7.58665L13.405 7.37334C13.1846 6.74712 12.6999 6.27875 12.0667 6.08C11.9191 6.03371 11.7891 6.0184 11.4467 6.00696L11.0134 5.99253L11.0133 4.78959C11.0133 4.128 11.0008 3.45465 10.9855 3.29334C10.9257 2.66268 10.7188 2.13556 10.3497 1.67368C9.66549 0.817589 8.6023 0.405214 7.51564 0.574496ZM8.46436 1.58665C9.01596 1.7035 9.52999 2.11659 9.79758 2.65809C9.98521 3.03771 9.98202 3.00646 9.99305 4.58L10.003 6H5.99702L6.00699 4.58C6.01802 3.00646 6.01483 3.03771 6.20246 2.65809C6.31793 2.42446 6.43799 2.26065 6.61818 2.09103C6.89043 1.83468 7.21371 1.65496 7.52352 1.58775C7.74977 1.53865 8.23518 1.53809 8.46436 1.58665ZM11.9201 7.0955C12.0975 7.17871 12.2992 7.37412 12.3874 7.54806C12.4231 7.61846 12.465 7.75796 12.4805 7.85803C12.4993 7.97978 12.5061 8.97962 12.501 10.88L12.4934 13.72L12.4082 13.8997C12.26 14.2127 12.0016 14.419 11.6821 14.4796C11.4864 14.5167 4.51364 14.5167 4.31793 14.4796C3.99843 14.419 3.74008 14.2127 3.59183 13.8997L3.50668 13.72L3.49905 10.88C3.49393 8.97728 3.50074 7.97987 3.51964 7.85778C3.57627 7.49218 3.79218 7.21543 4.12918 7.0765L4.28002 7.01431L8.02668 7.0205L11.7734 7.02665L11.9201 7.0955Z" fill="white"/>
489
616
  </svg>
490
617
  {$_('makeDepositButton')}
491
- <span class="ButtonAmount">{amount || $_('amountPlaceholder')} {currency}</span>
618
+ <span class="ButtonAmount">{formatter.format(amount)} {currency}</span>
492
619
  </button>
493
620
  {:else}
494
621
  <button class="PrimaryButton">
@@ -527,7 +654,7 @@
527
654
  {/if}
528
655
  {#if showConfirmModal}
529
656
  <cashier-confirm-modal>
530
- <span slot="text">{$_('confirmDepositText')} {amount} {currency} ?</span>
657
+ <span slot="text">{$_('confirmDepositText')} {formatter.format(amount)} {currency} ?</span>
531
658
  <div slot="confirm">{$_('confirmDepositButton')}</div>
532
659
  </cashier-confirm-modal>
533
660
  {/if}
@@ -552,7 +679,7 @@
552
679
  visibility: hidden;
553
680
  }
554
681
  }
555
- .form-logo {
682
+ .FormLogo {
556
683
  align-items: center;
557
684
  display: flex;
558
685
  height: 50px;
@@ -586,6 +713,12 @@
586
713
  text-decoration-line: underline;
587
714
  }
588
715
  }
716
+ .SelectedMethodDescription {
717
+ color: var(--emw--color-gray-300, #666);
718
+ font-size: var(--emw--font-size-x-small, 12px);
719
+ margin: 10px 0 5px;
720
+ line-height: var(--emw--font-size-x-small, 12px);
721
+ }
589
722
  .RedirectionNotification {
590
723
  height: 100%;
591
724
  width: inherit;
@@ -664,6 +797,26 @@
664
797
  padding: 0;
665
798
  }
666
799
  }
800
+ .Alert {
801
+ display: none;
802
+ }
803
+ .Invalid {
804
+ input, .Selected {
805
+ border-color: var(--emw--color-error, #FE0101);
806
+ }
807
+ .Alert {
808
+ display: inline-block;
809
+ }
810
+ .AmountLimits {
811
+ display: none;
812
+ }
813
+ }
814
+ .Alert {
815
+ color: var(--emw--color-error, #FE0101);
816
+ font-size: var(--emw--font-size-x-small, 12px);
817
+ margin: 5px 0 0 2px;
818
+ line-height: var(--emw--font-size-x-small, 12px);
819
+ }
667
820
  .AmountLimits {
668
821
  color: var(--emw--color-gray-300, #666);
669
822
  font-size: var(--emw--font-size-x-small, 12px);
@@ -702,7 +855,7 @@
702
855
  .PrimaryButton {
703
856
  color: var(--emw--color-white, #FFF);
704
857
  text-align: center;
705
- font-size: var(--emw--font-size-small, 14px);
858
+ font-size: var(--emw--font-size-x-small, 12px);
706
859
  font-style: normal;
707
860
  font-weight: 400;
708
861
  height: 46px;
@@ -713,9 +866,27 @@
713
866
  width: 100%;
714
867
  margin: 12px 0;
715
868
  cursor: pointer;
716
- text-transform: uppercase;
869
+ display: flex;
870
+ align-items: center;
871
+ justify-content: center;
872
+ gap: 5px;
873
+ .ButtonAmount {
874
+ font-weight: 600;
875
+ }
717
876
  .ButtonSpinner {
718
- animation: loading-spinner 1s linear infinite
877
+ animation: loading-spinner 1s linear infinite;
878
+ background: var(--emw--color-active, #5C950F);
879
+ }
880
+ &[disabled] {
881
+ background: var(--emw--color-disabled, #99999980);
882
+ cursor: auto;
883
+ pointer-events: none;
884
+ }
885
+ &:hover {
886
+ background: var(--emw--color-hover, #71B11B);
887
+ }
888
+ &:active {
889
+ background: var(--emw--color-active, #5C950F);
719
890
  }
720
891
  }
721
892
  .QRCode {
@@ -1,8 +1,8 @@
1
1
  export const TRANSLATIONS = {
2
2
  "en": {
3
- "loading": 'Loading...',
3
+ "loading": "Loading...",
4
4
  "amountLabel": "Amount",
5
- "makeDepositButton": "Deposit",
5
+ "makeDepositButton": "DEPOSIT",
6
6
  "confirmDepositText": "Are you sure you want to deposit",
7
7
  "confirmDepositButton": "Ok",
8
8
  "redirectTitle": "You are redirected to the payment\'s provider page",
@@ -10,10 +10,17 @@ export const TRANSLATIONS = {
10
10
  "backToPayment": "Close",
11
11
  "retryText": "Please note that your popup blocker may prevent the payment window from appearing",
12
12
  "retryButton": "RETRY",
13
- "processingButton": "Processing...",
14
- "generalMin": "Min",
15
- "generalMax": "Max",
13
+ "processingButton": "PROCESSING...",
14
+ "generalMin": "Min:",
15
+ "generalMax": "Max:",
16
16
  "amountPlaceholder": "0.00",
17
- "change": "Change"
18
- },
17
+ "change": "Change",
18
+ "errorEmptyField": "Please enter data",
19
+ "minAmountError": "Amount cannot be smaller than {amount} {currency}",
20
+ "maxAmountError": "Amount cannot be bigger than {amount} {currency}",
21
+ "amountMultiplierError": "Amount should be multiple of {multiplier}",
22
+ "amountIntError": "Amount should be integer value",
23
+ "amountDecimalError": "Amount should have 2 or less digits after decimal point",
24
+ "invalidFieldError": "{field} is invalid"
25
+ }
19
26
  };