@paykka/card-checkout-ui 0.18.0 → 0.21.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 (158) hide show
  1. package/README.md +3 -3
  2. package/dist/card-checkout-ui.js +15 -15
  3. package/dist/card-checkout-ui.umd.cjs +15 -15
  4. package/dist/es/api/modules/apple-pay/index.js +6 -2
  5. package/dist/es/api/modules/checkout/map.js +1 -1
  6. package/dist/es/api/modules/get-browser-params.js +1 -1
  7. package/dist/es/components/ApplePay/index.js +5 -3
  8. package/dist/es/components/Card/index.js +48 -31
  9. package/dist/es/components/DropIn/index.js +21 -5
  10. package/dist/es/components/GuideCard/index.js +7 -50
  11. package/dist/es/components/Sepa/index.js +2 -1
  12. package/dist/es/components/business/QRCodeContent/QRCodeContent.js +68 -0
  13. package/dist/es/components/business/QRCodeContent/index.js +8 -0
  14. package/dist/es/components/business/QRCodeModal/QRCodeModal.js +5 -44
  15. package/dist/es/components/business/QRCodeModal/index.js +2 -1
  16. package/dist/es/components/business/index.js +2 -1
  17. package/dist/es/components/index.js +3 -1
  18. package/dist/es/components/internal/Button/Button2.js +2 -2
  19. package/dist/es/components/internal/icons/IconAlipay.js +43 -0
  20. package/dist/es/components/internal/icons/IconAlipayHK.js +66 -0
  21. package/dist/es/components/wallets/Alipay/Alipay.js +148 -0
  22. package/dist/es/components/wallets/Alipay/index.js +1 -0
  23. package/dist/es/components/wallets/Alipay/type.js +1 -0
  24. package/dist/es/components/wallets/AlipayHK/AlipayHK.js +148 -0
  25. package/dist/es/components/wallets/AlipayHK/alipay-hk.js +1 -0
  26. package/dist/es/components/wallets/AlipayHK/index.js +1 -0
  27. package/dist/es/components/wallets/AlipayHK/type.js +1 -0
  28. package/dist/es/components/wallets/{AliPay/AliPay.js → AlipayPlus/AlipayPlus.js} +13 -15
  29. package/dist/es/components/wallets/AlipayPlus/ali-pay-plus.js +1 -0
  30. package/dist/es/components/wallets/AlipayPlus/index.js +1 -0
  31. package/dist/es/components/wallets/AlipayPlus/type.js +1 -0
  32. package/dist/es/components/wallets/Bancontact/Bancontact.js +4 -3
  33. package/dist/es/components/wallets/Blik/Blik.js +4 -3
  34. package/dist/es/components/wallets/Doku/Doku.js +2 -1
  35. package/dist/es/components/wallets/EPS/EPS.js +4 -3
  36. package/dist/es/components/wallets/GCash/GCash.js +2 -0
  37. package/dist/es/components/wallets/GoPay/GoPay.js +2 -1
  38. package/dist/es/components/wallets/IDeal/IDeal.js +4 -3
  39. package/dist/es/components/wallets/Jenius/Jenius.js +2 -1
  40. package/dist/es/components/wallets/LinkAja/LinkAja.js +2 -1
  41. package/dist/es/components/wallets/NuPay/NuPay.js +2 -1
  42. package/dist/es/components/wallets/OVO/OVO.js +2 -1
  43. package/dist/es/components/wallets/P24/P24.js +2 -1
  44. package/dist/es/components/wallets/PayByBank/PayByBank.js +2 -1
  45. package/dist/es/components/wallets/PayU/PayU.js +2 -1
  46. package/dist/es/components/wallets/Skrill/Skrill.js +2 -1
  47. package/dist/es/components/wallets/Trustly/Trustly.js +2 -1
  48. package/dist/es/components/wallets/Twint/Twint.js +2 -1
  49. package/dist/es/components/wallets/Vietqr/Vietqr.js +2 -0
  50. package/dist/es/components/wallets/WechatPay/WechatPay.js +4 -2
  51. package/dist/es/components/wallets/Zalopay/Zalopay.js +2 -0
  52. package/dist/es/components/wallets/index.js +3 -1
  53. package/dist/es/constant.js +15 -3
  54. package/dist/es/core/environment.js +17 -3
  55. package/dist/es/core/logger.js +1 -1
  56. package/dist/es/hooks/useBaseWallet.js +13 -5
  57. package/dist/es/hooks/useRetry.js +6 -0
  58. package/dist/es/i18n/locales/cs-CZ.js +8 -1
  59. package/dist/es/i18n/locales/da-DK.js +8 -1
  60. package/dist/es/i18n/locales/de-DE.js +8 -1
  61. package/dist/es/i18n/locales/en-GB.js +8 -1
  62. package/dist/es/i18n/locales/es-ES.js +8 -1
  63. package/dist/es/i18n/locales/fi-FI.js +8 -1
  64. package/dist/es/i18n/locales/fil-PH.js +8 -1
  65. package/dist/es/i18n/locales/fr-FR.js +8 -1
  66. package/dist/es/i18n/locales/hi-IN.js +8 -1
  67. package/dist/es/i18n/locales/id-ID.js +8 -1
  68. package/dist/es/i18n/locales/it-IT.js +8 -1
  69. package/dist/es/i18n/locales/ja-JP.js +8 -1
  70. package/dist/es/i18n/locales/ko-KR.js +8 -1
  71. package/dist/es/i18n/locales/ms-MY.js +8 -1
  72. package/dist/es/i18n/locales/nb-NO.js +8 -1
  73. package/dist/es/i18n/locales/nl-NL.js +8 -1
  74. package/dist/es/i18n/locales/pl-PL.js +8 -1
  75. package/dist/es/i18n/locales/pt-PT.js +8 -1
  76. package/dist/es/i18n/locales/ru-RU.js +8 -1
  77. package/dist/es/i18n/locales/sv-SE.js +8 -1
  78. package/dist/es/i18n/locales/th-TH.js +8 -1
  79. package/dist/es/i18n/locales/zh-CN.js +8 -1
  80. package/dist/es/i18n/locales/zh-HK.js +8 -1
  81. package/dist/es/i18n/locales/zh-TW.js +8 -1
  82. package/dist/es/index.js +6 -2
  83. package/dist/es/polyfill.js +165 -165
  84. package/dist/es/style.css +1 -1
  85. package/dist/es/utils/date.js +5 -1
  86. package/dist/polyfill.js +165 -165
  87. package/dist/style.css +1 -1
  88. package/dist/types/api/modules/apple-pay/index.d.ts +3 -1
  89. package/dist/types/components/DropIn/type.d.ts +1 -1
  90. package/dist/types/components/business/QRCodeContent/QRCodeContent.d.ts +3 -0
  91. package/dist/types/components/business/QRCodeContent/index.d.ts +2 -0
  92. package/dist/types/components/business/QRCodeContent/type.d.ts +23 -0
  93. package/dist/types/components/business/QRCodeModal/QRCodeModal.d.ts +0 -1
  94. package/dist/types/components/business/QRCodeModal/type.d.ts +2 -28
  95. package/dist/types/components/business/index.d.ts +1 -0
  96. package/dist/types/components/internal/Button/type.d.ts +1 -0
  97. package/dist/types/components/internal/icons/IconAlipay.d.ts +2 -0
  98. package/dist/types/components/internal/icons/IconAlipayHK.d.ts +2 -0
  99. package/dist/types/components/internal/icons/index.d.ts +2 -0
  100. package/dist/types/components/wallets/Alipay/Alipay.d.ts +15 -0
  101. package/dist/types/components/wallets/Alipay/index.d.ts +2 -0
  102. package/dist/types/components/wallets/{AliPay → Alipay}/type.d.ts +2 -2
  103. package/dist/types/components/wallets/AlipayHK/AlipayHK.d.ts +15 -0
  104. package/dist/types/components/wallets/AlipayHK/index.d.ts +2 -0
  105. package/dist/types/components/wallets/AlipayHK/type.d.ts +7 -0
  106. package/dist/types/components/wallets/AlipayPlus/AlipayPlus.d.ts +15 -0
  107. package/dist/types/components/wallets/AlipayPlus/index.d.ts +2 -0
  108. package/dist/types/components/wallets/AlipayPlus/type.d.ts +7 -0
  109. package/dist/types/components/wallets/Doku/Doku.d.ts +2 -2
  110. package/dist/types/components/wallets/DragonPay/DragonPay.d.ts +1 -1
  111. package/dist/types/components/wallets/GoPay/GoPay.d.ts +0 -1
  112. package/dist/types/components/wallets/IDeal/IDeal.d.ts +1 -1
  113. package/dist/types/components/wallets/LinkAja/LinkAja.d.ts +2 -2
  114. package/dist/types/components/wallets/MyBank/MyBank.d.ts +0 -1
  115. package/dist/types/components/wallets/OnlineBankingEstonia/OnlineBankingEstonia.d.ts +0 -1
  116. package/dist/types/components/wallets/OnlineBankingFinland/OnlineBankingFinland.d.ts +0 -1
  117. package/dist/types/components/wallets/P24/P24.d.ts +1 -1
  118. package/dist/types/components/wallets/PayU/PayU.d.ts +1 -1
  119. package/dist/types/components/wallets/Twint/Twint.d.ts +0 -1
  120. package/dist/types/components/wallets/index.d.ts +3 -1
  121. package/dist/types/constant.d.ts +6 -2
  122. package/dist/types/hooks/useBaseWallet.d.ts +13 -0
  123. package/dist/types/hooks/useRetry.d.ts +2 -0
  124. package/dist/types/i18n/locales/cs-CZ.d.ts +7 -0
  125. package/dist/types/i18n/locales/da-DK.d.ts +7 -0
  126. package/dist/types/i18n/locales/de-DE.d.ts +7 -0
  127. package/dist/types/i18n/locales/en-GB.d.ts +7 -0
  128. package/dist/types/i18n/locales/es-ES.d.ts +7 -0
  129. package/dist/types/i18n/locales/fi-FI.d.ts +7 -0
  130. package/dist/types/i18n/locales/fil-PH.d.ts +7 -0
  131. package/dist/types/i18n/locales/fr-FR.d.ts +7 -0
  132. package/dist/types/i18n/locales/hi-IN.d.ts +7 -0
  133. package/dist/types/i18n/locales/id-ID.d.ts +7 -0
  134. package/dist/types/i18n/locales/it-IT.d.ts +7 -0
  135. package/dist/types/i18n/locales/ja-JP.d.ts +7 -0
  136. package/dist/types/i18n/locales/ko-KR.d.ts +7 -0
  137. package/dist/types/i18n/locales/ms-MY.d.ts +7 -0
  138. package/dist/types/i18n/locales/nb-NO.d.ts +7 -0
  139. package/dist/types/i18n/locales/nl-NL.d.ts +7 -0
  140. package/dist/types/i18n/locales/pl-PL.d.ts +7 -0
  141. package/dist/types/i18n/locales/pt-PT.d.ts +7 -0
  142. package/dist/types/i18n/locales/ru-RU.d.ts +7 -0
  143. package/dist/types/i18n/locales/sv-SE.d.ts +7 -0
  144. package/dist/types/i18n/locales/th-TH.d.ts +7 -0
  145. package/dist/types/i18n/locales/zh-CN.d.ts +7 -0
  146. package/dist/types/i18n/locales/zh-HK.d.ts +7 -0
  147. package/dist/types/i18n/locales/zh-TW.d.ts +7 -0
  148. package/dist/types/utils/date.d.ts +1 -0
  149. package/package.json +81 -81
  150. package/dist/es/components/RecurringTip/index.js +0 -21
  151. package/dist/es/components/wallets/AliPay/index.js +0 -1
  152. package/dist/types/components/RecurringTip/RecurringTip.d.ts +0 -2
  153. package/dist/types/components/RecurringTip/index.d.ts +0 -1
  154. package/dist/types/components/wallets/AliPay/AliPay.d.ts +0 -15
  155. package/dist/types/components/wallets/AliPay/index.d.ts +0 -2
  156. /package/dist/es/components/business/{QRCodeModal/qr-code-modal.js → QRCodeContent/qr-code-content.js} +0 -0
  157. /package/dist/es/components/{wallets/AliPay → business/QRCodeContent}/type.js +0 -0
  158. /package/dist/es/components/wallets/{AliPay → Alipay}/ali-pay.js +0 -0
@@ -1,7 +1,11 @@
1
1
  import { apiPrefix } from "../../../config.js";
2
2
  import { http } from "../../http.js";
3
- const getMerchantSession = async (options) => {
4
- return http.post(`${apiPrefix}/apple-pay/create-session`, options);
3
+ const getMerchantSession = async (params, options) => {
4
+ return http.post(
5
+ `${apiPrefix}/apple-pay/create-session`,
6
+ { merchant_id: params.merchantId },
7
+ options
8
+ );
5
9
  };
6
10
  export {
7
11
  getMerchantSession
@@ -31,7 +31,7 @@ const formatPaymentMethodInfo = (paymentMethods = []) => {
31
31
  };
32
32
  } else if (value === PaymentMethod.WECHAT_PAY) {
33
33
  channelParams.wechatPay = formatFeeInfo(configuration);
34
- } else if (value === PaymentMethod.ALI_PAY) {
34
+ } else if (value === PaymentMethod.ALIPAY_PLUS) {
35
35
  channelParams.aliPay = formatFeeInfo(configuration);
36
36
  }
37
37
  if (value === PaymentMethod.BANKCARD) {
@@ -35,7 +35,7 @@ const getBaseBrowserParams = async (params = {}) => {
35
35
  terminal_type: terminalType,
36
36
  fraud_detection_id: fraudDetectionId,
37
37
  // 当前组件库版本(构建时由 define 注入)
38
- app_version: "0.18.0"
38
+ app_version: "0.21.2"
39
39
  };
40
40
  };
41
41
  const getBrowserParams = async (params = {}) => {
@@ -368,10 +368,12 @@ const ApplePay = w((props) => {
368
368
  initApplePaySession({
369
369
  request,
370
370
  onValidate: async () => {
371
- var _a2;
371
+ var _a2, _b2, _c;
372
372
  onEvent == null ? void 0 : onEvent(ApplePayEventType.APPLE_PAY_VALIDATE_MERCHANT);
373
- const merchantSession = await getMerchantSession();
374
- (_a2 = applePaySession.current) == null ? void 0 : _a2.completeMerchantValidation(merchantSession);
373
+ const merchantSession = await getMerchantSession(
374
+ ((_a2 = session == null ? void 0 : session.checkout) == null ? void 0 : _a2.sessionMode) === SessionMode.HOSTED ? {} : { merchantId: (_b2 = session == null ? void 0 : session.checkout) == null ? void 0 : _b2.merchantId }
375
+ );
376
+ (_c = applePaySession.current) == null ? void 0 : _c.completeMerchantValidation(merchantSession);
375
377
  },
376
378
  onAuthorized: async (event) => {
377
379
  var _a2;
@@ -29,7 +29,7 @@ import "../internal/Form/FormItem.js";
29
29
  import { Form } from "../internal/Form/Form.js";
30
30
  import { IconSwitch } from "../internal/icons/IconSwitch.js";
31
31
  import { Info } from "../internal/Info/Info.js";
32
- import { RecurringTip } from "../RecurringTip/index.js";
32
+ import { Tip } from "../Tip/index.js";
33
33
  import { EFieldType, SecuredFieldsProvider } from "../SecuredFieldsProvider/index.js";
34
34
  import "../SubmitButton/index.js";
35
35
  import "../internal/Button/button.js";
@@ -47,7 +47,7 @@ import { normalizedClass, trimAll, limitedToNumber } from "../../utils/format.js
47
47
  const { bem } = useBEM("card");
48
48
  const CURR_PAYMENT_METHOD = PaymentMethod.BANKCARD;
49
49
  const Card = w((props, ref) => {
50
- var _a, _b;
50
+ var _a, _b, _c, _d, _e, _f, _g;
51
51
  const {
52
52
  showCardBrands = true,
53
53
  session,
@@ -154,7 +154,7 @@ const Card = w((props, ref) => {
154
154
  };
155
155
  };
156
156
  y(() => {
157
- var _a2, _b2, _c;
157
+ var _a2, _b2, _c2;
158
158
  if (!sessionReady)
159
159
  return;
160
160
  const { status, supportMethods = [], tokens = [], sessionMode, country, bill = {} } = (session == null ? void 0 : session.checkout) || {};
@@ -173,7 +173,7 @@ const Card = w((props, ref) => {
173
173
  country && addressCore.setCountry(country);
174
174
  form.email = bill.email ?? "";
175
175
  form.address.country = country;
176
- form.token = (_c = tokens[0]) == null ? void 0 : _c.token;
176
+ form.token = (_c2 = tokens[0]) == null ? void 0 : _c2.token;
177
177
  setSupportedCardBrands(intersection(cardBrandCodes, supportMethods || []));
178
178
  setIsCheckoutEnabled(true);
179
179
  if (status === "SUCCESS") {
@@ -278,6 +278,7 @@ const Card = w((props, ref) => {
278
278
  paymentMethod = cardBrand.code;
279
279
  }
280
280
  }
281
+ const storePaymentMethodPayload = isShowStoreCheckBox ? { storePaymentMethod } : isForceStorePaymentMethod ? { storePaymentMethod: true } : null;
281
282
  return {
282
283
  sessionId: session.sessionId,
283
284
  clientKey: session.clientKey,
@@ -291,7 +292,7 @@ const Card = w((props, ref) => {
291
292
  expYear: `20${expYear}`,
292
293
  expMonth,
293
294
  cardNo,
294
- ...isShowStoreCheckBox ? { storePaymentMethod } : null
295
+ ...storePaymentMethodPayload
295
296
  }
296
297
  },
297
298
  bill: (fieldStatus == null ? void 0 : fieldStatus.address.show) ? {
@@ -316,7 +317,7 @@ const Card = w((props, ref) => {
316
317
  };
317
318
  };
318
319
  async function pay(search = false, timeout) {
319
- var _a2, _b2, _c, _d, _e, _f, _g, _h;
320
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h;
320
321
  try {
321
322
  core.payment.currPaymentMethod.value = CURR_PAYMENT_METHOD;
322
323
  const requestOptions = { locale: i18n.locale, timeout };
@@ -333,13 +334,13 @@ const Card = w((props, ref) => {
333
334
  );
334
335
  } else {
335
336
  const paymentParams = await getPaymentParams();
336
- const extraParams = (_d = (_c = core.config)._getExtraParams) == null ? void 0 : _d.call(_c, "payment", CURR_PAYMENT_METHOD);
337
- if ((_e = core.config._checkoutConfig) == null ? void 0 : _e.dynamicSessionId) {
337
+ const extraParams = (_d2 = (_c2 = core.config)._getExtraParams) == null ? void 0 : _d2.call(_c2, "payment", CURR_PAYMENT_METHOD);
338
+ if ((_e2 = core.config._checkoutConfig) == null ? void 0 : _e2.dynamicSessionId) {
338
339
  await core.updateSessionId(buildPaymentParams(paymentParams, extraParams));
339
340
  session.sessionId && (paymentParams.sessionId = session.sessionId);
340
341
  }
341
342
  if (security) {
342
- (_f = SFPRef.current) == null ? void 0 : _f.payment(paymentParams, extraParams);
343
+ (_f2 = SFPRef.current) == null ? void 0 : _f2.payment(paymentParams, extraParams);
343
344
  return { end: true };
344
345
  } else {
345
346
  res = await commonPayment({
@@ -353,7 +354,7 @@ const Card = w((props, ref) => {
353
354
  sessionId: session.sessionId,
354
355
  clientKey: session.clientKey
355
356
  },
356
- extraParams: (_h = (_g = core.config)._getExtraParams) == null ? void 0 : _h.call(_g, "query", CURR_PAYMENT_METHOD)
357
+ extraParams: (_h = (_g2 = core.config)._getExtraParams) == null ? void 0 : _h.call(_g2, "query", CURR_PAYMENT_METHOD)
357
358
  }
358
359
  }
359
360
  });
@@ -471,7 +472,8 @@ const Card = w((props, ref) => {
471
472
  status: submitButtonStatus,
472
473
  disabled,
473
474
  verified: validated,
474
- onClick: onSubmit
475
+ onClick: onSubmit,
476
+ children: isSaveButton ? i18n.get("common.save") : null
475
477
  }
476
478
  );
477
479
  };
@@ -556,19 +558,25 @@ const Card = w((props, ref) => {
556
558
  }
557
559
  }
558
560
  }
561
+ const isPurchase = ((_a = session == null ? void 0 : session.checkout) == null ? void 0 : _a.paymentType) === PaymentType.PURCHASE;
562
+ const isRecurring = ((_b = session == null ? void 0 : session.checkout) == null ? void 0 : _b.paymentType) === PaymentType.RECURRING;
559
563
  const isFastPayment = T(() => {
560
564
  var _a2;
561
565
  if (!(session == null ? void 0 : session.checkout))
562
566
  return;
563
- const isPurchase = (session == null ? void 0 : session.checkout.paymentType) === PaymentType.PURCHASE;
564
- const hasCardTokens = !!((_a2 = session == null ? void 0 : session.checkout.tokens) == null ? void 0 : _a2.length);
567
+ const hasCardTokens = !!((_a2 = session.checkout.tokens) == null ? void 0 : _a2.length);
565
568
  return isPurchase && hasCardTokens;
566
- }, [session == null ? void 0 : session.checkout]);
569
+ }, [session == null ? void 0 : session.checkout, isPurchase]);
570
+ const isNoAmount = Number((_d = (_c = session == null ? void 0 : session.checkout) == null ? void 0 : _c.transAmount) == null ? void 0 : _d.amount) === 0;
571
+ const canStorePaymentMethod = !!((_e = session == null ? void 0 : session.checkout) == null ? void 0 : _e.storePaymentMethod);
572
+ const isNoAmountPurchaseStore = isPurchase && isNoAmount && canStorePaymentMethod;
573
+ const isForceStorePaymentMethod = isRecurring || isNoAmountPurchaseStore;
574
+ const isSaveButton = isNoAmountPurchaseStore || isRecurring && isNoAmount;
567
575
  const isShowStoreCheckBox = T(() => {
568
576
  if (!(session == null ? void 0 : session.checkout))
569
577
  return;
570
- return (session == null ? void 0 : session.checkout.paymentType) === PaymentType.PURCHASE && (session == null ? void 0 : session.checkout.storePaymentMethod);
571
- }, [session == null ? void 0 : session.checkout]);
578
+ return isPurchase && canStorePaymentMethod && !isNoAmount;
579
+ }, [session == null ? void 0 : session.checkout, isPurchase, canStorePaymentMethod, isNoAmount]);
572
580
  const StoreCheckBox = () => {
573
581
  const onCheck = (checked) => {
574
582
  setStorePaymentMethod(checked);
@@ -583,10 +591,20 @@ const Card = w((props, ref) => {
583
591
  }
584
592
  ) });
585
593
  };
594
+ const StorePaymentTip = () => {
595
+ let tipText = null;
596
+ if (isNoAmountPurchaseStore) {
597
+ tipText = i18n.get("common.storePaymentTip");
598
+ } else if (isRecurring && isNoAmount) {
599
+ tipText = i18n.get("common.recurringStoreTip");
600
+ } else if (isRecurring) {
601
+ tipText = i18n.get("common.recurringTip");
602
+ }
603
+ return tipText ? /* @__PURE__ */ u(Tip, { text: tipText }) : null;
604
+ };
586
605
  const changeBox = () => {
587
- var _a2, _b2, _c;
588
- const isPurchase = ((_a2 = session == null ? void 0 : session.checkout) == null ? void 0 : _a2.paymentType) === PaymentType.PURCHASE;
589
- const hasCardTokens = !!((_c = (_b2 = session == null ? void 0 : session.checkout) == null ? void 0 : _b2.tokens) == null ? void 0 : _c.length);
606
+ var _a2, _b2;
607
+ const hasCardTokens = !!((_b2 = (_a2 = session == null ? void 0 : session.checkout) == null ? void 0 : _a2.tokens) == null ? void 0 : _b2.length);
590
608
  const onClick = () => {
591
609
  var _a3;
592
610
  (_a3 = formRef.current) == null ? void 0 : _a3.resetValidation();
@@ -649,7 +667,7 @@ const Card = w((props, ref) => {
649
667
  [EFieldType.CVV]: null
650
668
  });
651
669
  const onFieldValidStatusChanged = (data) => {
652
- var _a2, _b2, _c, _d;
670
+ var _a2, _b2, _c2, _d2;
653
671
  const fieldRef = splitCardInfo ? fieldRefMap[data.fieldType] : combinedCardInfoRef;
654
672
  const error = data.errorTip && i18n.get(data.errorTip);
655
673
  if (!splitCardInfo) {
@@ -670,10 +688,10 @@ const Card = w((props, ref) => {
670
688
  if (isSuccess) {
671
689
  (_b2 = fieldRef.current) == null ? void 0 : _b2.resetValidation("success");
672
690
  } else {
673
- (_c = fieldRef.current) == null ? void 0 : _c.resetValidation("unValidate");
691
+ (_c2 = fieldRef.current) == null ? void 0 : _c2.resetValidation("unValidate");
674
692
  }
675
693
  } else {
676
- (_d = fieldRef.current) == null ? void 0 : _d.resetValidation(data.status, error);
694
+ (_d2 = fieldRef.current) == null ? void 0 : _d2.resetValidation(data.status, error);
677
695
  }
678
696
  setTimeout(() => {
679
697
  validateFormSilently();
@@ -741,7 +759,7 @@ const Card = w((props, ref) => {
741
759
  ) });
742
760
  };
743
761
  const CardSplitInfo = () => {
744
- var _a2, _b2, _c, _d;
762
+ var _a2, _b2, _c2, _d2;
745
763
  return /* @__PURE__ */ u(b, { children: [
746
764
  /* @__PURE__ */ u("div", { children: [
747
765
  /* @__PURE__ */ u("div", { className: bem("card-number-wrapper"), children: [
@@ -761,7 +779,7 @@ const Card = w((props, ref) => {
761
779
  CardBrands,
762
780
  {
763
781
  className: bem("card-brands"),
764
- supportedCardBrands: (_d = (_c = session == null ? void 0 : session.checkout) == null ? void 0 : _c.supportMethods) == null ? void 0 : _d.filter(Boolean)
782
+ supportedCardBrands: (_d2 = (_c2 = session == null ? void 0 : session.checkout) == null ? void 0 : _c2.supportMethods) == null ? void 0 : _d2.filter(Boolean)
765
783
  }
766
784
  )
767
785
  ] }),
@@ -786,13 +804,12 @@ const Card = w((props, ref) => {
786
804
  ] });
787
805
  };
788
806
  const PaymentForm = () => {
789
- var _a2;
790
807
  return /* @__PURE__ */ u(Form, { form, ref: setFormRef, onFormChange: (form2) => setForm(form2), children: /* @__PURE__ */ u("div", { className: normalizedClass(COMMON_CLASS_NAME, PAY_FORM_CLASS_NAME, bem()), children: [
791
808
  Email(),
792
809
  splitCardInfo ? CardSplitInfo() : CardCombineInfo(),
793
810
  CardHolderName(),
794
811
  Address(),
795
- ((_a2 = session == null ? void 0 : session.checkout) == null ? void 0 : _a2.paymentType) === PaymentType.RECURRING && RecurringTip(),
812
+ StorePaymentTip(),
796
813
  /* @__PURE__ */ u("div", { className: PAY_FORM_FOOTER_CLASS_NAME, children: [
797
814
  isShowStoreCheckBox && StoreCheckBox(),
798
815
  ErrorMessage(),
@@ -801,15 +818,15 @@ const Card = w((props, ref) => {
801
818
  ] }) });
802
819
  };
803
820
  const FastPaymentForm = () => {
804
- var _a2, _b2, _c, _d;
821
+ var _a2, _b2, _c2, _d2;
805
822
  return /* @__PURE__ */ u(Form, { form, ref: setFormRef, onFormChange: (form2) => setForm(form2), children: /* @__PURE__ */ u("div", { className: normalizedClass(COMMON_CLASS_NAME, PAY_FORM_CLASS_NAME, bem()), children: [
806
823
  Email(),
807
824
  /* @__PURE__ */ u("div", { className: bem("card-selector-wrapper"), children: [
808
825
  /* @__PURE__ */ u(
809
826
  CardSelector,
810
827
  {
811
- value: (_c = (_b2 = (_a2 = session == null ? void 0 : session.checkout) == null ? void 0 : _a2.tokens) == null ? void 0 : _b2[0]) == null ? void 0 : _c.token,
812
- cardList: (_d = session == null ? void 0 : session.checkout) == null ? void 0 : _d.tokens,
828
+ value: (_c2 = (_b2 = (_a2 = session == null ? void 0 : session.checkout) == null ? void 0 : _a2.tokens) == null ? void 0 : _b2[0]) == null ? void 0 : _c2.token,
829
+ cardList: (_d2 = session == null ? void 0 : session.checkout) == null ? void 0 : _d2.tokens,
813
830
  disabled,
814
831
  onClickEdit: onEditOtherCard,
815
832
  onClickChange: onClickChangeCard,
@@ -844,7 +861,7 @@ const Card = w((props, ref) => {
844
861
  i18n,
845
862
  disabled,
846
863
  checkoutId: core.id,
847
- sessionMode: (_a = session.checkout) == null ? void 0 : _a.sessionMode,
864
+ sessionMode: (_f = session.checkout) == null ? void 0 : _f.sessionMode,
848
865
  supportedCardBrands,
849
866
  style: inputStyle || defaultInputStyleConfig,
850
867
  core,
@@ -868,7 +885,7 @@ const Card = w((props, ref) => {
868
885
  ThreeDSAuth,
869
886
  {
870
887
  show: showThreeDSModal,
871
- theme: (_b = session == null ? void 0 : session.checkout) == null ? void 0 : _b.theme,
888
+ theme: (_g = session == null ? void 0 : session.checkout) == null ? void 0 : _g.theme,
872
889
  onClose: handleCloseThreeDSModal,
873
890
  checkoutId: core.id,
874
891
  ...threeDSInfo
@@ -33,7 +33,9 @@ import { MbWay } from "../wallets/MbWay/MbWay.js";
33
33
  import { Multibanco } from "../wallets/Multibanco/Multibanco.js";
34
34
  import { PayU } from "../wallets/PayU/PayU.js";
35
35
  import { Satispay } from "../wallets/Satispay/Satispay.js";
36
- import { AliPay } from "../wallets/AliPay/AliPay.js";
36
+ import { AlipayPlus } from "../wallets/AlipayPlus/AlipayPlus.js";
37
+ import { Alipay } from "../wallets/Alipay/Alipay.js";
38
+ import { AlipayHK } from "../wallets/AlipayHK/AlipayHK.js";
37
39
  import { WechatPay } from "../wallets/WechatPay/WechatPay.js";
38
40
  import { PayByBank } from "../wallets/PayByBank/PayByBank.js";
39
41
  import { Fpx } from "../wallets/Fpx/Fpx.js";
@@ -97,6 +99,8 @@ import { IconPayU } from "../internal/icons/IconPayU.js";
97
99
  import { IconSatispay } from "../internal/icons/IconSatispay.js";
98
100
  import { IconWechatPayGlobal } from "../internal/icons/IconWechatPayGlobal.js";
99
101
  import { IconAlipayPlus } from "../internal/icons/IconAlipayPlus.js";
102
+ import { IconAlipay } from "../internal/icons/IconAlipay.js";
103
+ import { IconAlipayHK } from "../internal/icons/IconAlipayHK.js";
100
104
  import { IconPayByBank } from "../internal/icons/IconPayByBank.js";
101
105
  import { IconFpx } from "../internal/icons/IconFpx.js";
102
106
  import { IconDragonPay } from "../internal/icons/IconDragonPay.js";
@@ -120,7 +124,9 @@ const dropInSupportedPaymentMethods = [
120
124
  ...CardPaymentMethods,
121
125
  PaymentMethod.GOOGLE_PAY,
122
126
  PaymentMethod.APPLE_PAY,
123
- PaymentMethod.ALI_PAY,
127
+ PaymentMethod.ALIPAY_PLUS,
128
+ PaymentMethod.ALIPAY_HK,
129
+ PaymentMethod.ALIPAY,
124
130
  PaymentMethod.WECHAT_PAY,
125
131
  PaymentMethod.SEPA_DEBIT,
126
132
  PaymentMethod.BOOST,
@@ -223,7 +229,9 @@ const PaymentComponentMap = {
223
229
  [PaymentCategory.LINK_AJA]: LinkAja,
224
230
  [PaymentCategory.NU_PAY]: NuPay,
225
231
  [PaymentCategory.WECHAT_PAY]: WechatPay,
226
- [PaymentCategory.ALI_PAY]: AliPay,
232
+ [PaymentCategory.ALIPAY_PLUS]: AlipayPlus,
233
+ [PaymentCategory.ALIPAY]: Alipay,
234
+ [PaymentCategory.ALIPAY_HK]: AlipayHK,
227
235
  [PaymentCategory.SEPA_DEBIT]: Sepa
228
236
  };
229
237
  const paymentCategoryOptionMap = {
@@ -423,10 +431,18 @@ const paymentCategoryOptionMap = {
423
431
  icon: IconNuPay,
424
432
  nameKey: "dropIn.nuPay.label"
425
433
  },
426
- [PaymentCategory.ALI_PAY]: {
434
+ [PaymentCategory.ALIPAY_PLUS]: {
427
435
  icon: IconAlipayPlus,
436
+ nameKey: "dropIn.aliPayPlus.label"
437
+ },
438
+ [PaymentCategory.ALIPAY]: {
439
+ icon: IconAlipay,
428
440
  nameKey: "dropIn.aliPay.label"
429
441
  },
442
+ [PaymentCategory.ALIPAY_HK]: {
443
+ icon: IconAlipayHK,
444
+ nameKey: "dropIn.aliPayHK.label"
445
+ },
430
446
  [PaymentCategory.WECHAT_PAY]: {
431
447
  icon: IconWechatPayGlobal,
432
448
  nameKey: "dropIn.wechatPay.label"
@@ -580,7 +596,7 @@ const DropIn = w((props, ref) => {
580
596
  icon: () => {
581
597
  const Icon = paymentCategoryOptionMap[category].icon;
582
598
  const iconHeight = 24;
583
- return Icon ? /* @__PURE__ */ u(Icon, { size: category === PaymentCategory.ALI_PAY ? 20 : iconHeight }) : null;
599
+ return Icon ? /* @__PURE__ */ u(Icon, { size: category === PaymentCategory.ALIPAY_PLUS ? 20 : iconHeight }) : null;
584
600
  },
585
601
  name: i18n.get(paymentCategoryOptionMap[category].nameKey)
586
602
  }));
@@ -12,7 +12,6 @@ import { IconRedirect } from "../internal/icons/IconRedirect.js";
12
12
  import { IconScan } from "../internal/icons/IconScan.js";
13
13
  const { bem } = useBEM("guide-card");
14
14
  const GuideCard = (props) => {
15
- var _a, _b;
16
15
  const { type } = props;
17
16
  const { i18n } = useI18n();
18
17
  const redirectGuideCard = {
@@ -26,59 +25,17 @@ const GuideCard = (props) => {
26
25
  };
27
26
  };
28
27
  const guideCardInfoMap = {
29
- [PaymentCategory.ALI_PAY]: redirectGuideCard,
30
28
  [PaymentCategory.WECHAT_PAY]: getQRCodeGuideCard(i18n.get("common.wechatPayGlobal")),
31
- [PaymentCategory.BOOST]: redirectGuideCard,
32
- [PaymentCategory.GRAB_PAY]: redirectGuideCard,
33
- [PaymentCategory.LINE_PAY]: redirectGuideCard,
34
- [PaymentCategory.NINE_PAY]: redirectGuideCard,
35
- [PaymentCategory.SHOPEE_PAY]: redirectGuideCard,
36
- [PaymentCategory.TNG_WALLET]: redirectGuideCard,
37
- [PaymentCategory.MAY_BANK_QR_PAY]: redirectGuideCard,
29
+ [PaymentCategory.ALIPAY]: isMobile() ? redirectGuideCard : getQRCodeGuideCard(i18n.get("dropIn.aliPay.label")),
30
+ [PaymentCategory.ALIPAY_HK]: isMobile() ? redirectGuideCard : getQRCodeGuideCard(i18n.get("dropIn.aliPayHK.label")),
38
31
  [PaymentCategory.GCASH]: isMobile() ? redirectGuideCard : getQRCodeGuideCard(i18n.get("dropIn.gcash.label")),
39
- [PaymentCategory.PAYMAYA]: redirectGuideCard,
40
32
  [PaymentCategory.ZALOPAY]: isMobile() ? redirectGuideCard : getQRCodeGuideCard(i18n.get("dropIn.zalopay.label")),
41
- [PaymentCategory.VIETQR]: isMobile() ? redirectGuideCard : getQRCodeGuideCard(i18n.get("dropIn.vietqr.label")),
42
- [PaymentCategory.PIX]: redirectGuideCard,
43
- [PaymentCategory.PIC_PAY]: redirectGuideCard,
44
- [PaymentCategory.OPAY_WALLET]: redirectGuideCard,
45
- [PaymentCategory.PAGA_WALLET]: redirectGuideCard,
46
- [PaymentCategory.BANCONTACT]: redirectGuideCard,
47
- [PaymentCategory.IDEAL]: redirectGuideCard,
48
- [PaymentCategory.BLIK]: redirectGuideCard,
49
- [PaymentCategory.OVO]: redirectGuideCard,
50
- [PaymentCategory.SKRILL]: redirectGuideCard,
51
- [PaymentCategory.TRUSTLY]: redirectGuideCard,
52
- [PaymentCategory.P24]: redirectGuideCard,
53
- [PaymentCategory.BANCOMAT_PAY]: redirectGuideCard,
54
- [PaymentCategory.MY_BANK]: redirectGuideCard,
55
- [PaymentCategory.BIZUM]: redirectGuideCard,
56
- [PaymentCategory.EPS]: redirectGuideCard,
57
- [PaymentCategory.MB_WAY]: redirectGuideCard,
58
- [PaymentCategory.MULTIBANCO]: redirectGuideCard,
59
- [PaymentCategory.PAY_U]: redirectGuideCard,
60
- [PaymentCategory.SATISPAY]: redirectGuideCard,
61
- [PaymentCategory.PAY_BY_BANK]: redirectGuideCard,
62
- [PaymentCategory.FPX]: redirectGuideCard,
63
- [PaymentCategory.DRAGONPAY]: redirectGuideCard,
64
- [PaymentCategory.UPI]: redirectGuideCard,
65
- [PaymentCategory.ONLINE_BANKING_FINLAND]: redirectGuideCard,
66
- [PaymentCategory.ONLINE_BANKING_ESTONIA]: redirectGuideCard,
67
- [PaymentCategory.ONLINE_BANKING_LATVIA]: redirectGuideCard,
68
- [PaymentCategory.ONLINE_BANKING_LITHUANIA]: redirectGuideCard,
69
- [PaymentCategory.ONLINE_BANKING_INDONESIA]: redirectGuideCard,
70
- [PaymentCategory.ONLINE_BANKING_THAILAND]: redirectGuideCard,
71
- [PaymentCategory.SWISH]: redirectGuideCard,
72
- [PaymentCategory.TWINT]: redirectGuideCard,
73
- [PaymentCategory.DOKU]: redirectGuideCard,
74
- [PaymentCategory.GO_PAY]: redirectGuideCard,
75
- [PaymentCategory.JENIUS]: redirectGuideCard,
76
- [PaymentCategory.LINK_AJA]: redirectGuideCard,
77
- [PaymentCategory.NU_PAY]: redirectGuideCard
33
+ [PaymentCategory.VIETQR]: isMobile() ? redirectGuideCard : getQRCodeGuideCard(i18n.get("dropIn.vietqr.label"))
78
34
  };
79
- return /* @__PURE__ */ u(b, { children: guideCardInfoMap[type] && /* @__PURE__ */ u("div", { className: bem(), children: /* @__PURE__ */ u("div", { className: bem("content"), children: [
80
- /* @__PURE__ */ u("div", { className: bem("icon"), children: (_a = guideCardInfoMap[type]) == null ? void 0 : _a.icon }),
81
- /* @__PURE__ */ u("div", { className: bem("description"), children: (_b = guideCardInfoMap[type]) == null ? void 0 : _b.description })
35
+ const guideCardInfo = guideCardInfoMap[type] || redirectGuideCard;
36
+ return /* @__PURE__ */ u(b, { children: guideCardInfo && /* @__PURE__ */ u("div", { className: bem(), children: /* @__PURE__ */ u("div", { className: bem("content"), children: [
37
+ /* @__PURE__ */ u("div", { className: bem("icon"), children: guideCardInfo.icon }),
38
+ /* @__PURE__ */ u("div", { className: bem("description"), children: guideCardInfo.description })
82
39
  ] }) }) });
83
40
  };
84
41
  export {
@@ -11,7 +11,8 @@ import { usePayState } from "../../hooks/usePayState.js";
11
11
  import { useBaseWallet } from "../../hooks/useBaseWallet.js";
12
12
  import { DEFAULT_ADDRESS, AddressField } from "../AddressField/index.js";
13
13
  import "../internal/Modal/Modal.js";
14
- import "../business/QRCodeModal/qr-code-modal.js";
14
+ import "../internal/Loading/loading.js";
15
+ import "../business/QRCodeContent/qr-code-content.js";
15
16
  import { NameField } from "../business/NameField/NameField.js";
16
17
  import "../internal/Form/type.js";
17
18
  import "../internal/Form/context.js";
@@ -0,0 +1,68 @@
1
+ import { h, y, u, b } from "../../../core.js";
2
+ import { useBEM } from "../../../hooks/useBEM.js";
3
+ import { useI18n } from "../../../hooks/useI18n.js";
4
+ import "../../../out/fraud-detection.js";
5
+ import "../../../utils/card-brand/brands.js";
6
+ import "../../../utils/system-info/get-browser-info.js";
7
+ import { formatAmount } from "../../../utils/format.js";
8
+ import { formatTime } from "../../../utils/date.js";
9
+ import "../../../core/context.js";
10
+ import "../../../core/logger.js";
11
+ import { QRCode } from "../../internal/QRCode/QRCode.js";
12
+ import { Loading } from "../../internal/Loading/Loading2.js";
13
+ import "./qr-code-content.js";
14
+ const { bem } = useBEM("qr-code-modal");
15
+ const QRCodeContent = (props) => {
16
+ const {
17
+ title,
18
+ bgColor = "#FFFFFF",
19
+ textColor = "#1F1F1F",
20
+ borderColor = "#000000",
21
+ expiredTime,
22
+ amount,
23
+ icon,
24
+ qrCode,
25
+ mode = "image"
26
+ } = props;
27
+ const { i18n } = useI18n();
28
+ const [iframeLoaded, setIframeLoaded] = h(mode !== "iframe");
29
+ y(() => {
30
+ setIframeLoaded(mode !== "iframe");
31
+ }, [mode, qrCode]);
32
+ const useRoundBorder = !bgColor || ["transparent", "white", "#FFFFFF"].includes(bgColor);
33
+ const RoundBorder = () => {
34
+ return /* @__PURE__ */ u("div", { className: bem("round-border"), children: Array.from({ length: 4 }).map((_, index) => /* @__PURE__ */ u("div", { className: bem("round-border-item"), style: { borderColor } }, index)) });
35
+ };
36
+ return /* @__PURE__ */ u("div", { className: bem(), children: [
37
+ /* @__PURE__ */ u("div", { className: bem("title"), children: title }),
38
+ /* @__PURE__ */ u("div", { className: bem("container"), children: /* @__PURE__ */ u("div", { className: bem("body"), style: { backgroundColor: bgColor }, children: [
39
+ icon && /* @__PURE__ */ u("div", { className: bem("icon"), children: icon }),
40
+ /* @__PURE__ */ u("div", { className: bem("qr-code-container"), children: [
41
+ useRoundBorder && /* @__PURE__ */ u(RoundBorder, {}),
42
+ /* @__PURE__ */ u("div", { className: bem("qr-code"), children: mode === "iframe" ? /* @__PURE__ */ u(b, { children: [
43
+ !iframeLoaded && /* @__PURE__ */ u(Loading, { fixed: false, style: { position: "absolute" } }),
44
+ /* @__PURE__ */ u(
45
+ "iframe",
46
+ {
47
+ className: bem("iframe", { loaded: iframeLoaded }),
48
+ src: qrCode,
49
+ title,
50
+ width: 160,
51
+ height: 160,
52
+ frameBorder: "0",
53
+ onLoad: () => setIframeLoaded(true)
54
+ }
55
+ )
56
+ ] }) : /* @__PURE__ */ u(QRCode, { size: 160, value: qrCode }) })
57
+ ] }),
58
+ expiredTime && /* @__PURE__ */ u(b, { children: [
59
+ /* @__PURE__ */ u("div", { style: { color: textColor }, className: bem("expired-time"), children: formatTime(expiredTime) }),
60
+ /* @__PURE__ */ u("div", { style: { color: textColor }, className: bem("expired-time-text"), children: i18n.get("qrCode.expired") })
61
+ ] })
62
+ ] }) }),
63
+ amount && /* @__PURE__ */ u("div", { className: bem("amount"), children: formatAmount(amount).jointSymbolAndCurrency() })
64
+ ] });
65
+ };
66
+ export {
67
+ QRCodeContent
68
+ };
@@ -0,0 +1,8 @@
1
+ import "../../../core.js";
2
+ import "../../../utils/card-brand/brands.js";
3
+ import "../../../utils/system-info/get-browser-info.js";
4
+ import "../../../core/context.js";
5
+ import "../../../out/fraud-detection.js";
6
+ import "../../../core/logger.js";
7
+ import "../../internal/Loading/loading.js";
8
+ import "./qr-code-content.js";
@@ -1,61 +1,22 @@
1
- import { u, b } from "../../../core.js";
2
- import { useBEM } from "../../../hooks/useBEM.js";
3
- import { useI18n } from "../../../hooks/useI18n.js";
4
- import "../../../out/fraud-detection.js";
1
+ import { u } from "../../../core.js";
5
2
  import "../../../utils/card-brand/brands.js";
6
3
  import "../../../utils/system-info/get-browser-info.js";
7
- import { formatAmount } from "../../../utils/format.js";
8
- import { formatTime } from "../../../utils/date.js";
9
4
  import "../../../core/context.js";
5
+ import "../../../out/fraud-detection.js";
10
6
  import "../../../core/logger.js";
11
7
  import { useBreakpoints } from "../../../hooks/useBreakpoints.js";
12
8
  import { Modal } from "../../internal/Modal/Modal.js";
13
- import "./qr-code-modal.js";
14
- import { QRCode } from "../../internal/QRCode/QRCode.js";
15
- const { bem } = useBEM("qr-code-modal");
9
+ import { QRCodeContent } from "../QRCodeContent/QRCodeContent.js";
16
10
  const QRCodeModal = (props) => {
17
- const {
18
- title,
19
- bgColor = "#FFFFFF",
20
- textColor = "#1F1F1F",
21
- borderColor = "#000000",
22
- expiredTime,
23
- amount,
24
- icon,
25
- qrCode,
26
- onClose
27
- } = props;
28
- const { i18n } = useI18n();
11
+ const { onClose } = props;
29
12
  const breakpoints = useBreakpoints();
30
- const useRoundBorder = !bgColor || ["transparent", "white", "#FFFFFF"].includes(bgColor);
31
- const RoundBorder = () => {
32
- return /* @__PURE__ */ u("div", {
33
- className: bem("round-border"),
34
- // 表示4个边角
35
- children: Array.from({ length: 4 }).map((_, index) => /* @__PURE__ */ u("div", { className: bem("round-border-item"), style: { borderColor } }, index))
36
- });
37
- };
38
13
  return /* @__PURE__ */ u(
39
14
  Modal,
40
15
  {
41
16
  show: true,
42
17
  width: breakpoints.smaller("xs") ? "90vw" : "340px",
43
18
  onChange: (status) => !status && (onClose == null ? void 0 : onClose()),
44
- children: /* @__PURE__ */ u("div", { className: bem(), children: [
45
- /* @__PURE__ */ u("div", { className: bem("title"), children: title }),
46
- /* @__PURE__ */ u("div", { className: bem("container"), children: /* @__PURE__ */ u("div", { className: bem("body"), style: { backgroundColor: bgColor }, children: [
47
- icon && /* @__PURE__ */ u("div", { className: bem("icon"), children: icon }),
48
- /* @__PURE__ */ u("div", { className: bem("qr-code-container"), children: [
49
- useRoundBorder && /* @__PURE__ */ u(RoundBorder, {}),
50
- /* @__PURE__ */ u("div", { className: bem("qr-code"), children: /* @__PURE__ */ u(QRCode, { size: 160, value: qrCode }) })
51
- ] }),
52
- expiredTime && /* @__PURE__ */ u(b, { children: [
53
- /* @__PURE__ */ u("div", { style: { color: textColor }, className: bem("expired-time"), children: formatTime(expiredTime) }),
54
- /* @__PURE__ */ u("div", { style: { color: textColor }, className: bem("expired-time-text"), children: i18n.get("qrCode.expired") })
55
- ] })
56
- ] }) }),
57
- amount && /* @__PURE__ */ u("div", { className: bem("amount"), children: formatAmount(amount).jointSymbolAndCurrency() })
58
- ] })
19
+ children: /* @__PURE__ */ u(QRCodeContent, { ...props, mode: "image" })
59
20
  }
60
21
  );
61
22
  };
@@ -5,4 +5,5 @@ import "../../../core/context.js";
5
5
  import "../../../out/fraud-detection.js";
6
6
  import "../../../core/logger.js";
7
7
  import "../../internal/Modal/Modal.js";
8
- import "./qr-code-modal.js";
8
+ import "../../internal/Loading/loading.js";
9
+ import "../QRCodeContent/qr-code-content.js";
@@ -5,7 +5,8 @@ import "../../core/context.js";
5
5
  import "../../out/fraud-detection.js";
6
6
  import "../../core/logger.js";
7
7
  import "../internal/Modal/Modal.js";
8
- import "./QRCodeModal/qr-code-modal.js";
8
+ import "../internal/Loading/loading.js";
9
+ import "./QRCodeContent/qr-code-content.js";
9
10
  import "../internal/Form/type.js";
10
11
  import "../internal/Form/context.js";
11
12
  import "../internal/Form/FormItem.js";
@@ -58,7 +58,9 @@ import "./wallets/MbWay/MbWay.js";
58
58
  import "./wallets/Multibanco/Multibanco.js";
59
59
  import "./wallets/PayU/PayU.js";
60
60
  import "./wallets/Satispay/Satispay.js";
61
- import "./wallets/AliPay/AliPay.js";
61
+ import "./wallets/AlipayPlus/AlipayPlus.js";
62
+ import "./wallets/Alipay/Alipay.js";
63
+ import "./wallets/AlipayHK/AlipayHK.js";
62
64
  import "./wallets/WechatPay/WechatPay.js";
63
65
  import "./wallets/PayByBank/PayByBank.js";
64
66
  import "./wallets/Fpx/Fpx.js";
@@ -10,7 +10,7 @@ import "../../../out/fraud-detection.js";
10
10
  import "../../../core/logger.js";
11
11
  const { bem } = useBEM("button");
12
12
  function Button(props) {
13
- const { style, className, children, icon, loading, disabled, dashed } = props;
13
+ const { style, className, children, icon, loading, disabled, dashed, ghost } = props;
14
14
  function onClick(event) {
15
15
  var _a;
16
16
  if (loading || disabled)
@@ -20,7 +20,7 @@ function Button(props) {
20
20
  return /* @__PURE__ */ u(
21
21
  "button",
22
22
  {
23
- className: normalizedClass(COMMON_CLASS_NAME, bem({ loading, disabled, dashed }), className),
23
+ className: normalizedClass(COMMON_CLASS_NAME, bem({ loading, disabled, dashed, ghost }), className),
24
24
  style,
25
25
  onClick,
26
26
  children: [