@paykka/card-checkout-ui 0.13.1 → 0.13.5

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 (158) hide show
  1. package/dist/card-checkout-ui.js +21 -21
  2. package/dist/card-checkout-ui.umd.cjs +21 -21
  3. package/dist/es/_commonjsHelpers.js +82 -1
  4. package/dist/es/api/modules/get-browser-params.js +4 -1
  5. package/dist/es/api/modules/opay-wallet/index.js +16 -0
  6. package/dist/es/api/modules/paga-wallet/index.js +16 -0
  7. package/dist/es/api/modules/pic-pay/index.js +16 -0
  8. package/dist/es/api/modules/pix/index.js +16 -0
  9. package/dist/es/api/modules/vietqr/index.js +4 -0
  10. package/dist/es/components/AliPay/index.js +29 -35
  11. package/dist/es/components/Boost/index.js +34 -40
  12. package/dist/es/components/Card/index.js +35 -39
  13. package/dist/es/components/DropIn/index.js +42 -2
  14. package/dist/es/components/EncryptedCard/index.js +5 -1
  15. package/dist/es/components/GooglePay/index.js +1 -0
  16. package/dist/es/components/GrabPay/index.js +34 -40
  17. package/dist/es/components/GuideCard/index.js +6 -1
  18. package/dist/es/components/LinePay/index.js +34 -40
  19. package/dist/es/components/MayBankQRPay/index.js +35 -41
  20. package/dist/es/components/NinePay/index.js +34 -40
  21. package/dist/es/components/SecuredFieldsProvider/index.js +23 -7
  22. package/dist/es/components/SecuredIframe/index.js +36 -59
  23. package/dist/es/components/Sepa/index.js +17 -21
  24. package/dist/es/components/ShopeePay/index.js +34 -40
  25. package/dist/es/components/TNGWallet/index.js +34 -40
  26. package/dist/es/components/ThreeDS/index.js +32 -7
  27. package/dist/es/components/WechatPay/index.js +19 -24
  28. package/dist/es/components/business/QRCodeModal/QRCodeModal.js +6 -6
  29. package/dist/es/components/index.js +5 -0
  30. package/dist/es/components/internal/Form/FormItem.js +1 -1
  31. package/dist/es/components/internal/Form/util.js +1 -1
  32. package/dist/es/components/internal/Select/SelectMenu.js +2 -2
  33. package/dist/es/components/internal/icons/IconError.js +7 -4
  34. package/dist/es/components/internal/icons/IconOpayWallet.js +71 -0
  35. package/dist/es/components/internal/icons/IconPagaWallet.js +141 -0
  36. package/dist/es/components/internal/icons/IconPaymaya.js +42 -86
  37. package/dist/es/components/internal/icons/IconPicPay.js +49 -0
  38. package/dist/es/components/internal/icons/IconPix.js +75 -0
  39. package/dist/es/components/internal/icons/IconVietqr.js +45 -0
  40. package/dist/es/components/internal/icons/IconVietqrComplete.js +49 -0
  41. package/dist/es/components/wallets/GCash/GCash.js +20 -25
  42. package/dist/es/components/wallets/OpayWallet/OpayWallet.js +346 -0
  43. package/dist/es/components/wallets/OpayWallet/index.js +1 -0
  44. package/dist/es/components/wallets/OpayWallet/opay-wallet.js +1 -0
  45. package/dist/es/components/wallets/OpayWallet/type.js +1 -0
  46. package/dist/es/components/wallets/PagaWallet/PagaWallet.js +346 -0
  47. package/dist/es/components/wallets/PagaWallet/index.js +1 -0
  48. package/dist/es/components/wallets/PagaWallet/paga-wallet.js +1 -0
  49. package/dist/es/components/wallets/PagaWallet/type.js +1 -0
  50. package/dist/es/components/wallets/Paymaya/Paymaya.js +34 -40
  51. package/dist/es/components/wallets/PicPay/PicPay.js +346 -0
  52. package/dist/es/components/wallets/PicPay/index.js +1 -0
  53. package/dist/es/components/wallets/PicPay/pic-pay.js +1 -0
  54. package/dist/es/components/wallets/PicPay/type.js +1 -0
  55. package/dist/es/components/wallets/Pix/Pix.js +346 -0
  56. package/dist/es/components/wallets/Pix/index.js +1 -0
  57. package/dist/es/components/wallets/Pix/pix2.js +1 -0
  58. package/dist/es/components/wallets/Pix/type.js +1 -0
  59. package/dist/es/components/wallets/Vietqr/Vietqr.js +380 -0
  60. package/dist/es/components/wallets/Vietqr/index.js +1 -0
  61. package/dist/es/components/wallets/Vietqr/type.js +1 -0
  62. package/dist/es/components/wallets/Vietqr/vietqr2.js +1 -0
  63. package/dist/es/components/wallets/Zalopay/Zalopay.js +17 -21
  64. package/dist/es/components/wallets/index.js +8 -0
  65. package/dist/es/constant.js +32 -2
  66. package/dist/es/core/checkout.js +24 -1
  67. package/dist/es/core/create.js +1 -1
  68. package/dist/es/core/session.js +2 -23
  69. package/dist/es/core/theme.js +65 -0
  70. package/dist/es/core.js +34 -34
  71. package/dist/es/i18n/locales/de-DE.js +8 -2
  72. package/dist/es/i18n/locales/en-GB.js +8 -2
  73. package/dist/es/i18n/locales/es-ES.js +8 -2
  74. package/dist/es/i18n/locales/fr-FR.js +8 -2
  75. package/dist/es/i18n/locales/ja-JP.js +8 -2
  76. package/dist/es/i18n/locales/ko-KR.js +8 -2
  77. package/dist/es/i18n/locales/nl-NL.js +8 -2
  78. package/dist/es/i18n/locales/pt-PT.js +8 -2
  79. package/dist/es/i18n/locales/ru-RU.js +8 -2
  80. package/dist/es/i18n/locales/zh-CN.js +10 -4
  81. package/dist/es/i18n/locales/zh-HK.js +10 -4
  82. package/dist/es/i18n/locales/zh-TW.js +10 -4
  83. package/dist/es/index.js +17 -5
  84. package/dist/es/style.css +1 -1
  85. package/dist/es/utils/format.js +0 -5
  86. package/dist/es/utils/object.js +31 -1
  87. package/dist/es/utils/string.js +10 -0
  88. package/dist/es/utils/system-info/is-ua-webview.js +14 -12
  89. package/dist/es/utils/theme.js +7 -0
  90. package/dist/style.css +1 -1
  91. package/dist/types/api/modules/get-browser-params.d.ts +1 -0
  92. package/dist/types/api/modules/index.d.ts +5 -0
  93. package/dist/types/api/modules/opay-wallet/index.d.ts +4 -0
  94. package/dist/types/api/modules/paga-wallet/index.d.ts +4 -0
  95. package/dist/types/api/modules/pic-pay/index.d.ts +4 -0
  96. package/dist/types/api/modules/pix/index.d.ts +4 -0
  97. package/dist/types/api/modules/vietqr/index.d.ts +4 -0
  98. package/dist/types/components/DropIn/type.d.ts +3 -2
  99. package/dist/types/components/SecuredFieldsProvider/type.d.ts +5 -0
  100. package/dist/types/components/SecuredIframe/HiddenIframe.d.ts +3 -1
  101. package/dist/types/components/ThreeDS/components/ThreeDSAuth/type.d.ts +2 -0
  102. package/dist/types/components/business/QRCodeModal/type.d.ts +2 -0
  103. package/dist/types/components/index.d.ts +1 -3
  104. package/dist/types/components/internal/Loading/Loading.d.ts +1 -0
  105. package/dist/types/components/internal/Select/SelectMenu.d.ts +1 -1
  106. package/dist/types/components/internal/icons/IconOpayWallet.d.ts +2 -0
  107. package/dist/types/components/internal/icons/IconPagaWallet.d.ts +2 -0
  108. package/dist/types/components/internal/icons/IconPicPay.d.ts +2 -0
  109. package/dist/types/components/internal/icons/IconPix.d.ts +2 -0
  110. package/dist/types/components/internal/icons/IconVietqr.d.ts +2 -0
  111. package/dist/types/components/internal/icons/IconVietqrComplete.d.ts +2 -0
  112. package/dist/types/components/internal/icons/index.d.ts +6 -0
  113. package/dist/types/components/wallets/OpayWallet/OpayWallet.d.ts +10 -0
  114. package/dist/types/components/wallets/OpayWallet/index.d.ts +2 -0
  115. package/dist/types/components/wallets/OpayWallet/type.d.ts +40 -0
  116. package/dist/types/components/wallets/PagaWallet/PagaWallet.d.ts +10 -0
  117. package/dist/types/components/wallets/PagaWallet/index.d.ts +2 -0
  118. package/dist/types/components/wallets/PagaWallet/type.d.ts +40 -0
  119. package/dist/types/components/wallets/PicPay/PicPay.d.ts +10 -0
  120. package/dist/types/components/wallets/PicPay/index.d.ts +2 -0
  121. package/dist/types/components/wallets/PicPay/type.d.ts +40 -0
  122. package/dist/types/components/wallets/Pix/Pix.d.ts +10 -0
  123. package/dist/types/components/wallets/Pix/index.d.ts +2 -0
  124. package/dist/types/components/wallets/Pix/type.d.ts +40 -0
  125. package/dist/types/components/wallets/Vietqr/Vietqr.d.ts +10 -0
  126. package/dist/types/components/wallets/Vietqr/index.d.ts +2 -0
  127. package/dist/types/components/wallets/Vietqr/type.d.ts +39 -0
  128. package/dist/types/components/wallets/index.d.ts +8 -0
  129. package/dist/types/components/wallets/type.d.ts +9 -0
  130. package/dist/types/constant.d.ts +11 -1
  131. package/dist/types/core/checkout.d.ts +4 -0
  132. package/dist/types/core/index.d.ts +1 -0
  133. package/dist/types/core/session.d.ts +1 -11
  134. package/dist/types/core/theme.d.ts +7 -0
  135. package/dist/types/i18n/locales/de-DE.d.ts +6 -0
  136. package/dist/types/i18n/locales/en-GB.d.ts +6 -0
  137. package/dist/types/i18n/locales/es-ES.d.ts +6 -0
  138. package/dist/types/i18n/locales/fr-FR.d.ts +6 -0
  139. package/dist/types/i18n/locales/ja-JP.d.ts +6 -0
  140. package/dist/types/i18n/locales/ko-KR.d.ts +6 -0
  141. package/dist/types/i18n/locales/nl-NL.d.ts +6 -0
  142. package/dist/types/i18n/locales/pt-PT.d.ts +6 -0
  143. package/dist/types/i18n/locales/ru-RU.d.ts +6 -0
  144. package/dist/types/i18n/locales/zh-CN.d.ts +6 -0
  145. package/dist/types/i18n/locales/zh-HK.d.ts +6 -0
  146. package/dist/types/i18n/locales/zh-TW.d.ts +6 -0
  147. package/dist/types/types/message.d.ts +29 -25
  148. package/dist/types/utils/index.d.ts +3 -2
  149. package/dist/types/utils/object.d.ts +7 -0
  150. package/dist/types/utils/string.d.ts +1 -0
  151. package/dist/types/utils/style.d.ts +1 -1
  152. package/dist/types/utils/system-info/is-ua-webview.d.ts +1 -1
  153. package/dist/types/utils/theme.d.ts +4 -0
  154. package/package.json +67 -67
  155. package/dist/es/utils/deep-freeze.js +0 -13
  156. package/dist/es/utils/obj.js +0 -22
  157. package/dist/types/utils/deep-freeze.d.ts +0 -1
  158. package/dist/types/utils/obj.d.ts +0 -6
@@ -22,12 +22,11 @@ var __privateMethod = (obj, member, method) => {
22
22
  return method;
23
23
  };
24
24
  var _readyPromise, _init, init_fn, _initCheckout, initCheckout_fn;
25
+ import { d } from "../core.js";
25
26
  import { isTimeoutError } from "../api/http.js";
26
27
  import "../utils/card-brand/brands.js";
27
28
  import "../utils/system-info/get-browser-info.js";
28
- import { generateColors } from "../utils/colors.js";
29
29
  import { createPromise } from "../utils/create-promise.js";
30
- import "../core.js";
31
30
  import { PayKKaError } from "./error.js";
32
31
  import { querySession } from "./query.js";
33
32
  class Session {
@@ -37,7 +36,7 @@ class Session {
37
36
  __publicField(this, "sessionId");
38
37
  __publicField(this, "clientKey");
39
38
  __publicField(this, "checkout");
40
- __publicField(this, "colors", null);
39
+ __publicField(this, "theme", d({}));
41
40
  __publicField(this, "extraParams", {});
42
41
  __privateAdd(this, _readyPromise, createPromise());
43
42
  const { sessionId, clientKey } = params;
@@ -46,25 +45,6 @@ class Session {
46
45
  this.extraParams = extraParams;
47
46
  __privateMethod(this, _init, init_fn).call(this);
48
47
  }
49
- /**
50
- * 设置主题
51
- * 目前的主题仅仅包含按钮背景和字体色
52
- */
53
- initTheme() {
54
- var _a;
55
- const { payButtonBackgroundColor } = ((_a = this.checkout) == null ? void 0 : _a.theme) || {};
56
- if (payButtonBackgroundColor) {
57
- const colors = generateColors(payButtonBackgroundColor);
58
- this.colors = {
59
- primary: colors[5],
60
- // 主色
61
- primaryHover: colors[4],
62
- // 浅一点的色,用于 hover
63
- primaryActive: colors[6]
64
- // 深一点的色,用于 active
65
- };
66
- }
67
- }
68
48
  ready() {
69
49
  return __privateGet(this, _readyPromise);
70
50
  }
@@ -79,7 +59,6 @@ init_fn = async function() {
79
59
  const error = isTimeoutError(err) ? err : new PayKKaError("API_ERROR", err.message, { code: err.code });
80
60
  __privateGet(this, _readyPromise).reject(error);
81
61
  }
82
- this.initTheme();
83
62
  };
84
63
  _initCheckout = new WeakSet();
85
64
  initCheckout_fn = async function() {
@@ -0,0 +1,65 @@
1
+ var __accessCheck = (obj, member, msg) => {
2
+ if (!member.has(obj))
3
+ throw TypeError("Cannot " + msg);
4
+ };
5
+ var __privateGet = (obj, member, getter) => {
6
+ __accessCheck(obj, member, "read from private field");
7
+ return getter ? getter.call(obj) : member.get(obj);
8
+ };
9
+ var __privateAdd = (obj, member, value) => {
10
+ if (member.has(obj))
11
+ throw TypeError("Cannot add the same private member more than once");
12
+ member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
13
+ };
14
+ var __privateSet = (obj, member, value, setter) => {
15
+ __accessCheck(obj, member, "write to private field");
16
+ setter ? setter.call(obj, value) : member.set(obj, value);
17
+ return value;
18
+ };
19
+ var _className, _theme;
20
+ import { useBEM } from "../hooks/useBEM.js";
21
+ import "../core.js";
22
+ import "./context.js";
23
+ import "../utils/card-brand/brands.js";
24
+ import "../utils/system-info/get-browser-info.js";
25
+ import { generateColors } from "../utils/colors.js";
26
+ import { loadStyle } from "../utils/style.js";
27
+ import { getThemeText } from "../utils/theme.js";
28
+ import "../api/http.js";
29
+ class PayKKaTheme {
30
+ constructor(checkoutId) {
31
+ /** 主题类名 */
32
+ __privateAdd(this, _className, void 0);
33
+ __privateAdd(this, _theme, {});
34
+ __privateSet(this, _className, useBEM(`theme-${checkoutId}`).bem());
35
+ }
36
+ init(theme) {
37
+ const { payButtonBackgroundColor, payButtonTextColor } = theme || {};
38
+ __privateSet(this, _theme, {
39
+ ...__privateGet(this, _theme),
40
+ "--paykka-button-font-color": payButtonTextColor
41
+ });
42
+ if (payButtonBackgroundColor) {
43
+ const colors = generateColors(payButtonBackgroundColor);
44
+ __privateSet(this, _theme, {
45
+ ...__privateGet(this, _theme),
46
+ "--paykka-button-bg-color": colors[5],
47
+ // 主色
48
+ "--paykka-button-bg-color-hover": colors[4],
49
+ // 浅一点的色,用于 hover
50
+ "--paykka-button-bg-color-active": colors[6]
51
+ // 深一点的色,用于 active
52
+ });
53
+ }
54
+ const themeStyle = getThemeText(__privateGet(this, _theme));
55
+ loadStyle(`.${__privateGet(this, _className)}{${themeStyle}}`);
56
+ }
57
+ get className() {
58
+ return __privateGet(this, _className);
59
+ }
60
+ }
61
+ _className = new WeakMap();
62
+ _theme = new WeakMap();
63
+ export {
64
+ PayKKaTheme
65
+ };
package/dist/es/core.js CHANGED
@@ -695,36 +695,6 @@ l$3.diffed = function(n2) {
695
695
  var t2 = n2.props, e2 = n2.__e;
696
696
  null != e2 && "textarea" === n2.type && "value" in t2 && t2.value !== e2.value && (e2.value = null == t2.value ? "" : t2.value);
697
697
  };
698
- function e$1(e2, n2) {
699
- return n2 = n2 || {}, new Promise(function(t2, r2) {
700
- var s2 = new XMLHttpRequest(), o2 = [], u2 = {}, a2 = function e3() {
701
- return { ok: 2 == (s2.status / 100 | 0), statusText: s2.statusText, status: s2.status, url: s2.responseURL, text: function() {
702
- return Promise.resolve(s2.responseText);
703
- }, json: function() {
704
- return Promise.resolve(s2.responseText).then(JSON.parse);
705
- }, blob: function() {
706
- return Promise.resolve(new Blob([s2.response]));
707
- }, clone: e3, headers: { keys: function() {
708
- return o2;
709
- }, entries: function() {
710
- return o2.map(function(e4) {
711
- return [e4, s2.getResponseHeader(e4)];
712
- });
713
- }, get: function(e4) {
714
- return s2.getResponseHeader(e4);
715
- }, has: function(e4) {
716
- return null != s2.getResponseHeader(e4);
717
- } } };
718
- };
719
- for (var i2 in s2.open(n2.method || "get", e2, true), s2.onload = function() {
720
- s2.getAllResponseHeaders().toLowerCase().replace(/^(.+?):/gm, function(e3, n3) {
721
- u2[n3] || o2.push(u2[n3] = n3);
722
- }), t2(a2());
723
- }, s2.onerror = r2, s2.withCredentials = "include" == n2.credentials, n2.headers)
724
- s2.setRequestHeader(i2, n2.headers[i2]);
725
- s2.send(n2.body || null);
726
- });
727
- }
728
698
  var __assign = function() {
729
699
  __assign = Object.assign || function __assign2(t2) {
730
700
  for (var s2, i2 = 1, n2 = arguments.length; i2 < n2; i2++) {
@@ -3937,7 +3907,7 @@ function t() {
3937
3907
  }
3938
3908
  var o = void 0;
3939
3909
  var h = void 0, s$1 = 0, f = 0, v = 0;
3940
- function e(i2) {
3910
+ function e$1(i2) {
3941
3911
  if (void 0 !== o) {
3942
3912
  var t2 = i2.n;
3943
3913
  if (void 0 === t2 || t2.t !== o) {
@@ -4028,7 +3998,7 @@ u.prototype.peek = function() {
4028
3998
  }
4029
3999
  };
4030
4000
  Object.defineProperty(u.prototype, "value", { get: function() {
4031
- var i2 = e(this);
4001
+ var i2 = e$1(this);
4032
4002
  if (void 0 !== i2)
4033
4003
  i2.i = this.i;
4034
4004
  return this.v;
@@ -4159,7 +4129,7 @@ y.prototype.N = function() {
4159
4129
  Object.defineProperty(y.prototype, "value", { get: function() {
4160
4130
  if (1 & this.f)
4161
4131
  throw new Error("Cycle detected");
4162
- var i2 = e(this);
4132
+ var i2 = e$1(this);
4163
4133
  this.h();
4164
4134
  if (void 0 !== i2)
4165
4135
  i2.i = this.i;
@@ -4442,6 +4412,36 @@ function useSignal(n2) {
4442
4412
  return d$1(n2);
4443
4413
  }, []);
4444
4414
  }
4415
+ function e(e2, n2) {
4416
+ return n2 = n2 || {}, new Promise(function(t2, r2) {
4417
+ var s2 = new XMLHttpRequest(), o2 = [], u2 = {}, a2 = function e3() {
4418
+ return { ok: 2 == (s2.status / 100 | 0), statusText: s2.statusText, status: s2.status, url: s2.responseURL, text: function() {
4419
+ return Promise.resolve(s2.responseText);
4420
+ }, json: function() {
4421
+ return Promise.resolve(s2.responseText).then(JSON.parse);
4422
+ }, blob: function() {
4423
+ return Promise.resolve(new Blob([s2.response]));
4424
+ }, clone: e3, headers: { keys: function() {
4425
+ return o2;
4426
+ }, entries: function() {
4427
+ return o2.map(function(e4) {
4428
+ return [e4, s2.getResponseHeader(e4)];
4429
+ });
4430
+ }, get: function(e4) {
4431
+ return s2.getResponseHeader(e4);
4432
+ }, has: function(e4) {
4433
+ return null != s2.getResponseHeader(e4);
4434
+ } } };
4435
+ };
4436
+ for (var i2 in s2.open(n2.method || "get", e2, true), s2.onload = function() {
4437
+ s2.getAllResponseHeaders().toLowerCase().replace(/^(.+?):/gm, function(e3, n3) {
4438
+ u2[n3] || o2.push(u2[n3] = n3);
4439
+ }), t2(a2());
4440
+ }, s2.onerror = r2, s2.withCredentials = "include" == n2.credentials, n2.headers)
4441
+ s2.setRequestHeader(i2, n2.headers[i2]);
4442
+ s2.send(n2.body || null);
4443
+ });
4444
+ }
4445
4445
  var browser = {};
4446
4446
  var canPromise$1 = function() {
4447
4447
  return typeof Promise === "function" && Promise.prototype && Promise.prototype.then;
@@ -6440,7 +6440,7 @@ export {
6440
6440
  b$1 as b,
6441
6441
  browser,
6442
6442
  d$1 as d,
6443
- e$1 as e,
6443
+ e,
6444
6444
  h$1 as h,
6445
6445
  index,
6446
6446
  inputToRGB,
@@ -13,8 +13,13 @@ const deDE = {
13
13
  "dropIn.linePay.label": "LinePay",
14
14
  "dropIn.ninePay.label": "9Pay",
15
15
  "dropIn.gcash.label": "GCash",
16
- "dropIn.paymaya.label": "Paymaya",
16
+ "dropIn.paymaya.label": "Maya",
17
17
  "dropIn.zalopay.label": "Zalopay",
18
+ "dropIn.vietqr.label": "VietQR",
19
+ "dropIn.pix.label": "Pix",
20
+ "dropIn.picPay.label": "PicPay",
21
+ "dropIn.opayWallet.label": "OPay Wallet",
22
+ "dropIn.pagaWallet.label": "Paga Wallet",
18
23
  // card number
19
24
  "card.cardNumber.label": "Kartennummer",
20
25
  "card.cardNumber.incomplete": "Ihre Kartennummer ist unvollständig",
@@ -83,7 +88,8 @@ const deDE = {
83
88
  // qrCode
84
89
  "qrCode.expired": "Der QR-Code ist abgelaufen.",
85
90
  "qrCode.scanByGcash": "QR-Code mit GCash scannen",
86
- "qrCode.scanByZalopay": "QR-Code mit Zalopay scannen"
91
+ "qrCode.scanByZalopay": "QR-Code mit Zalopay scannen",
92
+ "qrCode.scanByVietqr": "QR-Code mit VietQR scannen"
87
93
  };
88
94
  export {
89
95
  deDE as default
@@ -13,8 +13,13 @@ const enGB = {
13
13
  "dropIn.linePay.label": "LinePay",
14
14
  "dropIn.ninePay.label": "9Pay",
15
15
  "dropIn.gcash.label": "GCash",
16
- "dropIn.paymaya.label": "Paymaya",
16
+ "dropIn.paymaya.label": "Maya",
17
17
  "dropIn.zalopay.label": "Zalopay",
18
+ "dropIn.vietqr.label": "VietQR",
19
+ "dropIn.pix.label": "Pix",
20
+ "dropIn.picPay.label": "PicPay",
21
+ "dropIn.opayWallet.label": "OPay Wallet",
22
+ "dropIn.pagaWallet.label": "Paga Wallet",
18
23
  // card number
19
24
  "card.cardNumber.label": "Card number",
20
25
  "card.cardNumber.incomplete": "Your card number is incomplete",
@@ -83,7 +88,8 @@ const enGB = {
83
88
  // qrCode
84
89
  "qrCode.expired": "The QR code has expired.",
85
90
  "qrCode.scanByGcash": "Scan QR code with GCash",
86
- "qrCode.scanByZalopay": "Scan QR code with Zalopay"
91
+ "qrCode.scanByZalopay": "Scan QR code with Zalopay",
92
+ "qrCode.scanByVietqr": "Scan QR code with VietQR"
87
93
  };
88
94
  export {
89
95
  enGB as default
@@ -13,8 +13,13 @@ const esES = {
13
13
  "dropIn.linePay.label": "LinePay",
14
14
  "dropIn.ninePay.label": "9Pay",
15
15
  "dropIn.gcash.label": "GCash",
16
- "dropIn.paymaya.label": "Paymaya",
16
+ "dropIn.paymaya.label": "Maya",
17
17
  "dropIn.zalopay.label": "Zalopay",
18
+ "dropIn.vietqr.label": "VietQR",
19
+ "dropIn.pix.label": "Pix",
20
+ "dropIn.picPay.label": "PicPay",
21
+ "dropIn.opayWallet.label": "OPay Wallet",
22
+ "dropIn.pagaWallet.label": "Paga Wallet",
18
23
  // card number
19
24
  "card.cardNumber.label": "Número de tarjeta",
20
25
  "card.cardNumber.incomplete": "Tu número de tarjeta está incompleto",
@@ -83,7 +88,8 @@ const esES = {
83
88
  // qrCode
84
89
  "qrCode.expired": "El código QR ha expirado.",
85
90
  "qrCode.scanByGcash": "Escanear el código QR con GCash",
86
- "qrCode.scanByZalopay": "Escanear el código QR con Zalopay"
91
+ "qrCode.scanByZalopay": "Escanear el código QR con Zalopay",
92
+ "qrCode.scanByVietqr": "Escanear el código QR con VietQR"
87
93
  };
88
94
  export {
89
95
  esES as default
@@ -13,8 +13,13 @@ const frFR = {
13
13
  "dropIn.linePay.label": "LinePay",
14
14
  "dropIn.ninePay.label": "9Pay",
15
15
  "dropIn.gcash.label": "GCash",
16
- "dropIn.paymaya.label": "Paymaya",
16
+ "dropIn.paymaya.label": "Maya",
17
17
  "dropIn.zalopay.label": "Zalopay",
18
+ "dropIn.vietqr.label": "VietQR",
19
+ "dropIn.pix.label": "Pix",
20
+ "dropIn.picPay.label": "PicPay",
21
+ "dropIn.opayWallet.label": "OPay Wallet",
22
+ "dropIn.pagaWallet.label": "Paga Wallet",
18
23
  // card number
19
24
  "card.cardNumber.label": "Numéro de carte",
20
25
  "card.cardNumber.incomplete": "Votre numéro de carte est incomplet",
@@ -83,7 +88,8 @@ const frFR = {
83
88
  // qrCode
84
89
  "qrCode.expired": "Le code QR a expiré.",
85
90
  "qrCode.scanByGcash": "Scanner le code QR avec GCash",
86
- "qrCode.scanByZalopay": "Scanner le code QR avec Zalopay"
91
+ "qrCode.scanByZalopay": "Scanner le code QR avec Zalopay",
92
+ "qrCode.scanByVietqr": "Scanner le code QR avec VietQR"
87
93
  };
88
94
  export {
89
95
  frFR as default
@@ -13,8 +13,13 @@ const jaJP = {
13
13
  "dropIn.linePay.label": "LinePay",
14
14
  "dropIn.ninePay.label": "9Pay",
15
15
  "dropIn.gcash.label": "GCash",
16
- "dropIn.paymaya.label": "Paymaya",
16
+ "dropIn.paymaya.label": "Maya",
17
17
  "dropIn.zalopay.label": "Zalopay",
18
+ "dropIn.vietqr.label": "VietQR",
19
+ "dropIn.pix.label": "Pix",
20
+ "dropIn.picPay.label": "PicPay",
21
+ "dropIn.opayWallet.label": "OPay Wallet",
22
+ "dropIn.pagaWallet.label": "Paga Wallet",
18
23
  // card number
19
24
  "card.cardNumber.label": "カード番号",
20
25
  "card.cardNumber.incomplete": "カード番号が不完全です",
@@ -83,7 +88,8 @@ const jaJP = {
83
88
  // qrCode
84
89
  "qrCode.expired": "QRコードが期限切れです。",
85
90
  "qrCode.scanByGcash": "Gcashでスキャン",
86
- "qrCode.scanByZalopay": "Zalopayでスキャン"
91
+ "qrCode.scanByZalopay": "Zalopayでスキャン",
92
+ "qrCode.scanByVietqr": "VietQRでスキャン"
87
93
  };
88
94
  export {
89
95
  jaJP as default
@@ -13,8 +13,13 @@ const koKR = {
13
13
  "dropIn.linePay.label": "LinePay",
14
14
  "dropIn.ninePay.label": "9Pay",
15
15
  "dropIn.gcash.label": "GCash",
16
- "dropIn.paymaya.label": "Paymaya",
16
+ "dropIn.paymaya.label": "Maya",
17
17
  "dropIn.zalopay.label": "Zalopay",
18
+ "dropIn.vietqr.label": "VietQR",
19
+ "dropIn.pix.label": "Pix",
20
+ "dropIn.picPay.label": "PicPay",
21
+ "dropIn.opayWallet.label": "OPay Wallet",
22
+ "dropIn.pagaWallet.label": "Paga Wallet",
18
23
  // card number
19
24
  "card.cardNumber.label": "카드 번호",
20
25
  "card.cardNumber.incomplete": "카드 번호가 불완전합니다",
@@ -83,7 +88,8 @@ const koKR = {
83
88
  // qrCode
84
89
  "qrCode.expired": "QR 코드가 만료되었습니다.",
85
90
  "qrCode.scanByGcash": "GCash 스캔",
86
- "qrCode.scanByZalopay": "Zalopay 스캔"
91
+ "qrCode.scanByZalopay": "Zalopay 스캔",
92
+ "qrCode.scanByVietqr": "VietQR 스캔"
87
93
  };
88
94
  export {
89
95
  koKR as default
@@ -13,8 +13,13 @@ const nlNL = {
13
13
  "dropIn.linePay.label": "LinePay",
14
14
  "dropIn.ninePay.label": "9Pay",
15
15
  "dropIn.gcash.label": "GCash",
16
- "dropIn.paymaya.label": "Paymaya",
16
+ "dropIn.paymaya.label": "Maya",
17
17
  "dropIn.zalopay.label": "Zalopay",
18
+ "dropIn.vietqr.label": "VietQR",
19
+ "dropIn.pix.label": "Pix",
20
+ "dropIn.picPay.label": "PicPay",
21
+ "dropIn.opayWallet.label": "OPay Wallet",
22
+ "dropIn.pagaWallet.label": "Paga Wallet",
18
23
  // card number
19
24
  "card.cardNumber.label": "Kaartnummer",
20
25
  "card.cardNumber.incomplete": "Uw kaartnummer is onvolledig",
@@ -83,7 +88,8 @@ const nlNL = {
83
88
  // qrCode
84
89
  "qrCode.expired": "De QR-code is verlopen.",
85
90
  "qrCode.scanByGcash": "Scan QR-code met GCash",
86
- "qrCode.scanByZalopay": "Scan QR-code met Zalopay"
91
+ "qrCode.scanByZalopay": "Scan QR-code met Zalopay",
92
+ "qrCode.scanByVietqr": "Scan QR-code met VietQR"
87
93
  };
88
94
  export {
89
95
  nlNL as default
@@ -13,8 +13,13 @@ const ptPT = {
13
13
  "dropIn.linePay.label": "LinePay",
14
14
  "dropIn.ninePay.label": "9Pay",
15
15
  "dropIn.gcash.label": "GCash",
16
- "dropIn.paymaya.label": "Paymaya",
16
+ "dropIn.paymaya.label": "Maya",
17
17
  "dropIn.zalopay.label": "Zalopay",
18
+ "dropIn.vietqr.label": "VietQR",
19
+ "dropIn.pix.label": "Pix",
20
+ "dropIn.picPay.label": "PicPay",
21
+ "dropIn.opayWallet.label": "OPay Wallet",
22
+ "dropIn.pagaWallet.label": "Paga Wallet",
18
23
  // card number
19
24
  "card.cardNumber.label": "Número do cartão",
20
25
  "card.cardNumber.incomplete": "O número do seu cartão está incompleto",
@@ -83,7 +88,8 @@ const ptPT = {
83
88
  // qrCode
84
89
  "qrCode.expired": "O código QR expirou.",
85
90
  "qrCode.scanByGcash": "Escaneie o código QR com GCash",
86
- "qrCode.scanByZalopay": "Escaneie o código QR com Zalopay"
91
+ "qrCode.scanByZalopay": "Escaneie o código QR com Zalopay",
92
+ "qrCode.scanByVietqr": "Escaneie o código QR com VietQR"
87
93
  };
88
94
  export {
89
95
  ptPT as default
@@ -13,8 +13,13 @@ const ruRU = {
13
13
  "dropIn.linePay.label": "LinePay",
14
14
  "dropIn.ninePay.label": "9Pay",
15
15
  "dropIn.gcash.label": "GCash",
16
- "dropIn.paymaya.label": "Paymaya",
16
+ "dropIn.paymaya.label": "Maya",
17
17
  "dropIn.zalopay.label": "Zalopay",
18
+ "dropIn.vietqr.label": "VietQR",
19
+ "dropIn.pix.label": "Pix",
20
+ "dropIn.picPay.label": "PicPay",
21
+ "dropIn.opayWallet.label": "OPay Wallet",
22
+ "dropIn.pagaWallet.label": "Paga Wallet",
18
23
  // card number
19
24
  "card.cardNumber.label": "Номер карты",
20
25
  "card.cardNumber.incomplete": "Ваш номер карты неполный",
@@ -83,7 +88,8 @@ const ruRU = {
83
88
  // qrCode
84
89
  "qrCode.expired": "Срок действия QR-кода истек.",
85
90
  "qrCode.scanByGcash": "Сканируйте QR-кодом с GCash",
86
- "qrCode.scanByZalopay": "Сканируйте QR-кодом с Zalopay"
91
+ "qrCode.scanByZalopay": "Сканируйте QR-кодом с Zalopay",
92
+ "qrCode.scanByVietqr": "Сканируйте QR-кодом с VietQR"
87
93
  };
88
94
  export {
89
95
  ruRU as default
@@ -1,7 +1,7 @@
1
1
  const zhCN = {
2
2
  // guide card
3
3
  "guideCard.redirectDescription": "提交后,您将被跳转到支付方式品牌方的页面,安全地完成后续步骤。",
4
- "guideCard.scanQRCode": "提交订单后,用{method}扫描二维码。",
4
+ "guideCard.scanQRCode": "提交订单后,用 {method} 扫描二维码。",
5
5
  // Drop In
6
6
  "dropIn.card.label": "银行卡",
7
7
  "dropIn.otherPaymentMethod": "其他支付方式",
@@ -13,8 +13,13 @@ const zhCN = {
13
13
  "dropIn.linePay.label": "LinePay",
14
14
  "dropIn.ninePay.label": "9Pay",
15
15
  "dropIn.gcash.label": "GCash",
16
- "dropIn.paymaya.label": "Paymaya",
16
+ "dropIn.paymaya.label": "Maya",
17
17
  "dropIn.zalopay.label": "Zalopay",
18
+ "dropIn.vietqr.label": "VietQR",
19
+ "dropIn.pix.label": "Pix",
20
+ "dropIn.picPay.label": "PicPay",
21
+ "dropIn.opayWallet.label": "OPay Wallet",
22
+ "dropIn.pagaWallet.label": "Paga Wallet",
18
23
  // card number
19
24
  "card.cardNumber.label": "卡号",
20
25
  "card.cardNumber.incomplete": "您的卡号不完整",
@@ -82,8 +87,9 @@ const zhCN = {
82
87
  "threeDS.returnToCheckout": "即将返回",
83
88
  // qrCode
84
89
  "qrCode.expired": "二维码过期",
85
- "qrCode.scanByGcash": "用Gcash扫码",
86
- "qrCode.scanByZalopay": "用Zalopay扫码"
90
+ "qrCode.scanByGcash": "用 Gcash 扫码",
91
+ "qrCode.scanByZalopay": "用 Zalopay 扫码",
92
+ "qrCode.scanByVietqr": "用 VietQR 扫码"
87
93
  };
88
94
  export {
89
95
  zhCN as default
@@ -1,7 +1,7 @@
1
1
  const zhHK = {
2
2
  // guide card
3
3
  "guideCard.redirectDescription": "提交後,您將被跳轉到支付方式品牌方的頁面,安全地完成後續步驟。",
4
- "guideCard.scanQRCode": "提交訂單後,用{method}掃描二維碼。",
4
+ "guideCard.scanQRCode": "提交訂單後,用 {method} 掃描二維碼。",
5
5
  // Drop In
6
6
  "dropIn.card.label": "銀行卡",
7
7
  "dropIn.otherPaymentMethod": "其他支付方式",
@@ -13,8 +13,13 @@ const zhHK = {
13
13
  "dropIn.linePay.label": "LinePay",
14
14
  "dropIn.ninePay.label": "9Pay",
15
15
  "dropIn.gcash.label": "GCash",
16
- "dropIn.paymaya.label": "Paymaya",
16
+ "dropIn.paymaya.label": "Maya",
17
17
  "dropIn.zalopay.label": "Zalopay",
18
+ "dropIn.vietqr.label": "VietQR",
19
+ "dropIn.pix.label": "Pix",
20
+ "dropIn.picPay.label": "PicPay",
21
+ "dropIn.opayWallet.label": "OPay Wallet",
22
+ "dropIn.pagaWallet.label": "Paga Wallet",
18
23
  // card number
19
24
  "card.cardNumber.label": "卡號",
20
25
  "card.cardNumber.incomplete": "您的卡號不完整",
@@ -82,8 +87,9 @@ const zhHK = {
82
87
  "threeDS.returnToCheckout": "即將返回",
83
88
  // qrCode
84
89
  "qrCode.expired": "二維碼過期",
85
- "qrCode.scanByGcash": "用Gcash掃碼",
86
- "qrCode.scanByZalopay": "用Zalopay掃碼"
90
+ "qrCode.scanByGcash": "用 Gcash 掃碼",
91
+ "qrCode.scanByZalopay": "用 Zalopay 掃碼",
92
+ "qrCode.scanByVietqr": "用 VietQR 掃碼"
87
93
  };
88
94
  export {
89
95
  zhHK as default
@@ -1,7 +1,7 @@
1
1
  const zhTW = {
2
2
  // guide card
3
3
  "guideCard.redirectDescription": "提交後,您將被跳轉到支付方式品牌方的頁面,安全地完成後續步驟。",
4
- "guideCard.scanQRCode": "提交訂單後,用{method}掃描二維碼。",
4
+ "guideCard.scanQRCode": "提交訂單後,用 {method} 掃描二維碼。",
5
5
  // Drop In
6
6
  "dropIn.card.label": "銀行卡",
7
7
  "dropIn.otherPaymentMethod": "其他支付方式",
@@ -13,8 +13,13 @@ const zhTW = {
13
13
  "dropIn.linePay.label": "LinePay",
14
14
  "dropIn.ninePay.label": "9Pay",
15
15
  "dropIn.gcash.label": "GCash",
16
- "dropIn.paymaya.label": "Paymaya",
16
+ "dropIn.paymaya.label": "Maya",
17
17
  "dropIn.zalopay.label": "Zalopay",
18
+ "dropIn.vietqr.label": "VietQR",
19
+ "dropIn.pix.label": "Pix",
20
+ "dropIn.picPay.label": "PicPay",
21
+ "dropIn.opayWallet.label": "OPay Wallet",
22
+ "dropIn.pagaWallet.label": "Paga Wallet",
18
23
  // card number
19
24
  "card.cardNumber.label": "卡號",
20
25
  "card.cardNumber.incomplete": "您的卡號不完整",
@@ -82,8 +87,9 @@ const zhTW = {
82
87
  "threeDS.returnToCheckout": "即將返回",
83
88
  // qrCode
84
89
  "qrCode.expired": "二維碼過期",
85
- "qrCode.scanByGcash": "用Gcash掃碼",
86
- "qrCode.scanByZalopay": "用Zalopay掃碼"
90
+ "qrCode.scanByGcash": "用 Gcash 掃碼",
91
+ "qrCode.scanByZalopay": "用 Zalopay 掃碼",
92
+ "qrCode.scanByVietqr": "用 VietQR 掃碼"
87
93
  };
88
94
  export {
89
95
  zhTW as default
package/dist/es/index.js CHANGED
@@ -28,24 +28,31 @@ import { ShopeePay } from "./components/ShopeePay/index.js";
28
28
  import { GCash } from "./components/wallets/GCash/GCash.js";
29
29
  import { Paymaya } from "./components/wallets/Paymaya/Paymaya.js";
30
30
  import { Zalopay } from "./components/wallets/Zalopay/Zalopay.js";
31
+ import { Vietqr } from "./components/wallets/Vietqr/Vietqr.js";
32
+ import { Pix } from "./components/wallets/Pix/Pix.js";
33
+ import { PicPay } from "./components/wallets/PicPay/PicPay.js";
34
+ import { PagaWallet } from "./components/wallets/PagaWallet/PagaWallet.js";
35
+ import { OpayWallet } from "./components/wallets/OpayWallet/OpayWallet.js";
31
36
  import "./core/context.js";
32
37
  import { create } from "./core/create.js";
33
38
  import { Session } from "./core/session.js";
34
39
  import { querySession } from "./core/query.js";
35
40
  import { PayKKaCheckout } from "./core/checkout.js";
36
41
  import { PayKKaError } from "./core/error.js";
37
- import { I18n } from "./i18n/I18n.js";
38
- import { LocaleKey } from "./i18n/locales/index.js";
39
- import { setApiUrl, setCDNUrl, setCustomLocale, setCustomReqHeaders, setFraudDetectionEnv } from "./config.js";
42
+ import { PaymentMethod } from "./constant.js";
40
43
  import "./utils/card-brand/brands.js";
41
44
  import { getFingerprint } from "./utils/system-info/finger-print.js";
42
45
  import "./utils/system-info/get-browser-info.js";
43
- import { PaymentMethod } from "./constant.js";
44
46
  import { CardBrandCode, EPayKKaEnv, defaultInputStyleConfig, inputStyleAttrs } from "./types/index.js";
45
47
  import { redirectToPayment } from "./utils/redirect.js";
48
+ import "./core.js";
49
+ import { I18n } from "./i18n/I18n.js";
50
+ import { LocaleKey } from "./i18n/locales/index.js";
51
+ import { FraudDetectionEventType } from "./types/event.js";
52
+ import { setApiUrl, setCDNUrl, setCustomLocale, setCustomReqHeaders, setFraudDetectionEnv } from "./config.js";
53
+ import "./api/http.js";
46
54
  import { ECollMode } from "./types/fraud-detection.js";
47
55
  import { MessageAction } from "./types/message.js";
48
- import { FraudDetectionEventType } from "./types/event.js";
49
56
  export {
50
57
  AliPay,
51
58
  ApplePay,
@@ -78,18 +85,23 @@ export {
78
85
  MayBankQRPay,
79
86
  MessageAction,
80
87
  NinePay,
88
+ OpayWallet,
89
+ PagaWallet,
81
90
  PayKKaCheckout,
82
91
  PayKKaEncryptedCard,
83
92
  PayKKaError,
84
93
  Paymaya,
85
94
  PaymentComponentMap,
86
95
  PaymentMethod,
96
+ PicPay,
97
+ Pix,
87
98
  SecuredIframe,
88
99
  Sepa,
89
100
  Session,
90
101
  ShopeePay,
91
102
  SubmitButton,
92
103
  TNGWallet,
104
+ Vietqr,
93
105
  WechatPay,
94
106
  Zalopay,
95
107
  create,