@pisell/private-materials 3.0.111 → 3.0.113
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.
- package/build/lowcode/assets-daily.json +19 -11
- package/build/lowcode/assets-dev.json +10 -2
- package/build/lowcode/assets-prod.json +19 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +18 -16
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +18 -16
- package/es/components/booking/addons/index.d.ts +1 -1
- package/es/components/booking/addons/model.d.ts +2 -1
- package/es/components/booking/components/footer/index.js +1 -1
- package/es/components/booking/deposit/DepositItem/index.d.ts +4 -1
- package/es/components/booking/deposit/DepositItem/index.js +17 -6
- package/es/components/booking/deposit/DepositItem/index.less +36 -12
- package/es/components/booking/deposit/index.js +5 -2
- package/es/components/booking/forms/forms.d.ts +1 -1
- package/es/components/booking/forms/index.d.ts +1 -1
- package/es/components/booking/forms/model.d.ts +2 -1
- package/es/components/booking/index.d.ts +1 -1
- package/es/components/booking/info/index.d.ts +1 -1
- package/es/components/booking/info/model.d.ts +2 -1
- package/es/components/booking/info/service/editService/index.js +11 -9
- package/es/components/booking/locales.d.ts +12 -0
- package/es/components/booking/locales.js +12 -0
- package/es/components/booking/model.d.ts +2 -1
- package/es/components/booking/notes/index.d.ts +1 -1
- package/es/components/booking/notes/model.d.ts +2 -1
- package/es/components/booking/payments/index.d.ts +1 -1
- package/es/components/booking/payments/model.d.ts +2 -1
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +2 -1
- package/es/components/pay/toC/PayAmount/index.d.ts +15 -0
- package/es/components/pay/toC/PayAmount/index.js +25 -0
- package/es/components/pay/toC/PayAmount/index.less +21 -0
- package/es/components/pay/toC/PayCountdown/index.d.ts +15 -0
- package/es/components/pay/toC/PayCountdown/index.js +26 -0
- package/es/components/pay/toC/PayCountdown/index.less +22 -0
- package/es/components/pay/toC/PaymentList/index.d.ts +19 -0
- package/es/components/pay/toC/PaymentList/index.js +342 -0
- package/es/components/pay/toC/PaymentList/index.less +112 -0
- package/es/components/pay/toC/PaymentList/mock.d.ts +88 -0
- package/es/components/pay/toC/PaymentList/mock.js +128 -0
- package/es/components/pay/toC/PaymentList/payment/alipay.svg +13 -0
- package/es/components/pay/toC/PaymentList/payment/apple_pay.svg +7 -0
- package/es/components/pay/toC/PaymentList/payment/bank_deposit.svg +11 -0
- package/es/components/pay/toC/PaymentList/payment/cash.svg +8 -0
- package/es/components/pay/toC/PaymentList/payment/credit_card.svg +10 -0
- package/es/components/pay/toC/PaymentList/payment/custom.svg +10 -0
- package/es/components/pay/toC/PaymentList/payment/google_pay.svg +9 -0
- package/es/components/pay/toC/PaymentList/payment/paypal.svg +8 -0
- package/es/components/pay/toC/PaymentList/payment/stripe.svg +16 -0
- package/es/components/pay/toC/PaymentList/payment/wxpay.svg +5 -0
- package/es/components/pay/toC/PaymentList/serve.d.ts +26 -0
- package/es/components/pay/toC/PaymentList/serve.js +135 -0
- package/es/components/pay/toC/PaymentList/status.d.ts +4 -0
- package/es/components/pay/toC/PaymentList/status.js +100 -0
- package/es/components/pay/toC/PaymentList/utils.d.ts +10 -0
- package/es/components/pay/toC/PaymentList/utils.js +53 -0
- package/es/components/pay/toC/PaymentMethods/ApplePay/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/ApplePay/index.js +113 -0
- package/es/components/pay/toC/PaymentMethods/ApplePay/index.less +0 -0
- package/es/components/pay/toC/PaymentMethods/BankDeposit/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/BankDeposit/index.js +74 -0
- package/es/components/pay/toC/PaymentMethods/BankDeposit/index.less +0 -0
- package/es/components/pay/toC/PaymentMethods/CashManual/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/CashManual/index.js +79 -0
- package/es/components/pay/toC/PaymentMethods/CashManual/index.less +0 -0
- package/es/components/pay/toC/PaymentMethods/CashManual/serve.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/CashManual/serve.js +27 -0
- package/es/components/pay/toC/PaymentMethods/CustomPayment/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/CustomPayment/index.js +78 -0
- package/es/components/pay/toC/PaymentMethods/CustomPayment/index.less +0 -0
- package/es/components/pay/toC/PaymentMethods/CustomPayment/serve.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/CustomPayment/serve.js +27 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.js +109 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.less +0 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/serve.d.ts +2 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/serve.js +41 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.js +109 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.less +0 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/serve.d.ts +2 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/serve.js +41 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayQrcode/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayQrcode/index.js +65 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayQrcode/index.less +0 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayQrcode/serve.d.ts +2 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayQrcode/serve.js +36 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/index.js +109 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/index.less +0 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/serve.d.ts +2 -0
- package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/serve.js +41 -0
- package/es/components/pay/toC/PaymentMethods/GooglePay/index.d.ts +9 -0
- package/es/components/pay/toC/PaymentMethods/GooglePay/index.js +110 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.d.ts +12 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.js +349 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.less +25 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/List/index.d.ts +11 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/List/index.js +375 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/List/index.less +95 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/List/serve.d.ts +5 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/List/serve.js +37 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +4 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.js +21 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.less +24 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.js +222 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.less +0 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/index.d.ts +7 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/index.js +130 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/index.less +0 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +61 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +524 -0
- package/es/components/pay/toC/PaymentMethods/OfflinePayment/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/OfflinePayment/index.js +73 -0
- package/es/components/pay/toC/PaymentMethods/OfflinePayment/index.less +0 -0
- package/es/components/pay/toC/PaymentMethods/OfflinePayment/serve.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/OfflinePayment/serve.js +27 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.d.ts +6 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.js +61 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +3 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.js +121 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.less +35 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/serve.d.ts +9 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/serve.js +33 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/DynamicSDK.d.ts +2 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/DynamicSDK.js +30 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +8 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.js +37 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +8 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.js +13 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +3 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.js +15 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.less +27 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/stripe_loading.gif +0 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +3 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.js +108 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +4 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.js +113 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.less +22 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +4 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.js +96 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.module.less +4 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/serve.d.ts +9 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/serve.js +33 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/index.js +78 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/index.less +0 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/serve.d.ts +2 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/serve.js +36 -0
- package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +108 -0
- package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.less +0 -0
- package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/serve.d.ts +2 -0
- package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/serve.js +41 -0
- package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.d.ts +10 -0
- package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.js +109 -0
- package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.less +0 -0
- package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/serve.d.ts +2 -0
- package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/serve.js +41 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +15 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.js +142 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.less +20 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/MultiModeSearch/index.d.ts +6 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/MultiModeSearch/index.js +19 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +20 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +344 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.less +0 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +111 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.js +114 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +3 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +40 -0
- package/es/components/pay/toC/PaymentMethods/index.d.ts +9 -0
- package/es/components/pay/toC/PaymentMethods/index.js +316 -0
- package/es/components/pay/toC/WalletPassBlock/index.d.ts +14 -0
- package/es/components/pay/toC/WalletPassBlock/index.js +72 -0
- package/es/components/pay/toC/WalletPassBlock/index.less +65 -0
- package/es/components/pay/toC/index.d.ts +3 -0
- package/es/components/pay/toC/index.js +647 -0
- package/es/components/pay/toC/index.less +22 -0
- package/es/components/pay/toC/locales.d.ts +208 -0
- package/es/components/pay/toC/locales.js +207 -0
- package/es/components/pay/toC/model.d.ts +35 -0
- package/es/components/pay/toC/model.js +43 -0
- package/es/components/pay/toC/payGroup.d.ts +48 -0
- package/es/components/pay/toC/payGroup.js +105 -0
- package/es/components/pay/toC/serve.d.ts +34 -0
- package/es/components/pay/toC/serve.js +148 -0
- package/es/components/pay/toC/status.d.ts +3 -0
- package/es/components/pay/toC/status.js +82 -0
- package/es/components/pay/toC/utils.d.ts +30 -0
- package/es/components/pay/toC/utils.js +48 -0
- package/es/components/schedules/index.d.ts +1 -1
- package/es/components/schedules/model.d.ts +2 -1
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/utils/index.d.ts +6 -5
- package/es/utils/index.js +28 -6
- package/lib/components/booking/addons/index.d.ts +1 -1
- package/lib/components/booking/addons/model.d.ts +2 -1
- package/lib/components/booking/components/footer/index.js +1 -1
- package/lib/components/booking/deposit/DepositItem/index.d.ts +4 -1
- package/lib/components/booking/deposit/DepositItem/index.js +17 -6
- package/lib/components/booking/deposit/DepositItem/index.less +36 -12
- package/lib/components/booking/deposit/index.js +5 -2
- package/lib/components/booking/forms/forms.d.ts +1 -1
- package/lib/components/booking/forms/index.d.ts +1 -1
- package/lib/components/booking/forms/model.d.ts +2 -1
- package/lib/components/booking/index.d.ts +1 -1
- package/lib/components/booking/info/index.d.ts +1 -1
- package/lib/components/booking/info/model.d.ts +2 -1
- package/lib/components/booking/info/service/editService/index.js +2 -0
- package/lib/components/booking/locales.d.ts +12 -0
- package/lib/components/booking/locales.js +12 -0
- package/lib/components/booking/model.d.ts +2 -1
- package/lib/components/booking/notes/index.d.ts +1 -1
- package/lib/components/booking/notes/model.d.ts +2 -1
- package/lib/components/booking/payments/index.d.ts +1 -1
- package/lib/components/booking/payments/model.d.ts +2 -1
- package/lib/components/index.d.ts +2 -1
- package/lib/components/index.js +5 -2
- package/lib/components/pay/toC/PayAmount/index.d.ts +15 -0
- package/lib/components/pay/toC/PayAmount/index.js +42 -0
- package/lib/components/pay/toC/PayAmount/index.less +21 -0
- package/lib/components/pay/toC/PayCountdown/index.d.ts +15 -0
- package/lib/components/pay/toC/PayCountdown/index.js +49 -0
- package/lib/components/pay/toC/PayCountdown/index.less +22 -0
- package/lib/components/pay/toC/PaymentList/index.d.ts +19 -0
- package/lib/components/pay/toC/PaymentList/index.js +256 -0
- package/lib/components/pay/toC/PaymentList/index.less +112 -0
- package/lib/components/pay/toC/PaymentList/mock.d.ts +88 -0
- package/lib/components/pay/toC/PaymentList/mock.js +174 -0
- package/lib/components/pay/toC/PaymentList/payment/alipay.svg +13 -0
- package/lib/components/pay/toC/PaymentList/payment/apple_pay.svg +7 -0
- package/lib/components/pay/toC/PaymentList/payment/bank_deposit.svg +11 -0
- package/lib/components/pay/toC/PaymentList/payment/cash.svg +8 -0
- package/lib/components/pay/toC/PaymentList/payment/credit_card.svg +10 -0
- package/lib/components/pay/toC/PaymentList/payment/custom.svg +10 -0
- package/lib/components/pay/toC/PaymentList/payment/google_pay.svg +9 -0
- package/lib/components/pay/toC/PaymentList/payment/paypal.svg +8 -0
- package/lib/components/pay/toC/PaymentList/payment/stripe.svg +16 -0
- package/lib/components/pay/toC/PaymentList/payment/wxpay.svg +5 -0
- package/lib/components/pay/toC/PaymentList/serve.d.ts +26 -0
- package/lib/components/pay/toC/PaymentList/serve.js +83 -0
- package/lib/components/pay/toC/PaymentList/status.d.ts +4 -0
- package/lib/components/pay/toC/PaymentList/status.js +132 -0
- package/lib/components/pay/toC/PaymentList/utils.d.ts +10 -0
- package/lib/components/pay/toC/PaymentList/utils.js +52 -0
- package/lib/components/pay/toC/PaymentMethods/ApplePay/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/ApplePay/index.js +96 -0
- package/lib/components/pay/toC/PaymentMethods/ApplePay/index.less +0 -0
- package/lib/components/pay/toC/PaymentMethods/BankDeposit/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/BankDeposit/index.js +68 -0
- package/lib/components/pay/toC/PaymentMethods/BankDeposit/index.less +0 -0
- package/lib/components/pay/toC/PaymentMethods/CashManual/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/CashManual/index.js +56 -0
- package/lib/components/pay/toC/PaymentMethods/CashManual/index.less +0 -0
- package/lib/components/pay/toC/PaymentMethods/CashManual/serve.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/CashManual/serve.js +33 -0
- package/lib/components/pay/toC/PaymentMethods/CustomPayment/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/CustomPayment/index.js +56 -0
- package/lib/components/pay/toC/PaymentMethods/CustomPayment/index.less +0 -0
- package/lib/components/pay/toC/PaymentMethods/CustomPayment/serve.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/CustomPayment/serve.js +33 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.js +89 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.less +0 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/serve.d.ts +2 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/serve.js +44 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.js +89 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.less +0 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/serve.d.ts +2 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/serve.js +44 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayQrcode/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayQrcode/index.js +61 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayQrcode/index.less +0 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayQrcode/serve.d.ts +2 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayQrcode/serve.js +43 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/index.js +89 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/index.less +0 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/serve.d.ts +2 -0
- package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/serve.js +44 -0
- package/lib/components/pay/toC/PaymentMethods/GooglePay/index.d.ts +9 -0
- package/lib/components/pay/toC/PaymentMethods/GooglePay/index.js +95 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.d.ts +12 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.js +270 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.less +25 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/List/index.d.ts +11 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/List/index.js +224 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/List/index.less +95 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/List/serve.d.ts +5 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/List/serve.js +39 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +4 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.js +52 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.less +24 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.js +139 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.less +0 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/index.d.ts +7 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/index.js +80 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/index.less +0 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +61 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +336 -0
- package/lib/components/pay/toC/PaymentMethods/OfflinePayment/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/OfflinePayment/index.js +53 -0
- package/lib/components/pay/toC/PaymentMethods/OfflinePayment/index.less +0 -0
- package/lib/components/pay/toC/PaymentMethods/OfflinePayment/serve.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/OfflinePayment/serve.js +33 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.d.ts +6 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.js +76 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +3 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.js +107 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.less +35 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/serve.d.ts +9 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/serve.js +30 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/DynamicSDK.d.ts +2 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/DynamicSDK.js +44 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +8 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.js +69 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +8 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.js +44 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +3 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.js +48 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.less +27 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/stripe_loading.gif +0 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +3 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.js +124 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +4 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.js +94 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.less +22 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +4 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.js +81 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.module.less +4 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/serve.d.ts +9 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/serve.js +30 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/index.js +71 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/index.less +0 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/serve.d.ts +2 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/serve.js +43 -0
- package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +88 -0
- package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.less +0 -0
- package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/serve.d.ts +2 -0
- package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/serve.js +44 -0
- package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.d.ts +10 -0
- package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.js +87 -0
- package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.less +0 -0
- package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/serve.d.ts +2 -0
- package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/serve.js +44 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +15 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.js +126 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.less +20 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/MultiModeSearch/index.d.ts +6 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/MultiModeSearch/index.js +56 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +20 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +284 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.less +0 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +111 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.js +54 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +3 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +70 -0
- package/lib/components/pay/toC/PaymentMethods/index.d.ts +9 -0
- package/lib/components/pay/toC/PaymentMethods/index.js +176 -0
- package/lib/components/pay/toC/WalletPassBlock/index.d.ts +14 -0
- package/lib/components/pay/toC/WalletPassBlock/index.js +97 -0
- package/lib/components/pay/toC/WalletPassBlock/index.less +65 -0
- package/lib/components/pay/toC/index.d.ts +3 -0
- package/lib/components/pay/toC/index.js +366 -0
- package/lib/components/pay/toC/index.less +22 -0
- package/lib/components/pay/toC/locales.d.ts +208 -0
- package/lib/components/pay/toC/locales.js +231 -0
- package/lib/components/pay/toC/model.d.ts +35 -0
- package/lib/components/pay/toC/model.js +60 -0
- package/lib/components/pay/toC/payGroup.d.ts +48 -0
- package/lib/components/pay/toC/payGroup.js +77 -0
- package/lib/components/pay/toC/serve.d.ts +34 -0
- package/lib/components/pay/toC/serve.js +78 -0
- package/lib/components/pay/toC/status.d.ts +3 -0
- package/lib/components/pay/toC/status.js +92 -0
- package/lib/components/pay/toC/utils.d.ts +30 -0
- package/lib/components/pay/toC/utils.js +62 -0
- package/lib/components/schedules/index.d.ts +1 -1
- package/lib/components/schedules/model.d.ts +2 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/utils/index.d.ts +6 -5
- package/lib/utils/index.js +12 -1
- package/lowcode/toc-pay/meta.ts +59 -0
- package/package.json +4 -3
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
3
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
9
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
10
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
+
import React, { useState, useImperativeHandle, forwardRef, useContext } from 'react';
|
|
12
|
+
import { PisellModal } from '@pisell/materials';
|
|
13
|
+
import ThreedsLoading from "./ThreedsLoading";
|
|
14
|
+
import { startPayment } from "../tds2";
|
|
15
|
+
import { fastPayNew } from "../List/serve";
|
|
16
|
+
import { Context } from "../../../model";
|
|
17
|
+
import { getPayGroupParamsFromStorage, setPayNumber } from "../../../payGroup";
|
|
18
|
+
import "./index.less";
|
|
19
|
+
import { locales } from '@pisell/utils';
|
|
20
|
+
/**
|
|
21
|
+
* @title: 3ds验证
|
|
22
|
+
* @description:
|
|
23
|
+
* @param {TDSPayProps} props
|
|
24
|
+
* @param {React} ref
|
|
25
|
+
* @return {*}
|
|
26
|
+
* @Author: zhiwei.Wang
|
|
27
|
+
* @Date: 2024-08-16 11:15
|
|
28
|
+
*/
|
|
29
|
+
var TDSPay = function TDSPay(props, ref) {
|
|
30
|
+
var onChange = props.onChange;
|
|
31
|
+
var _useState = useState(false),
|
|
32
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
33
|
+
open = _useState2[0],
|
|
34
|
+
setOpen = _useState2[1];
|
|
35
|
+
var _useContext = useContext(Context),
|
|
36
|
+
state = _useContext.state;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @title: 初始化
|
|
40
|
+
* @description:
|
|
41
|
+
* @param {any} res
|
|
42
|
+
* @param {any} order
|
|
43
|
+
* @return {*}
|
|
44
|
+
* @Author: zhiwei.Wang
|
|
45
|
+
* @Date: 2024-08-16 11:15
|
|
46
|
+
*/
|
|
47
|
+
var init = /*#__PURE__*/function () {
|
|
48
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(res, order) {
|
|
49
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
50
|
+
while (1) switch (_context.prev = _context.next) {
|
|
51
|
+
case 0:
|
|
52
|
+
setOpen(true);
|
|
53
|
+
|
|
54
|
+
// 已保存的卡
|
|
55
|
+
if (res.id) {
|
|
56
|
+
_fastPayNew(res);
|
|
57
|
+
} else {
|
|
58
|
+
// 新卡
|
|
59
|
+
newCardPay(res);
|
|
60
|
+
}
|
|
61
|
+
case 2:
|
|
62
|
+
case "end":
|
|
63
|
+
return _context.stop();
|
|
64
|
+
}
|
|
65
|
+
}, _callee);
|
|
66
|
+
}));
|
|
67
|
+
return function init(_x2, _x3) {
|
|
68
|
+
return _ref.apply(this, arguments);
|
|
69
|
+
};
|
|
70
|
+
}();
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @title: 支付结果回调
|
|
74
|
+
* @description:
|
|
75
|
+
* @param {any} res
|
|
76
|
+
* @return {*}
|
|
77
|
+
* @Author: zhiwei.Wang
|
|
78
|
+
* @Date: 2024-08-16 11:15
|
|
79
|
+
*/
|
|
80
|
+
var payCallback = function payCallback(res) {
|
|
81
|
+
setOpen(false);
|
|
82
|
+
if (res.key === 'hideModal') {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(res);
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* @title: 快捷支付
|
|
90
|
+
* @description:
|
|
91
|
+
* @param {any} res
|
|
92
|
+
* @return {*}
|
|
93
|
+
* @Author: zhiwei.Wang
|
|
94
|
+
* @Date: 2024-08-16 11:15
|
|
95
|
+
*/
|
|
96
|
+
var _fastPayNew = /*#__PURE__*/function () {
|
|
97
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(res) {
|
|
98
|
+
var _state$payGroup, _state$payGroup2, _state$payGroup3, params, _yield$fastPayNew, data;
|
|
99
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
100
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
101
|
+
case 0:
|
|
102
|
+
_context2.prev = 0;
|
|
103
|
+
// 获取交易组
|
|
104
|
+
params = getPayGroupParamsFromStorage((_state$payGroup = state.payGroup) === null || _state$payGroup === void 0 ? void 0 : _state$payGroup.order_id, {
|
|
105
|
+
card_id: res.id
|
|
106
|
+
});
|
|
107
|
+
if (params) {
|
|
108
|
+
_context2.next = 5;
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
payCallback === null || payCallback === void 0 ? void 0 : payCallback({
|
|
112
|
+
key: 'fail',
|
|
113
|
+
data: {
|
|
114
|
+
message: locales.getText('tocPay.text.getParamsFail')
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
return _context2.abrupt("return");
|
|
118
|
+
case 5:
|
|
119
|
+
_context2.next = 7;
|
|
120
|
+
return fastPayNew({
|
|
121
|
+
order_id: (_state$payGroup2 = state.payGroup) === null || _state$payGroup2 === void 0 ? void 0 : _state$payGroup2.order_id,
|
|
122
|
+
params: params
|
|
123
|
+
});
|
|
124
|
+
case 7:
|
|
125
|
+
_yield$fastPayNew = _context2.sent;
|
|
126
|
+
data = _yield$fastPayNew.data;
|
|
127
|
+
// 设置交易号
|
|
128
|
+
setPayNumber((_state$payGroup3 = state.payGroup) === null || _state$payGroup3 === void 0 ? void 0 : _state$payGroup3.order_id, data === null || data === void 0 ? void 0 : data.pay_number);
|
|
129
|
+
|
|
130
|
+
// token 直接跳转成功页面
|
|
131
|
+
if ((data === null || data === void 0 ? void 0 : data.type) === 'token') {
|
|
132
|
+
payCallback === null || payCallback === void 0 ? void 0 : payCallback({
|
|
133
|
+
key: 'success',
|
|
134
|
+
data: data
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// 3DS 跳转3DS验证页面
|
|
139
|
+
if ((data === null || data === void 0 ? void 0 : data.type) === '3ds') {
|
|
140
|
+
startPayment({
|
|
141
|
+
payData: data
|
|
142
|
+
}, payCallback);
|
|
143
|
+
}
|
|
144
|
+
_context2.next = 17;
|
|
145
|
+
break;
|
|
146
|
+
case 14:
|
|
147
|
+
_context2.prev = 14;
|
|
148
|
+
_context2.t0 = _context2["catch"](0);
|
|
149
|
+
// 失败
|
|
150
|
+
payCallback === null || payCallback === void 0 ? void 0 : payCallback({
|
|
151
|
+
key: 'fail',
|
|
152
|
+
data: _context2.t0
|
|
153
|
+
});
|
|
154
|
+
case 17:
|
|
155
|
+
case "end":
|
|
156
|
+
return _context2.stop();
|
|
157
|
+
}
|
|
158
|
+
}, _callee2, null, [[0, 14]]);
|
|
159
|
+
}));
|
|
160
|
+
return function _fastPayNew(_x4) {
|
|
161
|
+
return _ref2.apply(this, arguments);
|
|
162
|
+
};
|
|
163
|
+
}();
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* @title: 新卡支付
|
|
167
|
+
* @description:
|
|
168
|
+
* @param {any} res
|
|
169
|
+
* @return {*}
|
|
170
|
+
* @Author: zhiwei.Wang
|
|
171
|
+
* @Date: 2024-08-16 11:16
|
|
172
|
+
*/
|
|
173
|
+
var newCardPay = function newCardPay(res) {
|
|
174
|
+
var _state$payGroup4, _state$payGroup5;
|
|
175
|
+
var _cardInfo = {
|
|
176
|
+
card_name: res.card_name,
|
|
177
|
+
card_number: res.card_number,
|
|
178
|
+
card_expiry_month: res.date.format('MM'),
|
|
179
|
+
card_expiry_year: res.date.format('YY'),
|
|
180
|
+
card_ccv: res.card_ccv,
|
|
181
|
+
is_save: res.is_save ? 1 : 0
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
// 补全交易组信息
|
|
185
|
+
_cardInfo = getPayGroupParamsFromStorage((_state$payGroup4 = state.payGroup) === null || _state$payGroup4 === void 0 ? void 0 : _state$payGroup4.order_id, _cardInfo);
|
|
186
|
+
if (!_cardInfo) {
|
|
187
|
+
payCallback === null || payCallback === void 0 ? void 0 : payCallback({
|
|
188
|
+
key: 'fail',
|
|
189
|
+
data: {
|
|
190
|
+
message: locales.getText('tocPay.text.getParamsFail')
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// 3ds支付
|
|
197
|
+
startPayment({
|
|
198
|
+
orderId: (_state$payGroup5 = state.payGroup) === null || _state$payGroup5 === void 0 ? void 0 : _state$payGroup5.order_id,
|
|
199
|
+
cardInfo: _cardInfo
|
|
200
|
+
}, payCallback);
|
|
201
|
+
};
|
|
202
|
+
useImperativeHandle(ref, function () {
|
|
203
|
+
return {
|
|
204
|
+
init: init
|
|
205
|
+
};
|
|
206
|
+
});
|
|
207
|
+
return /*#__PURE__*/React.createElement(PisellModal, {
|
|
208
|
+
platform: 'h5',
|
|
209
|
+
open: open,
|
|
210
|
+
footer: false,
|
|
211
|
+
header: false,
|
|
212
|
+
closable: false,
|
|
213
|
+
bodyStyle: {
|
|
214
|
+
padding: 0
|
|
215
|
+
}
|
|
216
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
217
|
+
className: ""
|
|
218
|
+
}, /*#__PURE__*/React.createElement(ThreedsLoading, null), /*#__PURE__*/React.createElement("div", {
|
|
219
|
+
id: "threeds-container"
|
|
220
|
+
})));
|
|
221
|
+
};
|
|
222
|
+
export default /*#__PURE__*/forwardRef(TDSPay);
|
|
File without changes
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
3
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
9
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
10
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
+
import React, { useState, useEffect, useContext, useRef, useImperativeHandle, forwardRef } from 'react';
|
|
12
|
+
import MWCreditCardList from "./List";
|
|
13
|
+
import AddMWCreditCard from "./Add";
|
|
14
|
+
import TDSPay from "./TDSPay";
|
|
15
|
+
import { Context } from "../../model";
|
|
16
|
+
import "./index.less";
|
|
17
|
+
/**
|
|
18
|
+
* @title: 信用卡支付
|
|
19
|
+
* @description:
|
|
20
|
+
* @param {any} props
|
|
21
|
+
* @param {any} ref
|
|
22
|
+
* @return {*}
|
|
23
|
+
* @Author: zhiwei.Wang
|
|
24
|
+
* @Date: 2024-08-16 11:02
|
|
25
|
+
*/
|
|
26
|
+
var MWCreditCard = function MWCreditCard(props, ref) {
|
|
27
|
+
// 信用卡列表
|
|
28
|
+
var MWCreditCardListRef = useRef();
|
|
29
|
+
// 添加信用卡
|
|
30
|
+
var AddMWCreditCardRef = useRef();
|
|
31
|
+
// 3ds验证
|
|
32
|
+
var TDSPayRef = useRef();
|
|
33
|
+
// 订单信息
|
|
34
|
+
var _useState = useState(null),
|
|
35
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
36
|
+
order = _useState2[0],
|
|
37
|
+
setOrder = _useState2[1];
|
|
38
|
+
var _useContext = useContext(Context),
|
|
39
|
+
state = _useContext.state;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @title: 初始化
|
|
43
|
+
* @description:
|
|
44
|
+
* @param {any} res
|
|
45
|
+
* @return {*}
|
|
46
|
+
* @Author: zhiwei.Wang
|
|
47
|
+
* @Date: 2024-08-16 11:02
|
|
48
|
+
*/
|
|
49
|
+
var init = /*#__PURE__*/function () {
|
|
50
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(res) {
|
|
51
|
+
var _MWCreditCardListRef$;
|
|
52
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
53
|
+
while (1) switch (_context.prev = _context.next) {
|
|
54
|
+
case 0:
|
|
55
|
+
setOrder(res.order);
|
|
56
|
+
// 展示信用卡列表
|
|
57
|
+
(_MWCreditCardListRef$ = MWCreditCardListRef.current) === null || _MWCreditCardListRef$ === void 0 ? void 0 : _MWCreditCardListRef$.init(order);
|
|
58
|
+
case 2:
|
|
59
|
+
case "end":
|
|
60
|
+
return _context.stop();
|
|
61
|
+
}
|
|
62
|
+
}, _callee);
|
|
63
|
+
}));
|
|
64
|
+
return function init(_x2) {
|
|
65
|
+
return _ref.apply(this, arguments);
|
|
66
|
+
};
|
|
67
|
+
}();
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* @title: 3ds验证
|
|
71
|
+
* @description:
|
|
72
|
+
* @param {any} card
|
|
73
|
+
* @return {*}
|
|
74
|
+
* @Author: zhiwei.Wang
|
|
75
|
+
* @Date: 2024-08-16 11:02
|
|
76
|
+
*/
|
|
77
|
+
var fastPay = /*#__PURE__*/function () {
|
|
78
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(card) {
|
|
79
|
+
var _TDSPayRef$current;
|
|
80
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
81
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
82
|
+
case 0:
|
|
83
|
+
(_TDSPayRef$current = TDSPayRef.current) === null || _TDSPayRef$current === void 0 ? void 0 : _TDSPayRef$current.init(card, order);
|
|
84
|
+
case 1:
|
|
85
|
+
case "end":
|
|
86
|
+
return _context2.stop();
|
|
87
|
+
}
|
|
88
|
+
}, _callee2);
|
|
89
|
+
}));
|
|
90
|
+
return function fastPay(_x3) {
|
|
91
|
+
return _ref2.apply(this, arguments);
|
|
92
|
+
};
|
|
93
|
+
}();
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* @title: 添加卡并3ds验证
|
|
97
|
+
* @description:
|
|
98
|
+
* @param {any} res
|
|
99
|
+
* @return {*}
|
|
100
|
+
* @Author: zhiwei.Wang
|
|
101
|
+
* @Date: 2024-08-16 11:02
|
|
102
|
+
*/
|
|
103
|
+
var onCreate = function onCreate(res) {
|
|
104
|
+
var _TDSPayRef$current2;
|
|
105
|
+
(_TDSPayRef$current2 = TDSPayRef.current) === null || _TDSPayRef$current2 === void 0 ? void 0 : _TDSPayRef$current2.init(res, order);
|
|
106
|
+
};
|
|
107
|
+
useImperativeHandle(ref, function () {
|
|
108
|
+
return {
|
|
109
|
+
init: init
|
|
110
|
+
};
|
|
111
|
+
});
|
|
112
|
+
useEffect(function () {
|
|
113
|
+
// init();
|
|
114
|
+
}, []);
|
|
115
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MWCreditCardList, {
|
|
116
|
+
ref: MWCreditCardListRef,
|
|
117
|
+
onAdd: function onAdd() {
|
|
118
|
+
var _AddMWCreditCardRef$c;
|
|
119
|
+
(_AddMWCreditCardRef$c = AddMWCreditCardRef.current) === null || _AddMWCreditCardRef$c === void 0 ? void 0 : _AddMWCreditCardRef$c.init();
|
|
120
|
+
},
|
|
121
|
+
onChange: fastPay
|
|
122
|
+
}), /*#__PURE__*/React.createElement(AddMWCreditCard, {
|
|
123
|
+
ref: AddMWCreditCardRef,
|
|
124
|
+
onCreate: onCreate
|
|
125
|
+
}), /*#__PURE__*/React.createElement(TDSPay, {
|
|
126
|
+
ref: TDSPayRef,
|
|
127
|
+
onChange: state.payCallback
|
|
128
|
+
}));
|
|
129
|
+
};
|
|
130
|
+
export default /*#__PURE__*/forwardRef(MWCreditCard);
|
|
File without changes
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @title: 点击支付
|
|
3
|
+
* @description:
|
|
4
|
+
* @param {any} param1
|
|
5
|
+
* @return {*}
|
|
6
|
+
* @Author: Wzw
|
|
7
|
+
* @Date: 2022-10-22 10:05
|
|
8
|
+
*/
|
|
9
|
+
export declare const startPayment: ({ orderId, cardInfo, payData }: any, callback?: any) => Promise<boolean | undefined>;
|
|
10
|
+
/*******
|
|
11
|
+
* @title: 步骤2
|
|
12
|
+
* @description: 提交卡信息到后端
|
|
13
|
+
* @return {*}
|
|
14
|
+
* @Author: Wzw
|
|
15
|
+
* @Date: 2022-10-18 10:26
|
|
16
|
+
*/
|
|
17
|
+
export declare const checkEnrollment: (orderId: string, cardInfo: any, callback: any) => Promise<any>;
|
|
18
|
+
/**
|
|
19
|
+
* @title: 步骤3
|
|
20
|
+
* @description: 创建iframe, 监听
|
|
21
|
+
* @param {any} threeDSMethodData
|
|
22
|
+
* @return {*}
|
|
23
|
+
* @Author: Wzw
|
|
24
|
+
* @Date: 2022-10-18 10:36
|
|
25
|
+
*/
|
|
26
|
+
export declare const createThreeDSMethodIframe: (threeDSMethodData: any, callback: any) => Promise<unknown>;
|
|
27
|
+
/**
|
|
28
|
+
* @title: 步骤4
|
|
29
|
+
* @description:
|
|
30
|
+
* @param {any} param1
|
|
31
|
+
* @return {*}
|
|
32
|
+
* @Author: Wzw
|
|
33
|
+
* @Date: 2022-10-18 10:43
|
|
34
|
+
*/
|
|
35
|
+
export declare const checkTDSAuth: (step2: any, step3: any, callback?: any) => Promise<any>;
|
|
36
|
+
/**
|
|
37
|
+
* @title: 步骤5
|
|
38
|
+
* @description: 监听
|
|
39
|
+
* @param {any} challengeData
|
|
40
|
+
* @return {*}
|
|
41
|
+
* @Author: Wzw
|
|
42
|
+
* @Date: 2022-10-18 10:45
|
|
43
|
+
*/
|
|
44
|
+
export declare const createChallengeIframe: (challengeData: any, callback?: any) => Promise<unknown>;
|
|
45
|
+
/**
|
|
46
|
+
* @title: 步骤6
|
|
47
|
+
* @description:
|
|
48
|
+
* @param {any} cres
|
|
49
|
+
* @return {*}
|
|
50
|
+
* @Author: Wzw
|
|
51
|
+
* @Date: 2022-10-18 10:48
|
|
52
|
+
*/
|
|
53
|
+
export declare const checkPARes: (step2: any, step4: any, step5: any) => Promise<any>;
|
|
54
|
+
/**
|
|
55
|
+
* @title: 支付结束
|
|
56
|
+
* @description:
|
|
57
|
+
* @return {*}
|
|
58
|
+
* @Author: Wzw
|
|
59
|
+
* @Date: 2022-10-18 14:28
|
|
60
|
+
*/
|
|
61
|
+
export declare const paymentEnd: (props: any, callback: any) => void;
|