@paykka/card-checkout-ui 0.11.6 → 0.13.2

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 (217) hide show
  1. package/dist/card-checkout-ui.js +19 -19
  2. package/dist/card-checkout-ui.umd.cjs +19 -19
  3. package/dist/es/_commonjsHelpers.js +82 -1
  4. package/dist/es/api/index.js +1 -0
  5. package/dist/es/api/modules/address/index.js +9 -9
  6. package/dist/es/api/modules/ali-pay/index.js +10 -49
  7. package/dist/es/api/modules/apple-pay/index.js +13 -59
  8. package/dist/es/api/modules/boost/index.js +8 -48
  9. package/dist/es/api/modules/card/index.js +10 -54
  10. package/dist/es/api/modules/checkout/index.js +11 -9
  11. package/dist/es/api/modules/checkout/map.js +25 -18
  12. package/dist/es/api/modules/encrypted-card/index.js +3 -2
  13. package/dist/es/api/modules/gcash/index.js +8 -48
  14. package/dist/es/api/modules/get-browser-params.js +4 -1
  15. package/dist/es/api/modules/google-pay/index.js +10 -56
  16. package/dist/es/api/modules/grab-pay/index.js +8 -48
  17. package/dist/es/api/modules/index.js +1 -0
  18. package/dist/es/api/modules/line-pay/index.js +8 -48
  19. package/dist/es/api/modules/map.js +17 -11
  20. package/dist/es/api/modules/may-bank-qr-pay/index.js +8 -48
  21. package/dist/es/api/modules/nine-pay/index.js +8 -48
  22. package/dist/es/api/modules/paymaya/index.js +8 -48
  23. package/dist/es/api/modules/risk/index.js +2 -1
  24. package/dist/es/api/modules/sepa/index.js +10 -51
  25. package/dist/es/api/modules/shopee-pay/index.js +8 -48
  26. package/dist/es/api/modules/threeDS/index.js +3 -0
  27. package/dist/es/api/modules/tng-wallet/index.js +8 -48
  28. package/dist/es/api/modules/wechat-pay/index.js +10 -51
  29. package/dist/es/api/modules/zalopay/index.js +16 -0
  30. package/dist/es/api/utils/index.js +59 -0
  31. package/dist/es/components/AddressField/index.js +37 -37
  32. package/dist/es/components/AliPay/index.js +158 -111
  33. package/dist/es/components/ApplePay/index.js +99 -67
  34. package/dist/es/components/Boost/index.js +91 -70
  35. package/dist/es/components/Card/index.js +114 -107
  36. package/dist/es/components/CardSelector/index.js +1 -1
  37. package/dist/es/components/DropIn/index.js +12 -4
  38. package/dist/es/components/EncryptedCard/index.js +6 -2
  39. package/dist/es/components/GooglePay/index.js +94 -60
  40. package/dist/es/components/GrabPay/index.js +91 -70
  41. package/dist/es/components/GuideCard/index.js +10 -7
  42. package/dist/es/components/LinePay/index.js +91 -70
  43. package/dist/es/components/MayBankQRPay/index.js +302 -275
  44. package/dist/es/components/NinePay/index.js +91 -70
  45. package/dist/es/components/SecuredFieldsProvider/index.js +26 -9
  46. package/dist/es/components/SecuredIframe/index.js +40 -61
  47. package/dist/es/components/Sepa/index.js +72 -53
  48. package/dist/es/components/ShopeePay/index.js +91 -70
  49. package/dist/es/components/SubmitButton/index.js +8 -7
  50. package/dist/es/components/TNGWallet/index.js +91 -70
  51. package/dist/es/components/ThreeDS/index.js +32 -7
  52. package/dist/es/components/WechatPay/index.js +151 -102
  53. package/dist/es/components/business/QRCodeModal/QRCodeModal.js +26 -6
  54. package/dist/es/components/index.js +1 -0
  55. package/dist/es/components/internal/Form/FormItem.js +1 -1
  56. package/dist/es/components/internal/Form/util.js +1 -1
  57. package/dist/es/components/internal/Modal/Modal.js +1 -1
  58. package/dist/es/components/internal/Select/Select.js +19 -8
  59. package/dist/es/components/internal/Select/SelectMenu.js +2 -2
  60. package/dist/es/components/internal/Select/SelectMenuItem.js +12 -4
  61. package/dist/es/components/internal/icons/IconError.js +7 -4
  62. package/dist/es/components/internal/icons/IconZalopay.js +47 -0
  63. package/dist/es/components/internal/icons/IconZalopayComplete.js +48 -0
  64. package/dist/es/components/wallets/GCash/GCash.js +80 -56
  65. package/dist/es/components/wallets/Paymaya/Paymaya.js +91 -70
  66. package/dist/es/components/wallets/Zalopay/Zalopay.js +381 -0
  67. package/dist/es/components/wallets/Zalopay/index.js +1 -0
  68. package/dist/es/components/wallets/Zalopay/type.js +1 -0
  69. package/dist/es/components/wallets/Zalopay/zalopay2.js +1 -0
  70. package/dist/es/config.js +5 -5
  71. package/dist/es/constant.js +8 -2
  72. package/dist/es/core/{Address.js → address.js} +8 -16
  73. package/dist/es/core/{PayKKaCheckout.js → checkout.js} +101 -27
  74. package/dist/es/core/create.js +1 -1
  75. package/dist/es/core/query.js +3 -2
  76. package/dist/es/core/{Session.js → session.js} +28 -32
  77. package/dist/es/core/theme.js +65 -0
  78. package/dist/es/core.js +0 -4
  79. package/dist/es/hooks/usePayment.js +14 -0
  80. package/dist/es/i18n/locales/de-DE.js +3 -1
  81. package/dist/es/i18n/locales/en-GB.js +3 -1
  82. package/dist/es/i18n/locales/es-ES.js +3 -1
  83. package/dist/es/i18n/locales/fr-FR.js +3 -1
  84. package/dist/es/i18n/locales/ja-JP.js +3 -1
  85. package/dist/es/i18n/locales/ko-KR.js +3 -1
  86. package/dist/es/i18n/locales/nl-NL.js +3 -1
  87. package/dist/es/i18n/locales/pt-PT.js +3 -1
  88. package/dist/es/i18n/locales/ru-RU.js +3 -1
  89. package/dist/es/i18n/locales/zh-CN.js +3 -1
  90. package/dist/es/i18n/locales/zh-HK.js +3 -1
  91. package/dist/es/i18n/locales/zh-TW.js +3 -1
  92. package/dist/es/index.js +21 -7
  93. package/dist/es/style.css +1 -1
  94. package/dist/es/types/index.js +7 -0
  95. package/dist/es/utils/colors.js +5 -1
  96. package/dist/es/utils/format.js +0 -5
  97. package/dist/es/utils/object.js +31 -1
  98. package/dist/es/utils/payment.js +82 -0
  99. package/dist/es/utils/redirect.js +4 -4
  100. package/dist/es/utils/string.js +10 -0
  101. package/dist/es/utils/system-info/is-ua-webview.js +14 -12
  102. package/dist/es/utils/theme.js +7 -0
  103. package/dist/style.css +1 -1
  104. package/dist/types/api/modules/address/index.d.ts +15 -6
  105. package/dist/types/api/modules/ali-pay/index.d.ts +3 -19
  106. package/dist/types/api/modules/apple-pay/index.d.ts +4 -14
  107. package/dist/types/api/modules/boost/index.d.ts +3 -23
  108. package/dist/types/api/modules/card/index.d.ts +3 -30
  109. package/dist/types/api/modules/checkout/index.d.ts +3 -3
  110. package/dist/types/api/modules/checkout/map.d.ts +3 -3
  111. package/dist/types/api/modules/checkout/type.d.ts +33 -4
  112. package/dist/types/api/modules/gcash/index.d.ts +3 -23
  113. package/dist/types/api/modules/get-browser-params.d.ts +1 -0
  114. package/dist/types/api/modules/google-pay/index.d.ts +3 -13
  115. package/dist/types/api/modules/grab-pay/index.d.ts +3 -23
  116. package/dist/types/api/modules/index.d.ts +1 -0
  117. package/dist/types/api/modules/line-pay/index.d.ts +3 -23
  118. package/dist/types/api/modules/map.d.ts +2 -2
  119. package/dist/types/api/modules/may-bank-qr-pay/index.d.ts +3 -23
  120. package/dist/types/api/modules/nine-pay/index.d.ts +3 -23
  121. package/dist/types/api/modules/paymaya/index.d.ts +3 -23
  122. package/dist/types/api/modules/sepa/index.d.ts +3 -24
  123. package/dist/types/api/modules/shopee-pay/index.d.ts +3 -23
  124. package/dist/types/api/modules/tng-wallet/index.d.ts +3 -23
  125. package/dist/types/api/modules/type.d.ts +74 -21
  126. package/dist/types/api/modules/wechat-pay/index.d.ts +3 -20
  127. package/dist/types/api/modules/zalopay/index.d.ts +4 -0
  128. package/dist/types/api/utils/index.d.ts +48 -0
  129. package/dist/types/components/AddressField/type.d.ts +3 -9
  130. package/dist/types/components/AliPay/AliPay.d.ts +6 -2
  131. package/dist/types/components/AliPay/type.d.ts +15 -2
  132. package/dist/types/components/ApplePay/ApplePay.d.ts +6 -2
  133. package/dist/types/components/ApplePay/type.d.ts +10 -14
  134. package/dist/types/components/ApplePay/utils.d.ts +1 -1
  135. package/dist/types/components/Boost/Boost.d.ts +6 -2
  136. package/dist/types/components/Boost/type.d.ts +2 -24
  137. package/dist/types/components/Card/Card.d.ts +6 -2
  138. package/dist/types/components/Card/type.d.ts +3 -43
  139. package/dist/types/components/DropIn/DropIn.d.ts +6 -2
  140. package/dist/types/components/DropIn/type.d.ts +4 -10
  141. package/dist/types/components/GooglePay/GooglePay.d.ts +6 -2
  142. package/dist/types/components/GooglePay/createGooglePay.d.ts +2 -1
  143. package/dist/types/components/GooglePay/type.d.ts +10 -26
  144. package/dist/types/components/GrabPay/GrabPay.d.ts +6 -2
  145. package/dist/types/components/GrabPay/type.d.ts +3 -25
  146. package/dist/types/components/LinePay/LinePay.d.ts +6 -2
  147. package/dist/types/components/LinePay/type.d.ts +3 -25
  148. package/dist/types/components/MayBankQRPay/MayBankQRPay.d.ts +6 -2
  149. package/dist/types/components/MayBankQRPay/type.d.ts +3 -25
  150. package/dist/types/components/NinePay/NinePay.d.ts +6 -2
  151. package/dist/types/components/NinePay/type.d.ts +3 -25
  152. package/dist/types/components/SecuredFieldsProvider/type.d.ts +5 -0
  153. package/dist/types/components/SecuredIframe/HiddenIframe.d.ts +3 -1
  154. package/dist/types/components/Sepa/Sepa.d.ts +6 -2
  155. package/dist/types/components/Sepa/type.d.ts +3 -2
  156. package/dist/types/components/ShopeePay/ShopeePay.d.ts +6 -2
  157. package/dist/types/components/ShopeePay/type.d.ts +3 -25
  158. package/dist/types/components/TNGWallet/TNGWallet.d.ts +6 -2
  159. package/dist/types/components/TNGWallet/type.d.ts +3 -25
  160. package/dist/types/components/ThreeDS/components/ThreeDSAuth/type.d.ts +2 -0
  161. package/dist/types/components/WechatPay/WechatPay.d.ts +6 -2
  162. package/dist/types/components/WechatPay/type.d.ts +15 -2
  163. package/dist/types/components/business/QRCodeModal/type.d.ts +2 -0
  164. package/dist/types/components/index.d.ts +1 -0
  165. package/dist/types/components/internal/Loading/Loading.d.ts +1 -0
  166. package/dist/types/components/internal/Select/SelectMenu.d.ts +1 -1
  167. package/dist/types/components/internal/icons/IconZalopay.d.ts +2 -0
  168. package/dist/types/components/internal/icons/IconZalopayComplete.d.ts +2 -0
  169. package/dist/types/components/internal/icons/index.d.ts +3 -0
  170. package/dist/types/components/wallets/GCash/GCash.d.ts +6 -2
  171. package/dist/types/components/wallets/GCash/type.d.ts +3 -35
  172. package/dist/types/components/wallets/Paymaya/Paymaya.d.ts +6 -2
  173. package/dist/types/components/wallets/Paymaya/type.d.ts +3 -25
  174. package/dist/types/components/wallets/Zalopay/Zalopay.d.ts +10 -0
  175. package/dist/types/components/wallets/Zalopay/index.d.ts +2 -0
  176. package/dist/types/components/wallets/Zalopay/type.d.ts +39 -0
  177. package/dist/types/config.d.ts +2 -4
  178. package/dist/types/constant.d.ts +3 -1
  179. package/dist/types/core/{Address.d.ts → address.d.ts} +23 -24
  180. package/dist/types/core/{PayKKaCheckout.d.ts → checkout.d.ts} +9 -3
  181. package/dist/types/core/context.d.ts +3 -2
  182. package/dist/types/core/index.d.ts +3 -2
  183. package/dist/types/core/query.d.ts +2 -2
  184. package/dist/types/core/session.d.ts +23 -0
  185. package/dist/types/core/theme.d.ts +7 -0
  186. package/dist/types/hooks/index.d.ts +1 -0
  187. package/dist/types/hooks/usePayment.d.ts +8 -0
  188. package/dist/types/i18n/locales/de-DE.d.ts +2 -0
  189. package/dist/types/i18n/locales/en-GB.d.ts +2 -0
  190. package/dist/types/i18n/locales/es-ES.d.ts +2 -0
  191. package/dist/types/i18n/locales/fr-FR.d.ts +2 -0
  192. package/dist/types/i18n/locales/ja-JP.d.ts +2 -0
  193. package/dist/types/i18n/locales/ko-KR.d.ts +2 -0
  194. package/dist/types/i18n/locales/nl-NL.d.ts +2 -0
  195. package/dist/types/i18n/locales/pt-PT.d.ts +2 -0
  196. package/dist/types/i18n/locales/ru-RU.d.ts +2 -0
  197. package/dist/types/i18n/locales/zh-CN.d.ts +2 -0
  198. package/dist/types/i18n/locales/zh-HK.d.ts +2 -0
  199. package/dist/types/i18n/locales/zh-TW.d.ts +2 -0
  200. package/dist/types/index.d.ts +2 -1
  201. package/dist/types/types/index.d.ts +70 -32
  202. package/dist/types/types/message.d.ts +30 -25
  203. package/dist/types/utils/card-brand/index.d.ts +3 -3
  204. package/dist/types/utils/colors.d.ts +1 -0
  205. package/dist/types/utils/index.d.ts +4 -2
  206. package/dist/types/utils/object.d.ts +7 -0
  207. package/dist/types/utils/payment.d.ts +37 -0
  208. package/dist/types/utils/string.d.ts +1 -0
  209. package/dist/types/utils/style.d.ts +1 -1
  210. package/dist/types/utils/system-info/is-ua-webview.d.ts +1 -1
  211. package/dist/types/utils/theme.d.ts +4 -0
  212. package/package.json +3 -3
  213. package/dist/es/utils/deep-freeze.js +0 -13
  214. package/dist/es/utils/obj.js +0 -22
  215. package/dist/types/core/Session.d.ts +0 -16
  216. package/dist/types/utils/deep-freeze.d.ts +0 -1
  217. package/dist/types/utils/obj.d.ts +0 -6
@@ -1,18 +1,19 @@
1
- import { w, A, F, h, y, q, u } from "../../core.js";
1
+ import { w, A, F, h, y, q, u, b } from "../../core.js";
2
2
  import { isTimeoutError } from "../../api/http.js";
3
- import { COMMON_CLASS_NAME, PaymentType } from "../../constant.js";
4
3
  import "../../utils/card-brand/brands.js";
5
4
  import "../../utils/system-info/get-browser-info.js";
6
- import { cssVarPrefix, normalizedClass, formatAmount } from "../../utils/format.js";
5
+ import { normalizedClass, formatAmount } from "../../utils/format.js";
6
+ import { formatPaymentResult } from "../../utils/payment.js";
7
+ import { getBrowserParams } from "../../api/modules/get-browser-params.js";
8
+ import { COMMON_CLASS_NAME, PaymentType, PaymentMethod, SessionMode } from "../../constant.js";
7
9
  import { getWechatPayInfo, wechatPay } from "../../api/modules/wechat-pay/index.js";
8
10
  import { CoreContext } from "../../core/context.js";
9
11
  import { PayKKaError } from "../../core/error.js";
10
- import { createAddressCore } from "../../core/Address.js";
11
12
  import { useBEM } from "../../hooks/useBEM.js";
12
13
  import { usePayState } from "../../hooks/usePayState.js";
13
14
  import { useRetry } from "../../hooks/useRetry.js";
14
15
  import { AddressField } from "../AddressField/index.js";
15
- import { EmailField, createEmailCore } from "../EmailField/EmailField.js";
16
+ import { createEmailCore, EmailField } from "../EmailField/EmailField.js";
16
17
  import "../internal/Form/type.js";
17
18
  import "../internal/Form/context.js";
18
19
  import "../internal/Form/FormItem.js";
@@ -21,10 +22,11 @@ import { Info } from "../internal/Info/Info.js";
21
22
  import { RecurringTip } from "../RecurringTip/index.js";
22
23
  import { SubmitButton } from "../SubmitButton/index.js";
23
24
  const { bem } = useBEM("wechat-pay");
25
+ const fieldClassNames = bem("field");
24
26
  const WechatPay = w((props, ref) => {
25
- var _a, _b, _c, _d, _e, _f, _g, _h, _i;
26
- const { session } = props;
27
- const addressState = createAddressCore();
27
+ var _a;
28
+ const { session, core, showEmail = false, showAddress = false } = props;
29
+ const addressCore = core.getAddressCore();
28
30
  const emailState = createEmailCore();
29
31
  const emailFieldRef = A(null);
30
32
  F(ref, () => ({
@@ -40,13 +42,21 @@ const WechatPay = w((props, ref) => {
40
42
  },
41
43
  updateAddress: () => {
42
44
  var _a2;
43
- setForm(Object.assign(form, { address: addressState.getAddressState() }));
44
- (_a2 = addressFieldRef.current) == null ? void 0 : _a2.update(addressState.getAddressState());
45
+ if (!(fieldStatus == null ? void 0 : fieldStatus.address.show))
46
+ return;
47
+ const newForm = Object.assign(form, { address: addressCore.getAddressState() });
48
+ setForm(newForm);
49
+ (_a2 = addressFieldRef.current) == null ? void 0 : _a2.update(addressCore.getAddressState());
50
+ validateForm();
45
51
  },
46
52
  updateEmail: () => {
47
53
  var _a2;
48
- setForm(Object.assign(form, { email: emailState.email }));
54
+ if (!(fieldStatus == null ? void 0 : fieldStatus.email.show))
55
+ return;
56
+ const newForm = Object.assign(form, { email: emailState.email });
57
+ setForm(newForm);
49
58
  (_a2 = emailFieldRef.current) == null ? void 0 : _a2.update(emailState.email);
59
+ validateForm();
50
60
  }
51
61
  }));
52
62
  const { setErrorMsg, i18n, errorMsg, sessionReady } = usePayState(session, props.core);
@@ -55,19 +65,19 @@ const WechatPay = w((props, ref) => {
55
65
  const [form, setForm] = h({
56
66
  email: "",
57
67
  address: {
58
- country: "",
59
- province: "",
60
- city: "",
61
- area: "",
62
- postCode: "",
63
- address1: "",
64
- address2: ""
68
+ country: void 0,
69
+ province: void 0,
70
+ city: void 0,
71
+ area: void 0,
72
+ postCode: void 0,
73
+ address1: void 0,
74
+ address2: void 0
65
75
  }
66
76
  });
67
77
  const [validated, setValidated] = h(false);
68
- const disabledEmail = A(false);
69
- const [requiredBill, setRequiredBill] = h(false);
78
+ const [fieldStatus, setFieldStatus] = h();
70
79
  const addressFieldRef = A(null);
80
+ const [isCheckoutEnabled, setIsCheckoutEnabled] = h(false);
71
81
  function validateForm() {
72
82
  var _a2;
73
83
  (_a2 = formRef.current) == null ? void 0 : _a2.validate(void 0, false).then(() => {
@@ -76,23 +86,46 @@ const WechatPay = w((props, ref) => {
76
86
  setValidated(false);
77
87
  });
78
88
  }
89
+ const initFieldStatus = () => {
90
+ const { field, sessionMode } = session.checkout;
91
+ const { email, address } = field;
92
+ if (sessionMode === SessionMode.COMPONENT) {
93
+ if (email.disabled) {
94
+ email.show = showEmail;
95
+ }
96
+ if (showAddress && !(address == null ? void 0 : address.show)) {
97
+ address.show = true;
98
+ }
99
+ }
100
+ setFieldStatus({ ...field });
101
+ };
79
102
  y(() => {
80
103
  validateForm();
81
104
  }, [form]);
105
+ const processOnSuccess = (res) => {
106
+ var _a2, _b;
107
+ setSubmitButtonStatus("success");
108
+ (_b = props.onSuccess) == null ? void 0 : _b.call(
109
+ props,
110
+ formatPaymentResult({
111
+ ...res,
112
+ returnUrl: (_a2 = session == null ? void 0 : session.checkout) == null ? void 0 : _a2.returnUrl
113
+ })
114
+ );
115
+ };
82
116
  y(() => {
83
- var _a2;
84
- if (sessionReady) {
85
- if ((session == null ? void 0 : session.checkout.status) === "SUCCESS") {
86
- setSubmitButtonStatus("success");
87
- (_a2 = props.onSuccess) == null ? void 0 : _a2.call(props);
88
- }
89
- form.email = (session == null ? void 0 : session.checkout.bill.email) ?? "";
90
- disabledEmail.current = !!(session == null ? void 0 : session.checkout.bill.email);
91
- (session == null ? void 0 : session.checkout.bill.billingAddressCollection) === "REQUIRED" ? setRequiredBill(true) : setRequiredBill(false);
92
- !requiredBill && setTimeout(() => {
93
- validateForm();
94
- }, 100);
117
+ if (!sessionReady) {
118
+ return;
119
+ }
120
+ const { bill = {}, supportMethods = [], country } = (session == null ? void 0 : session.checkout) || {};
121
+ if (!supportMethods.includes(PaymentMethod.WECHAT_PAY)) {
122
+ return;
95
123
  }
124
+ initFieldStatus();
125
+ setIsCheckoutEnabled(true);
126
+ country && addressCore.setCountry(country);
127
+ form.email = bill.email ?? "";
128
+ form.address.country = country;
96
129
  }, [sessionReady]);
97
130
  const onTimeout = q(
98
131
  (message) => {
@@ -110,68 +143,82 @@ const WechatPay = w((props, ref) => {
110
143
  onTimeout: () => onTimeout(i18n.get("common.queryTimeout"))
111
144
  }
112
145
  );
146
+ const getPaymentParams = async () => {
147
+ var _a2;
148
+ return {
149
+ sessionId: session.sessionId,
150
+ clientKey: session.clientKey,
151
+ bill: (fieldStatus == null ? void 0 : fieldStatus.address.show) ? {
152
+ email: form.email,
153
+ addressLine1: form.address.address1,
154
+ addressLine2: form.address.address2,
155
+ postalCode: form.address.postCode,
156
+ country: form.address.country,
157
+ district: form.address.area,
158
+ state: form.address.province ? addressCore.getLabel(form.address.province, addressCore.getProvinceOption()) ?? form.address.province : void 0,
159
+ city: form.address.city ? addressCore.getLabel(form.address.city, addressCore.getCityOptions()) ?? form.address.city : void 0
160
+ } : {
161
+ email: form.email
162
+ },
163
+ channelUserId: await ((_a2 = props.onGetOpenId) == null ? void 0 : _a2.call(props)),
164
+ payment: {
165
+ paymentMethod: PaymentMethod.WECHAT_PAY
166
+ },
167
+ browser: await getBrowserParams()
168
+ };
169
+ };
113
170
  async function pay(search = false, timeout) {
114
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2;
171
+ var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j;
115
172
  try {
116
- const res = search ? await getWechatPayInfo(
117
- {
118
- sessionId: session.sessionId,
119
- clientKey: session.clientKey
120
- },
121
- { locale: i18n.locale, timeout }
122
- ) : await wechatPay(
123
- {
124
- sessionId: session.sessionId,
125
- clientKey: session.clientKey,
126
- bill: requiredBill ? {
127
- email: form.email,
128
- ...form.address,
129
- province: addressState.getLabel(
130
- form.address.province,
131
- addressState.getProvinceOption()
132
- ) ?? form.address.province,
133
- city: addressState.getLabel(form.address.city, addressState.getCityOptions()) ?? form.address.city
134
- } : {
135
- email: form.email
173
+ const requestOptions = { locale: i18n.locale, timeout };
174
+ let res = null;
175
+ if (search) {
176
+ const extraParams = (_b = (_a2 = core.config)._getExtraParams) == null ? void 0 : _b.call(_a2, "query", PaymentMethod.WECHAT_PAY);
177
+ res = await getWechatPayInfo(
178
+ {
179
+ sessionId: session.sessionId,
180
+ clientKey: session.clientKey,
181
+ paymentMethod: PaymentMethod.WECHAT_PAY
136
182
  },
137
- channelUserId: await ((_a2 = props.onGetOpenId) == null ? void 0 : _a2.call(props))
138
- },
139
- props.core,
140
- { locale: i18n.locale, timeout }
141
- );
142
- const { status, orderStatus, errorMessage, payInfo, errorCode } = res;
143
- !search && ((_b2 = props.onSubmitResponse) == null ? void 0 : _b2.call(props, res));
183
+ extraParams,
184
+ requestOptions
185
+ );
186
+ } else {
187
+ const extraParams = (_d = (_c = core.config)._getExtraParams) == null ? void 0 : _d.call(_c, "payment", PaymentMethod.WECHAT_PAY);
188
+ res = await wechatPay(await getPaymentParams(), extraParams, requestOptions);
189
+ }
190
+ const { status, orderStatus, errorMessage, payInfo, errorCode, sessionId } = res;
191
+ sessionId && (session.sessionId = sessionId);
192
+ !search && ((_e = props.onSubmitResponse) == null ? void 0 : _e.call(props, res));
144
193
  if (status === "PROCESSING") {
145
194
  if (!orderStatus) {
146
195
  setSubmitButtonStatus("unSubmit");
147
196
  return { end: true };
148
197
  } else if (orderStatus === "SUCCESS") {
149
- setSubmitButtonStatus("success");
150
- (_c2 = props.onSuccess) == null ? void 0 : _c2.call(props);
198
+ processOnSuccess(res);
151
199
  return { end: true };
152
200
  } else if (orderStatus === "FAILURE") {
153
- setErrorMsg(errorMessage);
201
+ errorMessage && setErrorMsg(errorMessage);
154
202
  setSubmitButtonStatus("unSubmit");
155
- (_d2 = props.onError) == null ? void 0 : _d2.call(props, new PayKKaError("API_ERROR", errorMessage, { code: errorCode }));
203
+ (_f = props.onError) == null ? void 0 : _f.call(props, new PayKKaError("API_ERROR", errorMessage, { code: errorCode }));
156
204
  return { end: true };
157
205
  } else if (orderStatus === "PROCESSING") {
158
206
  if (!search) {
159
- await ((_e2 = props.onCallWxPayBox) == null ? void 0 : _e2.call(props, payInfo));
207
+ await ((_g = props.onCallWxPayBox) == null ? void 0 : _g.call(props, payInfo));
160
208
  startReFetchPayInfo();
161
209
  }
162
210
  return { end: false };
163
211
  } else if (orderStatus === "CANCELED") {
164
212
  setSubmitButtonStatus("unSubmit");
165
- (_f2 = props.onTimeout) == null ? void 0 : _f2.call(props, "channel");
213
+ (_h = props.onTimeout) == null ? void 0 : _h.call(props, "channel");
166
214
  return { end: true };
167
215
  }
168
216
  } else if (status === "SUCCESS") {
169
- setSubmitButtonStatus("success");
170
- (_g2 = props.onSuccess) == null ? void 0 : _g2.call(props);
217
+ processOnSuccess(res);
171
218
  return { end: true };
172
219
  } else if (status === "EXPIRED") {
173
220
  setSubmitButtonStatus("unSubmit");
174
- (_h2 = props.onExpired) == null ? void 0 : _h2.call(props);
221
+ (_i = props.onExpired) == null ? void 0 : _i.call(props);
175
222
  return { end: true };
176
223
  }
177
224
  setSubmitButtonStatus("unSubmit");
@@ -186,8 +233,8 @@ const WechatPay = w((props, ref) => {
186
233
  }
187
234
  } else {
188
235
  const message = error.i18nKey ? i18n.get(error.i18nKey) : error.message;
189
- setErrorMsg(message);
190
- (_i2 = props.onError) == null ? void 0 : _i2.call(props, new PayKKaError("API_ERROR", message, { code: error.code, cause: error }));
236
+ message && setErrorMsg(message);
237
+ (_j = props.onError) == null ? void 0 : _j.call(props, new PayKKaError("API_ERROR", message, { code: error.code, cause: error }));
191
238
  setSubmitButtonStatus("unSubmit");
192
239
  return { end: true };
193
240
  }
@@ -198,7 +245,7 @@ const WechatPay = w((props, ref) => {
198
245
  setErrorMsg("");
199
246
  (_a2 = formRef.current) == null ? void 0 : _a2.validate(async (errors) => {
200
247
  var _a3;
201
- requiredBill && addressState.setValidateAllFields(true);
248
+ (fieldStatus == null ? void 0 : fieldStatus.address.show) && addressCore.setValidateAllFields(true);
202
249
  (_a3 = props.onSubmit) == null ? void 0 : _a3.call(props, errors);
203
250
  if (errors) {
204
251
  setSubmitButtonStatus("unSubmit");
@@ -232,43 +279,45 @@ const WechatPay = w((props, ref) => {
232
279
  formRef.current = dom;
233
280
  dom && validateForm();
234
281
  };
235
- const formStyle = {
236
- [cssVarPrefix("button-bg-color")]: (_a = session == null ? void 0 : session.colors) == null ? void 0 : _a.primary,
237
- [cssVarPrefix("button-bg-color-hover")]: (_b = session == null ? void 0 : session.colors) == null ? void 0 : _b.primaryHover,
238
- [cssVarPrefix("button-bg-color-active")]: (_c = session == null ? void 0 : session.colors) == null ? void 0 : _c.primaryActive,
239
- [cssVarPrefix("button-text-color")]: (_e = (_d = session == null ? void 0 : session.checkout) == null ? void 0 : _d.theme) == null ? void 0 : _e.payButtonTextColor,
240
- [cssVarPrefix("input-color")]: (_f = session == null ? void 0 : session.colors) == null ? void 0 : _f.primary
282
+ const Email = () => {
283
+ return /* @__PURE__ */ u(b, { children: (fieldStatus == null ? void 0 : fieldStatus.email.show) && /* @__PURE__ */ u("div", { className: fieldClassNames, children: /* @__PURE__ */ u(
284
+ EmailField,
285
+ {
286
+ ref: emailFieldRef,
287
+ value: form.email,
288
+ disabled: fieldStatus == null ? void 0 : fieldStatus.email.disabled
289
+ }
290
+ ) }) });
291
+ };
292
+ const Address = () => {
293
+ var _a2, _b;
294
+ return /* @__PURE__ */ u(b, { children: (fieldStatus == null ? void 0 : fieldStatus.address.show) && /* @__PURE__ */ u("div", { className: fieldClassNames, children: /* @__PURE__ */ u(
295
+ AddressField,
296
+ {
297
+ ref: addressFieldRef,
298
+ value: form.address,
299
+ country: ((_a2 = session == null ? void 0 : session.checkout) == null ? void 0 : _a2.country) || ((_b = session == null ? void 0 : session.checkout) == null ? void 0 : _b.bill.country),
300
+ onAddressChange: (value) => setForm(Object.assign(form, { address: value }))
301
+ }
302
+ ) }) });
241
303
  };
242
304
  return /* @__PURE__ */ u(
243
305
  CoreContext.Provider,
244
306
  {
245
307
  value: {
246
308
  i18n,
247
- session
309
+ session,
310
+ core
248
311
  },
249
- children: sessionReady && i18n.ready.value && /* @__PURE__ */ u(Form, { form, ref: setFormRef, onFormChange: (form2) => setForm(form2), children: /* @__PURE__ */ u("div", { className: normalizedClass(COMMON_CLASS_NAME, bem()), style: formStyle, children: [
250
- /* @__PURE__ */ u(
251
- EmailField,
252
- {
253
- ref: emailFieldRef,
254
- className: bem("email"),
255
- value: form.email,
256
- disabled: !!disabledEmail.current
257
- }
258
- ),
259
- requiredBill && /* @__PURE__ */ u(
260
- AddressField,
261
- {
262
- ref: addressFieldRef,
263
- value: form.address,
264
- country: ((_g = session == null ? void 0 : session.checkout) == null ? void 0 : _g.country) || ((_h = session == null ? void 0 : session.checkout) == null ? void 0 : _h.bill.country),
265
- onAddressChange: (value) => setForm(Object.assign(form, { address: value }))
266
- }
267
- ),
268
- ((_i = session == null ? void 0 : session.checkout) == null ? void 0 : _i.paymentType) === PaymentType.RECURRING && RecurringTip(),
269
- !!errorMsg && /* @__PURE__ */ u(Info, { className: bem("error"), content: errorMsg }),
270
- Button()
271
- ] }) })
312
+ children: isCheckoutEnabled && i18n.ready.value && /* @__PURE__ */ u("div", { className: core.theme.className, children: /* @__PURE__ */ u(Form, { form, ref: setFormRef, onFormChange: (form2) => setForm(form2), children: /* @__PURE__ */ u("div", { className: normalizedClass(COMMON_CLASS_NAME, bem()), children: [
313
+ Email(),
314
+ Address(),
315
+ ((_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.paymentType) === PaymentType.RECURRING && RecurringTip(),
316
+ /* @__PURE__ */ u("div", { className: bem("footer-wrapper"), children: [
317
+ !!errorMsg && /* @__PURE__ */ u(Info, { className: bem("error"), content: errorMsg }),
318
+ Button()
319
+ ] })
320
+ ] }) }) })
272
321
  }
273
322
  );
274
323
  });
@@ -1,35 +1,55 @@
1
1
  import { u, b } from "../../../core.js";
2
2
  import { useBEM } from "../../../hooks/useBEM.js";
3
3
  import { useI18n } from "../../../hooks/useI18n.js";
4
- import "../../../api/http.js";
5
4
  import "../../../utils/card-brand/brands.js";
6
5
  import "../../../utils/system-info/get-browser-info.js";
7
6
  import { formatAmount } from "../../../utils/format.js";
8
7
  import { formatTime } from "../../../utils/date.js";
8
+ import "../../../api/http.js";
9
9
  import { useBreakpoints } from "../../../hooks/useBreakpoints.js";
10
10
  import { Modal } from "../../internal/Modal/Modal.js";
11
11
  import "./qr-code-modal.js";
12
12
  import { QRCode } from "../../internal/QRCode/QRCode.js";
13
13
  const { bem } = useBEM("qr-code-modal");
14
14
  const QRCodeModal = (props) => {
15
- const { title, bgColor, expiredTime, amount, icon, qrCode, onClose } = props;
15
+ const {
16
+ title,
17
+ bgColor = "#FFFFFF",
18
+ textColor = "#1F1F1F",
19
+ expiredTime,
20
+ amount,
21
+ icon,
22
+ qrCode,
23
+ onClose
24
+ } = props;
16
25
  const { i18n } = useI18n();
17
26
  const breakpoints = useBreakpoints();
27
+ const useRoundBorder = !bgColor || ["transparent", "white", "#FFFFFF"].includes(bgColor);
28
+ const RoundBorder = () => {
29
+ return /* @__PURE__ */ u("div", { className: bem("round-border"), children: [
30
+ /* @__PURE__ */ u("div", { className: bem("round-border-item") }),
31
+ /* @__PURE__ */ u("div", { className: bem("round-border-item") }),
32
+ /* @__PURE__ */ u("div", { className: bem("round-border-item") }),
33
+ /* @__PURE__ */ u("div", { className: bem("round-border-item") })
34
+ ] });
35
+ };
18
36
  return /* @__PURE__ */ u(
19
37
  Modal,
20
38
  {
21
39
  show: true,
22
40
  width: breakpoints.smaller("xs") ? "90vw" : "340px",
23
- appendToBody: true,
24
41
  onChange: (status) => !status && (onClose == null ? void 0 : onClose()),
25
42
  children: /* @__PURE__ */ u("div", { className: bem(), children: [
26
43
  /* @__PURE__ */ u("div", { className: bem("title"), children: title }),
27
44
  /* @__PURE__ */ u("div", { className: bem("container"), children: /* @__PURE__ */ u("div", { className: bem("body"), style: { backgroundColor: bgColor }, children: [
28
45
  icon && /* @__PURE__ */ u("div", { className: bem("icon"), children: icon }),
29
- /* @__PURE__ */ u("div", { className: bem("qr-code"), children: /* @__PURE__ */ u(QRCode, { value: qrCode }) }),
46
+ /* @__PURE__ */ u("div", { className: bem("qr-code-container"), children: [
47
+ useRoundBorder && /* @__PURE__ */ u(RoundBorder, {}),
48
+ /* @__PURE__ */ u("div", { className: bem("qr-code"), children: /* @__PURE__ */ u(QRCode, { size: 160, value: qrCode }) })
49
+ ] }),
30
50
  expiredTime && /* @__PURE__ */ u(b, { children: [
31
- /* @__PURE__ */ u("div", { className: bem("expired-time"), children: formatTime(expiredTime) }),
32
- /* @__PURE__ */ u("div", { className: bem("expired-time-text"), children: i18n.get("qrCode.expired") })
51
+ /* @__PURE__ */ u("div", { style: { color: textColor }, className: bem("expired-time"), children: formatTime(expiredTime) }),
52
+ /* @__PURE__ */ u("div", { style: { color: textColor }, className: bem("expired-time-text"), children: i18n.get("qrCode.expired") })
33
53
  ] })
34
54
  ] }) }),
35
55
  amount && /* @__PURE__ */ u("div", { className: bem("amount"), children: formatAmount(amount).jointSymbolAndCurrency() })
@@ -38,3 +38,4 @@ import "./TNGWallet/index.js";
38
38
  import "./ShopeePay/index.js";
39
39
  import "./wallets/GCash/GCash.js";
40
40
  import "./wallets/Paymaya/Paymaya.js";
41
+ import "./wallets/Zalopay/Zalopay.js";
@@ -5,7 +5,7 @@ import { isNil } from "../../../utils/is.js";
5
5
  import "../../../utils/card-brand/brands.js";
6
6
  import "../../../utils/system-info/get-browser-info.js";
7
7
  import { normalizedClass } from "../../../utils/format.js";
8
- import { set } from "../../../utils/obj.js";
8
+ import { set } from "../../../utils/object.js";
9
9
  import { FormItemContext, FormContext } from "./context.js";
10
10
  import { formItemBEM, formItemLabelClassName, formItemErrorMessageClassName } from "./type.js";
11
11
  import { getActiveRules } from "./util.js";
@@ -1,5 +1,5 @@
1
1
  import { getIf } from "../../../utils/index.js";
2
- import { set } from "../../../utils/obj.js";
2
+ import { set } from "../../../utils/object.js";
3
3
  import { isArray } from "../../../utils/is.js";
4
4
  function isIncludeTrigger(ruleItem, trigger) {
5
5
  if (!trigger)
@@ -1,9 +1,9 @@
1
1
  import { w, h, T, u, b, P } from "../../../core.js";
2
2
  import { useBEM } from "../../../hooks/useBEM.js";
3
3
  import { useI18n } from "../../../hooks/useI18n.js";
4
- import "../../../api/http.js";
5
4
  import "../../../utils/card-brand/brands.js";
6
5
  import "../../../utils/system-info/get-browser-info.js";
6
+ import "../../../api/http.js";
7
7
  import "./modal2.js";
8
8
  const { bem } = useBEM("modal");
9
9
  const Modal = w((props) => {
@@ -1,4 +1,4 @@
1
- import { w, x, h, A, T, y, F, m, u } from "../../../core.js";
1
+ import { w, x, h, A, y, F, q, u } from "../../../core.js";
2
2
  import { useBEM } from "../../../hooks/useBEM.js";
3
3
  import "../../../core/context.js";
4
4
  import { isNil } from "../../../utils/is.js";
@@ -27,7 +27,10 @@ const Select = w((props, ref) => {
27
27
  const inputRef = A(null);
28
28
  const [dropMenuVisible, setDropMenuVisible] = h(false);
29
29
  const [doFilter, setDoFilter] = h(false);
30
- T(() => {
30
+ y(() => {
31
+ if (doFilter) {
32
+ return;
33
+ }
31
34
  setSelectOptions(props.options ?? []);
32
35
  if (!isNil(props.value) && props.options.length > 0) {
33
36
  const item = findItemByValue(props.value, props.options);
@@ -82,7 +85,7 @@ const Select = w((props, ref) => {
82
85
  if (isNil(inputValue) || inputValue === "") {
83
86
  setIsInputChange(false);
84
87
  }
85
- if (selectOptions.length === 0 && props.options.length !== 0) {
88
+ if (!selectOptions.length && props.options.length) {
86
89
  setInputValue("");
87
90
  setIsInputChange(false);
88
91
  } else {
@@ -110,13 +113,21 @@ const Select = w((props, ref) => {
110
113
  }
111
114
  let startClick;
112
115
  let endClick;
113
- document.addEventListener("mousedown", (e) => {
116
+ const handleMouseDown = q((e) => {
114
117
  startClick = e;
115
- });
116
- document.addEventListener("mouseup", (e) => {
118
+ }, []);
119
+ const handleMouseUp = q((e) => {
117
120
  endClick = e;
118
121
  validateClickOut(endClick, startClick);
119
- });
122
+ }, []);
123
+ y(() => {
124
+ document.addEventListener("mousedown", handleMouseDown);
125
+ document.addEventListener("mouseup", handleMouseUp);
126
+ return () => {
127
+ document.removeEventListener("mousedown", handleMouseDown);
128
+ document.removeEventListener("mouseup", handleMouseUp);
129
+ };
130
+ }, []);
120
131
  function validateClickOut(mouseup, mousedown) {
121
132
  var _a, _b;
122
133
  if (!selectRef.current)
@@ -130,7 +141,7 @@ const Select = w((props, ref) => {
130
141
  }
131
142
  setDropMenuVisible(false);
132
143
  }
133
- const selectRef = m();
144
+ const selectRef = A(null);
134
145
  const defRightIcon = IconArrowDown({
135
146
  style: {
136
147
  transform: dropMenuVisible ? "rotate(-180deg)" : "rotate(0deg)",
@@ -6,10 +6,10 @@ import "../../../utils/card-brand/brands.js";
6
6
  import "../../../utils/system-info/get-browser-info.js";
7
7
  import "../../../api/http.js";
8
8
  const { bem } = useBEM("select");
9
- function SelectMenu(props) {
9
+ const SelectMenu = (props) => {
10
10
  const { style, children } = props;
11
11
  return /* @__PURE__ */ u("div", { style, class: bem("menu"), children });
12
- }
12
+ };
13
13
  export {
14
14
  SelectMenu
15
15
  };
@@ -12,13 +12,21 @@ function SelectMenuItem(props) {
12
12
  const { onSelect, ...restProps } = props;
13
13
  const { label } = restProps;
14
14
  function onClick(e) {
15
+ e.preventDefault();
15
16
  e.stopPropagation();
16
17
  onSelect == null ? void 0 : onSelect({ ...restProps });
17
18
  }
18
- return /* @__PURE__ */ u("div", { onClick: (e) => onClick(e), class: bem("menu-item", [{ selected: props.selected }]), children: [
19
- isFunction(label) ? label(props, props.selected) : label,
20
- props.selected && /* @__PURE__ */ u("div", { class: bem("menu-item-icon"), children: IconTick({}) })
21
- ] });
19
+ return /* @__PURE__ */ u(
20
+ "div",
21
+ {
22
+ onClick: (e) => onClick(e),
23
+ class: bem("menu-item", [{ selected: props.selected }]),
24
+ children: [
25
+ isFunction(label) ? label(props, props.selected) : label,
26
+ props.selected && /* @__PURE__ */ u("div", { class: bem("menu-item-icon"), children: IconTick({}) })
27
+ ]
28
+ }
29
+ );
22
30
  }
23
31
  export {
24
32
  SelectMenuItem
@@ -14,20 +14,23 @@ function IconError({ size, style, className }) {
14
14
  viewBox: "0 0 16 16",
15
15
  fill: "none",
16
16
  xmlns: "http://www.w3.org/2000/svg",
17
- style,
17
+ style: {
18
+ ...style,
19
+ marginBottom: "-2px"
20
+ },
18
21
  className: normalizedClass(COMMON_CLASS_NAME, className),
19
22
  children: [
20
- /* @__PURE__ */ u("g", { id: "icon-error", "clip-path": "url(#clip0_21_2165)", children: /* @__PURE__ */ u("g", { id: "tips/exclamation-circle-fill", children: /* @__PURE__ */ u(
23
+ /* @__PURE__ */ u("g", { id: "icon-Error", "clip-path": "url(#clip0_765_422)", children: /* @__PURE__ */ u("g", { id: "tips/exclamation-circle-fill", children: /* @__PURE__ */ u(
21
24
  "path",
22
25
  {
23
26
  id: "Vector",
24
27
  "fill-rule": "evenodd",
25
28
  "clip-rule": "evenodd",
26
- d: "M1.33301 8.00004C1.33301 4.31814 4.31778 1.33337 7.99967 1.33337C11.6816 1.33337 14.6663 4.31814 14.6663 8.00004C14.6663 11.6819 11.6816 14.6667 7.99967 14.6667C4.31778 14.6667 1.33301 11.6819 1.33301 8.00004ZM7.33301 10V11.3334H8.66634V10H7.33301ZM8.66634 9.33337L8.66634 4.66671H7.33301L7.33301 9.33337H8.66634Z",
29
+ d: "M1.33398 7.99992C1.33398 4.31802 4.31875 1.33325 8.00065 1.33325C11.6826 1.33325 14.6673 4.31802 14.6673 7.99992C14.6673 11.6818 11.6826 14.6666 8.00065 14.6666C4.31875 14.6666 1.33398 11.6818 1.33398 7.99992ZM7.33398 9.99992V11.3333H8.66732V9.99992H7.33398ZM8.66732 9.33325L8.66732 4.66659H7.33399L7.33398 9.33325H8.66732Z",
27
30
  fill: "#F53F3F"
28
31
  }
29
32
  ) }) }),
30
- /* @__PURE__ */ u("defs", { children: /* @__PURE__ */ u("clipPath", { id: "clip0_21_2165", children: /* @__PURE__ */ u("rect", { width: "16", height: "16", fill: "white" }) }) })
33
+ /* @__PURE__ */ u("defs", { children: /* @__PURE__ */ u("clipPath", { id: "clip0_765_422", children: /* @__PURE__ */ u("rect", { width: "16", height: "16", fill: "white" }) }) })
31
34
  ]
32
35
  }
33
36
  );
@@ -0,0 +1,47 @@
1
+ import { u } from "../../../core.js";
2
+ import { COMMON_CLASS_NAME } from "../../../constant.js";
3
+ import { isUndefined } from "../../../utils/is.js";
4
+ import "../../../utils/card-brand/brands.js";
5
+ import "../../../utils/system-info/get-browser-info.js";
6
+ import { normalizedClass } from "../../../utils/format.js";
7
+ const IconZalopay = ({ size, style, className }) => {
8
+ const computedSize = !isUndefined(size) ? `${size}px` : "1em";
9
+ return /* @__PURE__ */ u(
10
+ "svg",
11
+ {
12
+ width: computedSize,
13
+ height: computedSize,
14
+ viewBox: "0 0 24 24",
15
+ fill: "none",
16
+ xmlns: "http://www.w3.org/2000/svg",
17
+ style,
18
+ className: normalizedClass(COMMON_CLASS_NAME, className),
19
+ children: /* @__PURE__ */ u("g", { id: "9pay", children: [
20
+ /* @__PURE__ */ u("rect", { width: "24", height: "24", rx: "4.8", fill: "white" }),
21
+ /* @__PURE__ */ u(
22
+ "path",
23
+ {
24
+ id: "Vector",
25
+ "fill-rule": "evenodd",
26
+ "clip-rule": "evenodd",
27
+ d: "M13.5067 13.2344V16.9375H14.1224V18.1751H13.6847C13.1882 18.1751 12.7528 17.9196 12.4994 17.5336C12.0819 17.9301 11.5298 18.1744 10.9218 18.1744C9.62342 18.1744 8.5701 17.0701 8.5701 15.7075C8.5701 14.345 9.62274 13.2407 10.9218 13.2407C11.423 13.2407 11.8865 13.4061 12.2676 13.686V13.2344H13.5067ZM9.80631 15.7068C9.80631 16.3867 10.3571 16.9375 11.037 16.9375C11.7168 16.9375 12.2676 16.3867 12.2676 15.7068C12.2676 15.0269 11.7168 14.4762 11.037 14.4762C10.3571 14.4762 9.80631 15.0269 9.80631 15.7068ZM5.63833 13.2344C4.27576 13.2344 3.16797 14.3429 3.16797 15.7048V20.0256H4.4049V17.8421C4.76859 18.0529 5.18881 18.1751 5.63833 18.1751C7.00092 18.1751 8.10868 17.0666 8.10868 15.7048C8.10868 14.3429 7.0002 13.2344 5.63833 13.2344ZM5.63833 16.9382C4.95843 16.9382 4.4049 16.3846 4.4049 15.7048C4.4049 15.0249 4.95843 14.4713 5.63833 14.4713C6.31822 14.4713 6.87178 15.0249 6.87178 15.7048C6.87178 16.3846 6.31893 16.9382 5.63833 16.9382ZM17.8777 13.2358L16.562 16.305L15.3126 13.2358H13.9765L15.8773 17.9043L14.9677 20.0256H16.3141L19.2241 13.2358H17.8777Z",
28
+ fill: "#00CF6A"
29
+ }
30
+ ),
31
+ /* @__PURE__ */ u(
32
+ "path",
33
+ {
34
+ id: "Vector_2",
35
+ "fill-rule": "evenodd",
36
+ "clip-rule": "evenodd",
37
+ d: "M8.02423 5.26518C8.13241 5.48157 8.10939 5.73635 7.96418 5.92971L5.02265 9.85197H8.10589V11.0889H3.81714C3.57562 11.0889 3.35784 10.9549 3.24964 10.7385C3.14144 10.5221 3.16448 10.2673 3.30967 10.0739L6.25191 6.15098H3.16797V4.91406H7.45601C7.69823 4.91406 7.91602 5.04878 8.02423 5.26518ZM16.6855 8.61928C16.6855 7.25741 17.7939 6.14892 19.1558 6.14892C20.5177 6.14892 21.6262 7.25741 21.6262 8.61928C21.6262 9.98116 20.5177 11.0896 19.1558 11.0896C17.7939 11.0896 16.6855 9.98116 16.6855 8.61928ZM17.9224 8.61928C17.9224 9.29917 18.4759 9.85271 19.1558 9.85271C19.8364 9.85271 20.3893 9.29917 20.3893 8.61928C20.3893 7.93939 19.8364 7.38585 19.1558 7.38585C18.4752 7.38585 17.9224 7.93939 17.9224 8.61928ZM13.5052 9.85202V6.14892H12.2662V6.60055C11.8851 6.32064 11.4216 6.15521 10.9204 6.15521C9.62132 6.15521 8.56868 7.2595 8.56868 8.62206C8.56868 9.98465 9.62204 11.0889 10.9204 11.0889C11.5284 11.0889 12.0805 10.8446 12.4979 10.4481C12.7513 10.8342 13.1869 11.0896 13.6832 11.0896H14.1209V9.85202H13.5052ZM11.0355 9.85202C10.3557 9.85202 9.80492 9.30127 9.80492 8.62138C9.80492 7.94148 10.3557 7.39073 11.0355 7.39073C11.7154 7.39073 12.2662 7.94148 12.2662 8.62138C12.2662 9.30127 11.7154 9.85202 11.0355 9.85202ZM15.8297 9.85059V4.91406H14.59V9.67049C14.59 10.4537 15.2245 11.0889 16.0077 11.0889H16.4495V9.85059H15.8297Z",
38
+ fill: "#0033C9"
39
+ }
40
+ )
41
+ ] })
42
+ }
43
+ );
44
+ };
45
+ export {
46
+ IconZalopay
47
+ };