@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,27 @@
|
|
|
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
|
+
import { request } from "../../../../../utils";
|
|
6
|
+
export var offlinePayment = /*#__PURE__*/function () {
|
|
7
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(values) {
|
|
8
|
+
var _yield$request$getReq, data;
|
|
9
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10
|
+
while (1) switch (_context.prev = _context.next) {
|
|
11
|
+
case 0:
|
|
12
|
+
_context.next = 2;
|
|
13
|
+
return request.getRequest().post("/h5/pay/order/offline-payment/".concat(values.order_id), values);
|
|
14
|
+
case 2:
|
|
15
|
+
_yield$request$getReq = _context.sent;
|
|
16
|
+
data = _yield$request$getReq.data;
|
|
17
|
+
return _context.abrupt("return", data);
|
|
18
|
+
case 5:
|
|
19
|
+
case "end":
|
|
20
|
+
return _context.stop();
|
|
21
|
+
}
|
|
22
|
+
}, _callee);
|
|
23
|
+
}));
|
|
24
|
+
return function offlinePayment(_x) {
|
|
25
|
+
return _ref.apply(this, arguments);
|
|
26
|
+
};
|
|
27
|
+
}();
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import { useStripe } from '@stripe/react-stripe-js';
|
|
3
|
+
import useEngineContext from "../../../../../../../hooks/useEngineContext";
|
|
4
|
+
import styles from "./index.less";
|
|
5
|
+
var PaymentStatus = function PaymentStatus(_ref) {
|
|
6
|
+
var _context$appHelper;
|
|
7
|
+
var onChange = _ref.onChange;
|
|
8
|
+
var stripe = useStripe();
|
|
9
|
+
var context = useEngineContext();
|
|
10
|
+
var _ref2 = ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.constants) || {},
|
|
11
|
+
config = _ref2.config;
|
|
12
|
+
useEffect(function () {
|
|
13
|
+
if (!stripe) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Retrieve the "setup_intent_client_secret" query parameter appended to
|
|
18
|
+
// your return_url by Stripe.js
|
|
19
|
+
var clientSecret = new URLSearchParams(window.location.search).get('payment_intent_client_secret');
|
|
20
|
+
|
|
21
|
+
// Retrieve the SetupIntent
|
|
22
|
+
stripe.retrievePaymentIntent(clientSecret).then(function (_ref3) {
|
|
23
|
+
var paymentIntent = _ref3.paymentIntent;
|
|
24
|
+
// Inspect the SetupIntent `status` to indicate the status of the payment
|
|
25
|
+
// to your customer.
|
|
26
|
+
//
|
|
27
|
+
// Some payment methods will [immediately succeed or fail][0] upon
|
|
28
|
+
// confirmation, while others will first enter a `processing` state.
|
|
29
|
+
//
|
|
30
|
+
// [0]: https://stripe.com/docs/payments/payment-methods#payment-notification
|
|
31
|
+
console.log(paymentIntent);
|
|
32
|
+
switch (paymentIntent.status) {
|
|
33
|
+
case 'succeeded':
|
|
34
|
+
// Success! Your payment method has been saved.
|
|
35
|
+
onChange('succeeded');
|
|
36
|
+
break;
|
|
37
|
+
case 'processing':
|
|
38
|
+
// Processing payment details. We'll update you when processing is complete.
|
|
39
|
+
onChange('processing');
|
|
40
|
+
break;
|
|
41
|
+
case 'requires_payment_method':
|
|
42
|
+
// Redirect your user back to your payment page to attempt collecting
|
|
43
|
+
// Failed to process payment details. Please try another payment method.
|
|
44
|
+
// payment again
|
|
45
|
+
onChange('requires_payment_method');
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}, [stripe]);
|
|
50
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
51
|
+
className: styles['page-loading-wrap']
|
|
52
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
53
|
+
loading: "lazy",
|
|
54
|
+
className: styles['logo'],
|
|
55
|
+
src: config.static + '/static/payment-loading.svg',
|
|
56
|
+
alt: ""
|
|
57
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
58
|
+
className: styles['title']
|
|
59
|
+
}, "\u8BF7\u7A0D\u5019"));
|
|
60
|
+
};
|
|
61
|
+
export default PaymentStatus;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { useRequest } from 'ahooks';
|
|
3
|
+
import NavBar from "../../../../../../NavBar";
|
|
4
|
+
import StripeSDK from "../../../../../../StripeSDK";
|
|
5
|
+
import Content from "./Content";
|
|
6
|
+
import { isWxApp } from "../../../../../../../utils";
|
|
7
|
+
import { getStripeKey } from "./serve";
|
|
8
|
+
import styles from "./index.less";
|
|
9
|
+
var StripePayment = function StripePayment() {
|
|
10
|
+
var _getStripeKey$data;
|
|
11
|
+
var history = useHistory();
|
|
12
|
+
//@ts-ignore
|
|
13
|
+
var query = history.location.query;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @title: 获取 stripe key
|
|
17
|
+
* @description:
|
|
18
|
+
* @param {*}
|
|
19
|
+
* @return {*}
|
|
20
|
+
* @Author: Wzw
|
|
21
|
+
* @Date: 2022-04-01 11:05
|
|
22
|
+
*/
|
|
23
|
+
var _getStripeKey = useRequest(getStripeKey, {
|
|
24
|
+
formatResult: function formatResult(res) {
|
|
25
|
+
return res.data;
|
|
26
|
+
},
|
|
27
|
+
onError: function onError() {
|
|
28
|
+
goFinish('error');
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @title: 返回订单详情
|
|
34
|
+
* @description:
|
|
35
|
+
* @param {*}
|
|
36
|
+
* @return {*}
|
|
37
|
+
* @Author: Wzw
|
|
38
|
+
* @Date: 2022-04-01 11:06
|
|
39
|
+
*/
|
|
40
|
+
var goBack = function goBack() {
|
|
41
|
+
history.replace("/order/details?id=".concat(query === null || query === void 0 ? void 0 : query.order_id));
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @title: 跳转至支付成功 | 失败页面
|
|
46
|
+
* @description:
|
|
47
|
+
* @param {*} status
|
|
48
|
+
* @return {*}
|
|
49
|
+
* @Author: Wzw
|
|
50
|
+
* @Date: 2022-04-01 11:06
|
|
51
|
+
*/
|
|
52
|
+
var goFinish = function goFinish(status) {
|
|
53
|
+
if (query !== null && query !== void 0 && query.order_id) {
|
|
54
|
+
var _pathname = '';
|
|
55
|
+
// 微信环境走微信的页面
|
|
56
|
+
if ((query === null || query === void 0 ? void 0 : query.scene) === 'wxapp') {
|
|
57
|
+
if (status === 'success') {
|
|
58
|
+
_pathname = '/miniapp-payment/success';
|
|
59
|
+
} else {
|
|
60
|
+
_pathname = '/miniapp-payment/fail';
|
|
61
|
+
}
|
|
62
|
+
} else {
|
|
63
|
+
if (status === 'success') {
|
|
64
|
+
_pathname = '/payment-finish/success';
|
|
65
|
+
} else {
|
|
66
|
+
_pathname = '/payment-finish/fail';
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
history.replace("".concat(_pathname, "?order_id=").concat(query === null || query === void 0 ? void 0 : query.order_id, "&amount=").concat(query.amount, "&status=").concat(status));
|
|
70
|
+
} else {
|
|
71
|
+
history.replace('/');
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @title: 支付回调
|
|
77
|
+
* @description:
|
|
78
|
+
* @param {*}
|
|
79
|
+
* @return {*}
|
|
80
|
+
* @Author: Wzw
|
|
81
|
+
* @Date: 2022-04-01 11:06
|
|
82
|
+
*/
|
|
83
|
+
var onPaymentChange = function onPaymentChange(status) {
|
|
84
|
+
// 成功
|
|
85
|
+
if (status === 'succeeded') {
|
|
86
|
+
goFinish('success');
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// 处理中
|
|
90
|
+
if (status === 'processing') {
|
|
91
|
+
goFinish('success');
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// 失败
|
|
95
|
+
if (status === 'requires_payment_method') {
|
|
96
|
+
goFinish('error');
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// 错误
|
|
100
|
+
if (status === 'error') {
|
|
101
|
+
goFinish('error');
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
var _title = useMemo(function () {
|
|
105
|
+
return decodeURIComponent(query.payment_method || '');
|
|
106
|
+
}, [query]);
|
|
107
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
108
|
+
className: styles['stripe-payment-page']
|
|
109
|
+
}, /*#__PURE__*/React.createElement(NavBar, {
|
|
110
|
+
name: _title,
|
|
111
|
+
onChange: goBack,
|
|
112
|
+
bgColor: "#ffffff",
|
|
113
|
+
nameColor: "rgba(0,0,0,.9)",
|
|
114
|
+
backColor: "rgba(0,0,0,.9)"
|
|
115
|
+
}), isWxApp() ? null : /*#__PURE__*/React.createElement(StripeSDK, {
|
|
116
|
+
public_key: (_getStripeKey$data = _getStripeKey.data) === null || _getStripeKey$data === void 0 ? void 0 : _getStripeKey$data.publishable_key
|
|
117
|
+
}, /*#__PURE__*/React.createElement(Content, {
|
|
118
|
+
onChange: onPaymentChange
|
|
119
|
+
})));
|
|
120
|
+
};
|
|
121
|
+
export default StripePayment;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
.stripe-payment-page {
|
|
2
|
+
background-color: #ffffff;
|
|
3
|
+
height: 100%;
|
|
4
|
+
width: 100%;
|
|
5
|
+
overflow-x: hidden;
|
|
6
|
+
overflow-y: scroll;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.page-loading-wrap {
|
|
10
|
+
position: fixed;
|
|
11
|
+
width: 100%;
|
|
12
|
+
height: calc(100% - 44px);
|
|
13
|
+
background-color: #ffffff;
|
|
14
|
+
top: 44px;
|
|
15
|
+
z-index: 99;
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
align-items: center;
|
|
19
|
+
|
|
20
|
+
.logo {
|
|
21
|
+
margin-top: 199px;
|
|
22
|
+
width: 140px;
|
|
23
|
+
height: 140px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.title {
|
|
27
|
+
margin-top: 20px;
|
|
28
|
+
font-size: 20px;
|
|
29
|
+
font-weight: bold;
|
|
30
|
+
line-height: 36px;
|
|
31
|
+
color: #000000;
|
|
32
|
+
padding: 0 20px;
|
|
33
|
+
text-align: center;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
import { get } from "../../../../../../../utils/request";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @title: 获取stripe配置
|
|
9
|
+
* @description:
|
|
10
|
+
* @param {string} order_id
|
|
11
|
+
* @return {*}
|
|
12
|
+
* @Author: Wzw
|
|
13
|
+
* @Date: 2022-03-31 16:12
|
|
14
|
+
*/
|
|
15
|
+
export var getStripeKey = /*#__PURE__*/function () {
|
|
16
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
17
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
18
|
+
while (1) switch (_context.prev = _context.next) {
|
|
19
|
+
case 0:
|
|
20
|
+
_context.next = 2;
|
|
21
|
+
return get("/h5/stripe/config");
|
|
22
|
+
case 2:
|
|
23
|
+
return _context.abrupt("return", _context.sent);
|
|
24
|
+
case 3:
|
|
25
|
+
case "end":
|
|
26
|
+
return _context.stop();
|
|
27
|
+
}
|
|
28
|
+
}, _callee);
|
|
29
|
+
}));
|
|
30
|
+
return function getStripeKey() {
|
|
31
|
+
return _ref.apply(this, arguments);
|
|
32
|
+
};
|
|
33
|
+
}();
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
import { dynamic } from 'react';
|
|
6
|
+
export default dynamic({
|
|
7
|
+
loader: function () {
|
|
8
|
+
var _loader = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
9
|
+
var _yield$import, SDK;
|
|
10
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
11
|
+
while (1) switch (_context.prev = _context.next) {
|
|
12
|
+
case 0:
|
|
13
|
+
_context.next = 2;
|
|
14
|
+
return import( /* webpackChunkName: "external_A" */"./SDK");
|
|
15
|
+
case 2:
|
|
16
|
+
_yield$import = _context.sent;
|
|
17
|
+
SDK = _yield$import.default;
|
|
18
|
+
return _context.abrupt("return", SDK);
|
|
19
|
+
case 5:
|
|
20
|
+
case "end":
|
|
21
|
+
return _context.stop();
|
|
22
|
+
}
|
|
23
|
+
}, _callee);
|
|
24
|
+
}));
|
|
25
|
+
function loader() {
|
|
26
|
+
return _loader.apply(this, arguments);
|
|
27
|
+
}
|
|
28
|
+
return loader;
|
|
29
|
+
}()
|
|
30
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { loadStripe } from '@stripe/stripe-js';
|
|
3
|
+
import { Elements } from '@stripe/react-stripe-js';
|
|
4
|
+
import useEngineContext from "../../../../../../../hooks/useEngineContext";
|
|
5
|
+
var StripeSDK = function StripeSDK(_ref) {
|
|
6
|
+
var public_key = _ref.public_key,
|
|
7
|
+
client_secret = _ref.client_secret,
|
|
8
|
+
children = _ref.children,
|
|
9
|
+
lang = _ref.lang;
|
|
10
|
+
var context = useEngineContext();
|
|
11
|
+
var getStore = context.appHelper.utils.getStore;
|
|
12
|
+
var stripePromise = loadStripe(public_key);
|
|
13
|
+
console.log('getState,', context);
|
|
14
|
+
var locale = useMemo(function () {
|
|
15
|
+
var _locale = 'en-US';
|
|
16
|
+
return lang || (_locale === 'en-US' ? 'en' : _locale === 'zh-CN' ? 'zh' : 'zh-HK');
|
|
17
|
+
}, []);
|
|
18
|
+
var options = useMemo(function () {
|
|
19
|
+
return {
|
|
20
|
+
locale: locale,
|
|
21
|
+
// passing the client secret obtained in step 2
|
|
22
|
+
clientSecret: client_secret,
|
|
23
|
+
// Fully customizable with appearance API.
|
|
24
|
+
appearance: {
|
|
25
|
+
theme: 'stripe',
|
|
26
|
+
variables: {
|
|
27
|
+
colorPrimary: '#0088cc'
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
}, [locale]);
|
|
32
|
+
return /*#__PURE__*/React.createElement(Elements, {
|
|
33
|
+
stripe: stripePromise,
|
|
34
|
+
options: options
|
|
35
|
+
}, children);
|
|
36
|
+
};
|
|
37
|
+
export default StripeSDK;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const StripeSDK: ({ public_key, client_secret, children, lang, }: {
|
|
3
|
+
public_key: string;
|
|
4
|
+
client_secret?: string | undefined;
|
|
5
|
+
children: any;
|
|
6
|
+
lang?: string | undefined;
|
|
7
|
+
}) => import("react").JSX.Element;
|
|
8
|
+
export default StripeSDK;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import SDK from "./SDK";
|
|
2
|
+
var StripeSDK = function StripeSDK(_ref) {
|
|
3
|
+
var public_key = _ref.public_key,
|
|
4
|
+
client_secret = _ref.client_secret,
|
|
5
|
+
children = _ref.children,
|
|
6
|
+
lang = _ref.lang;
|
|
7
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, public_key ? /*#__PURE__*/React.createElement(SDK, {
|
|
8
|
+
public_key: public_key,
|
|
9
|
+
client_secret: client_secret,
|
|
10
|
+
lang: lang
|
|
11
|
+
}, children) : null);
|
|
12
|
+
};
|
|
13
|
+
export default StripeSDK;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import cfg from "../../../../../../../../configs";
|
|
2
|
+
import styles from "./index.less";
|
|
3
|
+
import { getText } from "../../../../../../../../utils/formatMessage";
|
|
4
|
+
var PageLoading = function PageLoading() {
|
|
5
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
6
|
+
className: styles['page-loading-wrap']
|
|
7
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
8
|
+
className: styles['logo'],
|
|
9
|
+
src: cfg.static + '/static/stripe_loading.gif',
|
|
10
|
+
alt: ""
|
|
11
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
12
|
+
className: styles['title']
|
|
13
|
+
}, getText('payment.text.miniapp.stripe.loading')));
|
|
14
|
+
};
|
|
15
|
+
export default PageLoading;
|
package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.less
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
.page-loading-wrap {
|
|
2
|
+
position: fixed;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: calc(100% - 44px);
|
|
5
|
+
background-color: #ffffff;
|
|
6
|
+
top: 44px;
|
|
7
|
+
z-index: 99;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
align-items: center;
|
|
11
|
+
|
|
12
|
+
.logo {
|
|
13
|
+
margin-top: 150px;
|
|
14
|
+
width: 140px;
|
|
15
|
+
height: 140px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.title {
|
|
19
|
+
margin-top: 20px;
|
|
20
|
+
padding: 0 40px;
|
|
21
|
+
text-align: center;
|
|
22
|
+
font-size: 15px;
|
|
23
|
+
font-weight: bold;
|
|
24
|
+
line-height: 20px;
|
|
25
|
+
color: #353535;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
Binary file
|