@globalpayments/js 2.0.1 → 2.1.3

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.
Files changed (30) hide show
  1. package/README.md +32 -1
  2. package/package.json +2 -2
  3. package/types/apm/qr-code-payments/components/common.d.ts +2 -0
  4. package/types/apm/qr-code-payments/components/generate-qr-code.d.ts +3 -0
  5. package/types/apm/qr-code-payments/components/present-qr-code-action-handler.d.ts +1 -0
  6. package/types/apm/qr-code-payments/components/qr-code-expired-handler.d.ts +1 -0
  7. package/types/apm/qr-code-payments/components/redirect-action-handler.d.ts +1 -0
  8. package/types/apm/qr-code-payments/components/redirect-in-frame-action-handler.d.ts +1 -0
  9. package/types/apm/qr-code-payments/constants.d.ts +1 -0
  10. package/types/apm/qr-code-payments/contracts.d.ts +17 -0
  11. package/types/apm/qr-code-payments/enums.d.ts +10 -0
  12. package/types/apm/qr-code-payments/helpers.d.ts +3 -0
  13. package/types/apm/qr-code-payments/requests/get-qr-code-payment-methods.d.ts +3 -0
  14. package/types/common/currency.d.ts +7 -0
  15. package/types/common/html-element.d.ts +8 -0
  16. package/types/internal/gateways/gp-api/get-qr-code-payment-methods.d.ts +3 -0
  17. package/types/internal/gateways/gp-api/index.d.ts +1 -0
  18. package/types/internal/gateways/index.d.ts +2 -0
  19. package/types/internal/lib/enums.d.ts +17 -1
  20. package/types/internal/lib/styles/default.d.ts +143 -0
  21. package/types/internal/lib/styles/gp-default.d.ts +143 -0
  22. package/types/internal/lib/styles/qr-code-payments/common.d.ts +151 -0
  23. package/types/internal/lib/styles/simple.d.ts +143 -0
  24. package/types/internal/lib/translations/en.d.ts +30 -0
  25. package/types/internal/lib/translations/zh.d.ts +30 -0
  26. package/types/lib/version.d.ts +1 -1
  27. package/types/tools/configure.d.ts +2 -0
  28. package/types/ui/form/index.d.ts +475 -19
  29. package/types/ui/iframe-field/action-add-qr-code-payment-methods.d.ts +3 -0
  30. package/types/ui/iframe-field/action-qr-code-payment-methods-request-start.d.ts +6 -0
@@ -143,17 +143,17 @@ export declare const fieldStyles: () => {
143
143
  "background-position-y": string;
144
144
  };
145
145
  "img.card-number-icon.valid.card-type-discover": {
146
- background: string; /**
147
- * Appends additional CSS rules to the group of hosted fields
148
- *
149
- * @param json New CSS rules
150
- */
146
+ background: string;
151
147
  "background-size": string;
152
148
  "background-position-y": string;
153
149
  width: string;
154
150
  };
155
151
  "img.card-number-icon.valid.card-type-jcb": {
156
- background: string;
152
+ background: string; /**
153
+ * Appends additional CSS rules to the group of hosted fields
154
+ *
155
+ * @param json New CSS rules
156
+ */
157
157
  "background-size": string;
158
158
  "background-position-y": string;
159
159
  };
@@ -386,9 +386,7 @@ export declare const fieldStyles: () => {
386
386
  "background-size": string;
387
387
  };
388
388
  "img.card-number-icon[src$='/gp-cc-generic.svg']": {
389
- background: string; /**
390
- * Represents logic surrounding a group of hosted fields.
391
- */
389
+ background: string;
392
390
  "background-size": string;
393
391
  "background-position-y": string;
394
392
  };
@@ -457,6 +455,153 @@ export declare const fieldStyles: () => {
457
455
  export declare const parentStyles: () => {
458
456
  blank: {};
459
457
  default: {
458
+ ".secure-payment-form .credit-card-qr-code-payments"?: {
459
+ "font-family": string;
460
+ };
461
+ ".secure-payment-form .credit-card-qr-code-payments-target, .qr-code-payment-content, .qr-code-payment-countdown-timer"?: {
462
+ display: string;
463
+ "flex-direction": string;
464
+ "align-items": string;
465
+ };
466
+ ".secure-payment-form .qr-code-payment-methods-wrapper"?: {
467
+ width: string;
468
+ };
469
+ ".secure-payment-form .qr-code-payment-method-button"?: {
470
+ color: string;
471
+ height: string;
472
+ width: string;
473
+ "border-radius": string;
474
+ border: string;
475
+ margin: string;
476
+ cursor: string;
477
+ };
478
+ ".secure-payment-form .qr-code-payment-method-alipayhk"?: {
479
+ "background-color": string;
480
+ border: string;
481
+ };
482
+ ".secure-payment-form .qr-code-payment-method-alipayhk:hover"?: {
483
+ "background-color": string;
484
+ border: string;
485
+ };
486
+ ".secure-payment-form .qr-code-payment-method-alipay"?: {
487
+ "background-color": string;
488
+ border: string;
489
+ };
490
+ ".secure-payment-form .qr-code-payment-method-alipay:hover"?: {
491
+ "background-color": string;
492
+ border: string;
493
+ };
494
+ ".secure-payment-form .qr-code-payment-method-wechat"?: {
495
+ "background-color": string;
496
+ border: string;
497
+ };
498
+ ".secure-payment-form .qr-code-payment-method-wechat:hover"?: {
499
+ "background-color": string;
500
+ border: string;
501
+ };
502
+ ".secure-payment-form .qr-code-payment-iframe-wrapper"?: {
503
+ display: string;
504
+ "flex-direction": string;
505
+ "align-items": string;
506
+ };
507
+ ".secure-payment-form .qr-code-payment-iframe"?: {
508
+ border: string;
509
+ width: string;
510
+ height: string;
511
+ };
512
+ ".secure-payment-form .qr-code-payment-content"?: {
513
+ "font-size": string;
514
+ "line-height": string;
515
+ width: string;
516
+ };
517
+ ".secure-payment-form .link-button"?: {
518
+ background: string;
519
+ border: string;
520
+ color: string;
521
+ "font-style": string;
522
+ "font-weight": string;
523
+ "line-height": string;
524
+ "font-size": string;
525
+ padding: string;
526
+ cursor: string;
527
+ margin: string;
528
+ };
529
+ ".secure-payment-form .link-button:hover"?: {
530
+ color: string;
531
+ };
532
+ ".secure-payment-form .link-button:active"?: {
533
+ color: string;
534
+ };
535
+ ".secure-payment-form .link-button:focus"?: {
536
+ color: string;
537
+ border: string;
538
+ };
539
+ ".secure-payment-form .qr-code-payment-countdown-timer-message"?: {
540
+ color: string;
541
+ "font-size": string;
542
+ "line-height": string;
543
+ };
544
+ ".secure-payment-form .qr-code-payment-countdown-timer-clock img"?: {
545
+ "margin-right": string;
546
+ };
547
+ ".secure-payment-form .qr-code-payment-countdown-timer-clock"?: {
548
+ display: string;
549
+ "align-items": string;
550
+ color: string;
551
+ "font-size": string;
552
+ "line-height": string;
553
+ "font-weight": string;
554
+ "justify-content": string;
555
+ };
556
+ ".secure-payment-form .payment-amount"?: {
557
+ color: string;
558
+ "font-style": string;
559
+ "font-weight": string;
560
+ "line-height": string;
561
+ "font-size": string;
562
+ };
563
+ ".secure-payment-form .qr-code-expired-alert"?: {
564
+ display: string; /**
565
+ * Appends additional CSS rules to the group of hosted fields
566
+ *
567
+ * @param json New CSS rules
568
+ */
569
+ border: string;
570
+ height: string;
571
+ "margin-top": string;
572
+ };
573
+ ".secure-payment-form .qr-code-expired-alert-icon"?: {
574
+ background: string;
575
+ display: string;
576
+ "align-items": string;
577
+ "justify-content": string;
578
+ width: string;
579
+ };
580
+ ".secure-payment-form .qr-code-expired-alert-message"?: {
581
+ display: string;
582
+ "flex-direction": string;
583
+ "justify-content": string;
584
+ padding: string;
585
+ "font-size": string;
586
+ "line-height": string;
587
+ };
588
+ ".secure-payment-form .qr-code-expired-alert-message-title"?: {
589
+ color: string;
590
+ "font-size": string;
591
+ "line-height": string;
592
+ };
593
+ ".secure-payment-form .qr-code-redirecting-to-page"?: {
594
+ "justify-content": string;
595
+ height: string;
596
+ display: string;
597
+ "flex-direction": string;
598
+ "align-items": string;
599
+ };
600
+ ".secure-payment-form .qr-code-redirecting-to-page-message"?: {
601
+ color: string;
602
+ "font-size": string;
603
+ "line-height": string;
604
+ };
460
605
  "#googlePay": {
461
606
  height: string;
462
607
  margin: string;
@@ -878,6 +1023,153 @@ export declare const parentStyles: () => {
878
1023
  };
879
1024
  };
880
1025
  "gp-default": {
1026
+ ".secure-payment-form .credit-card-qr-code-payments"?: {
1027
+ "font-family": string;
1028
+ };
1029
+ ".secure-payment-form .credit-card-qr-code-payments-target, .qr-code-payment-content, .qr-code-payment-countdown-timer"?: {
1030
+ display: string;
1031
+ "flex-direction": string;
1032
+ "align-items": string;
1033
+ };
1034
+ ".secure-payment-form .qr-code-payment-methods-wrapper"?: {
1035
+ width: string;
1036
+ };
1037
+ ".secure-payment-form .qr-code-payment-method-button"?: {
1038
+ color: string;
1039
+ height: string;
1040
+ width: string;
1041
+ "border-radius": string;
1042
+ border: string;
1043
+ margin: string;
1044
+ cursor: string;
1045
+ };
1046
+ ".secure-payment-form .qr-code-payment-method-alipayhk"?: {
1047
+ "background-color": string;
1048
+ border: string;
1049
+ };
1050
+ ".secure-payment-form .qr-code-payment-method-alipayhk:hover"?: {
1051
+ "background-color": string;
1052
+ border: string;
1053
+ };
1054
+ ".secure-payment-form .qr-code-payment-method-alipay"?: {
1055
+ "background-color": string;
1056
+ border: string;
1057
+ };
1058
+ ".secure-payment-form .qr-code-payment-method-alipay:hover"?: {
1059
+ "background-color": string;
1060
+ border: string;
1061
+ };
1062
+ ".secure-payment-form .qr-code-payment-method-wechat"?: {
1063
+ "background-color": string;
1064
+ border: string;
1065
+ };
1066
+ ".secure-payment-form .qr-code-payment-method-wechat:hover"?: {
1067
+ "background-color": string;
1068
+ border: string;
1069
+ };
1070
+ ".secure-payment-form .qr-code-payment-iframe-wrapper"?: {
1071
+ display: string;
1072
+ "flex-direction": string;
1073
+ "align-items": string;
1074
+ };
1075
+ ".secure-payment-form .qr-code-payment-iframe"?: {
1076
+ border: string;
1077
+ width: string;
1078
+ height: string;
1079
+ };
1080
+ ".secure-payment-form .qr-code-payment-content"?: {
1081
+ "font-size": string;
1082
+ "line-height": string;
1083
+ width: string;
1084
+ };
1085
+ ".secure-payment-form .link-button"?: {
1086
+ background: string;
1087
+ border: string;
1088
+ color: string;
1089
+ "font-style": string;
1090
+ "font-weight": string;
1091
+ "line-height": string;
1092
+ "font-size": string;
1093
+ padding: string;
1094
+ cursor: string;
1095
+ margin: string;
1096
+ };
1097
+ ".secure-payment-form .link-button:hover"?: {
1098
+ color: string;
1099
+ };
1100
+ ".secure-payment-form .link-button:active"?: {
1101
+ color: string;
1102
+ };
1103
+ ".secure-payment-form .link-button:focus"?: {
1104
+ color: string;
1105
+ border: string;
1106
+ };
1107
+ ".secure-payment-form .qr-code-payment-countdown-timer-message"?: {
1108
+ color: string;
1109
+ "font-size": string;
1110
+ "line-height": string;
1111
+ };
1112
+ ".secure-payment-form .qr-code-payment-countdown-timer-clock img"?: {
1113
+ "margin-right": string;
1114
+ };
1115
+ ".secure-payment-form .qr-code-payment-countdown-timer-clock"?: {
1116
+ display: string;
1117
+ "align-items": string;
1118
+ color: string;
1119
+ "font-size": string;
1120
+ "line-height": string;
1121
+ "font-weight": string;
1122
+ "justify-content": string;
1123
+ };
1124
+ ".secure-payment-form .payment-amount"?: {
1125
+ color: string;
1126
+ "font-style": string;
1127
+ "font-weight": string;
1128
+ "line-height": string;
1129
+ "font-size": string;
1130
+ };
1131
+ ".secure-payment-form .qr-code-expired-alert"?: {
1132
+ display: string; /**
1133
+ * Appends additional CSS rules to the group of hosted fields
1134
+ *
1135
+ * @param json New CSS rules
1136
+ */
1137
+ border: string;
1138
+ height: string;
1139
+ "margin-top": string;
1140
+ };
1141
+ ".secure-payment-form .qr-code-expired-alert-icon"?: {
1142
+ background: string;
1143
+ display: string;
1144
+ "align-items": string;
1145
+ "justify-content": string;
1146
+ width: string;
1147
+ };
1148
+ ".secure-payment-form .qr-code-expired-alert-message"?: {
1149
+ display: string;
1150
+ "flex-direction": string;
1151
+ "justify-content": string;
1152
+ padding: string;
1153
+ "font-size": string;
1154
+ "line-height": string;
1155
+ };
1156
+ ".secure-payment-form .qr-code-expired-alert-message-title"?: {
1157
+ color: string;
1158
+ "font-size": string;
1159
+ "line-height": string;
1160
+ };
1161
+ ".secure-payment-form .qr-code-redirecting-to-page"?: {
1162
+ "justify-content": string;
1163
+ height: string;
1164
+ display: string;
1165
+ "flex-direction": string;
1166
+ "align-items": string;
1167
+ };
1168
+ ".secure-payment-form .qr-code-redirecting-to-page-message"?: {
1169
+ color: string;
1170
+ "font-size": string;
1171
+ "line-height": string;
1172
+ };
881
1173
  ".secure-payment-form .hf-cvv-tooltip-invalid"?: {
882
1174
  border: string;
883
1175
  "border-left": string;
@@ -1274,6 +1566,12 @@ export declare const parentStyles: () => {
1274
1566
  ".secure-payment-form .installment-options, .installment-panel": {
1275
1567
  display: string;
1276
1568
  "flex-direction": string;
1569
+ /**
1570
+ * Instantiates a new UIForm object for a group of hosted fields
1571
+ *
1572
+ * @param fields Hosted field configuration
1573
+ * @param styles Custom CSS configuration
1574
+ */
1277
1575
  padding: string;
1278
1576
  width: string;
1279
1577
  };
@@ -1342,7 +1640,12 @@ export declare const parentStyles: () => {
1342
1640
  };
1343
1641
  ".secure-payment-form .installment-link:hover": {
1344
1642
  color: string;
1345
- };
1643
+ }; /**
1644
+ * Sets a special-case event listener that fires when all hosted
1645
+ * fields in a form have registered / loaded
1646
+ *
1647
+ * @param fn The listener function
1648
+ */
1346
1649
  ".secure-payment-form .installment-link:active": {
1347
1650
  color: string;
1348
1651
  };
@@ -1561,7 +1864,11 @@ export declare const parentStyles: () => {
1561
1864
  width: string;
1562
1865
  height: string;
1563
1866
  "margin-left": string;
1564
- "vertical-align": string;
1867
+ "vertical-align": string; /**
1868
+ * Appends additional CSS rules to the group of hosted fields
1869
+ *
1870
+ * @param json New CSS rules
1871
+ */
1565
1872
  };
1566
1873
  ".secure-payment-form div[class$='-shield'] .ssl-msg": {
1567
1874
  "font-size": string;
@@ -1573,12 +1880,6 @@ export declare const parentStyles: () => {
1573
1880
  "vertical-align": string;
1574
1881
  "text-align": string;
1575
1882
  "margin-left": string;
1576
- /**
1577
- * Sets a special-case event listener that fires when all hosted
1578
- * fields in a form have registered / loaded
1579
- *
1580
- * @param fn The listener function
1581
- */
1582
1883
  "margin-right": string;
1583
1884
  "margin-top": string;
1584
1885
  };
@@ -1704,6 +2005,153 @@ export declare const parentStyles: () => {
1704
2005
  };
1705
2006
  };
1706
2007
  simple: {
2008
+ ".secure-payment-form .credit-card-qr-code-payments"?: {
2009
+ "font-family": string;
2010
+ };
2011
+ ".secure-payment-form .credit-card-qr-code-payments-target, .qr-code-payment-content, .qr-code-payment-countdown-timer"?: {
2012
+ display: string;
2013
+ "flex-direction": string;
2014
+ "align-items": string;
2015
+ };
2016
+ ".secure-payment-form .qr-code-payment-methods-wrapper"?: {
2017
+ width: string;
2018
+ };
2019
+ ".secure-payment-form .qr-code-payment-method-button"?: {
2020
+ color: string;
2021
+ height: string;
2022
+ width: string;
2023
+ "border-radius": string;
2024
+ border: string;
2025
+ margin: string;
2026
+ cursor: string;
2027
+ };
2028
+ ".secure-payment-form .qr-code-payment-method-alipayhk"?: {
2029
+ "background-color": string;
2030
+ border: string;
2031
+ };
2032
+ ".secure-payment-form .qr-code-payment-method-alipayhk:hover"?: {
2033
+ "background-color": string;
2034
+ border: string;
2035
+ };
2036
+ ".secure-payment-form .qr-code-payment-method-alipay"?: {
2037
+ "background-color": string;
2038
+ border: string;
2039
+ };
2040
+ ".secure-payment-form .qr-code-payment-method-alipay:hover"?: {
2041
+ "background-color": string;
2042
+ border: string;
2043
+ };
2044
+ ".secure-payment-form .qr-code-payment-method-wechat"?: {
2045
+ "background-color": string;
2046
+ border: string;
2047
+ };
2048
+ ".secure-payment-form .qr-code-payment-method-wechat:hover"?: {
2049
+ "background-color": string;
2050
+ border: string;
2051
+ };
2052
+ ".secure-payment-form .qr-code-payment-iframe-wrapper"?: {
2053
+ display: string;
2054
+ "flex-direction": string;
2055
+ "align-items": string;
2056
+ };
2057
+ ".secure-payment-form .qr-code-payment-iframe"?: {
2058
+ border: string;
2059
+ width: string;
2060
+ height: string;
2061
+ };
2062
+ ".secure-payment-form .qr-code-payment-content"?: {
2063
+ "font-size": string;
2064
+ "line-height": string;
2065
+ width: string;
2066
+ };
2067
+ ".secure-payment-form .link-button"?: {
2068
+ background: string;
2069
+ border: string;
2070
+ color: string;
2071
+ "font-style": string;
2072
+ "font-weight": string;
2073
+ "line-height": string;
2074
+ "font-size": string;
2075
+ padding: string;
2076
+ cursor: string;
2077
+ margin: string;
2078
+ };
2079
+ ".secure-payment-form .link-button:hover"?: {
2080
+ color: string;
2081
+ };
2082
+ ".secure-payment-form .link-button:active"?: {
2083
+ color: string;
2084
+ };
2085
+ ".secure-payment-form .link-button:focus"?: {
2086
+ color: string;
2087
+ border: string;
2088
+ };
2089
+ ".secure-payment-form .qr-code-payment-countdown-timer-message"?: {
2090
+ color: string;
2091
+ "font-size": string;
2092
+ "line-height": string;
2093
+ };
2094
+ ".secure-payment-form .qr-code-payment-countdown-timer-clock img"?: {
2095
+ "margin-right": string;
2096
+ };
2097
+ ".secure-payment-form .qr-code-payment-countdown-timer-clock"?: {
2098
+ display: string;
2099
+ "align-items": string;
2100
+ color: string;
2101
+ "font-size": string;
2102
+ "line-height": string;
2103
+ "font-weight": string;
2104
+ "justify-content": string;
2105
+ };
2106
+ ".secure-payment-form .payment-amount"?: {
2107
+ color: string;
2108
+ "font-style": string;
2109
+ "font-weight": string;
2110
+ "line-height": string;
2111
+ "font-size": string;
2112
+ };
2113
+ ".secure-payment-form .qr-code-expired-alert"?: {
2114
+ display: string; /**
2115
+ * Appends additional CSS rules to the group of hosted fields
2116
+ *
2117
+ * @param json New CSS rules
2118
+ */
2119
+ border: string;
2120
+ height: string;
2121
+ "margin-top": string;
2122
+ };
2123
+ ".secure-payment-form .qr-code-expired-alert-icon"?: {
2124
+ background: string;
2125
+ display: string;
2126
+ "align-items": string;
2127
+ "justify-content": string;
2128
+ width: string;
2129
+ };
2130
+ ".secure-payment-form .qr-code-expired-alert-message"?: {
2131
+ display: string;
2132
+ "flex-direction": string;
2133
+ "justify-content": string;
2134
+ padding: string;
2135
+ "font-size": string;
2136
+ "line-height": string;
2137
+ };
2138
+ ".secure-payment-form .qr-code-expired-alert-message-title"?: {
2139
+ color: string;
2140
+ "font-size": string;
2141
+ "line-height": string;
2142
+ };
2143
+ ".secure-payment-form .qr-code-redirecting-to-page"?: {
2144
+ "justify-content": string;
2145
+ height: string;
2146
+ display: string;
2147
+ "flex-direction": string;
2148
+ "align-items": string;
2149
+ };
2150
+ ".secure-payment-form .qr-code-redirecting-to-page-message"?: {
2151
+ color: string;
2152
+ "font-size": string;
2153
+ "line-height": string;
2154
+ };
1707
2155
  "#googlePay": {
1708
2156
  height: string;
1709
2157
  margin: string;
@@ -2012,7 +2460,12 @@ export declare const parentStyles: () => {
2012
2460
  "font-weight": string;
2013
2461
  "line-height": string;
2014
2462
  "text-transform": string;
2015
- };
2463
+ }; /**
2464
+ * Sets a special-case event listener that fires when all hosted
2465
+ * fields in a form have registered / loaded
2466
+ *
2467
+ * @param fn The listener function
2468
+ */
2016
2469
  ".secure-payment-form #ss-banner": {
2017
2470
  background: string;
2018
2471
  "background-size": string;
@@ -2037,7 +2490,9 @@ export declare const parentStyles: () => {
2037
2490
  };
2038
2491
  ".secure-payment-form div[class$='-shield'] .ssl-logo_ico": {
2039
2492
  width: string;
2040
- height: string;
2493
+ height: string; /**
2494
+ * Deletes all hosted fields within the form
2495
+ */
2041
2496
  "margin-left": string;
2042
2497
  "vertical-align": string;
2043
2498
  };
@@ -2219,4 +2674,5 @@ export default class UIForm {
2219
2674
  private configureHostedFieldValidations;
2220
2675
  private validateForm;
2221
2676
  private submitForm;
2677
+ private startQRCodePaymentMethodsRequest;
2222
2678
  }
@@ -0,0 +1,3 @@
1
+ import { IframeField } from ".";
2
+ import { IPaymentMethodConfigurationNormalized } from "../../apm/qr-code-payments/contracts";
3
+ export default function addQRCodePaymentMethods(iframeField: IframeField | undefined, paymentMethodConfigurations: IPaymentMethodConfigurationNormalized[], amount: string | number): void;
@@ -0,0 +1,6 @@
1
+ import { IDictionary } from "@globalpayments/js/types/internal/lib/util";
2
+ declare const _default: (id: string, data: IDictionary) => void;
3
+ /**
4
+ * Requests the QR Code Payment methods
5
+ */
6
+ export default _default;