@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.
Files changed (396) hide show
  1. package/build/lowcode/assets-daily.json +19 -11
  2. package/build/lowcode/assets-dev.json +10 -2
  3. package/build/lowcode/assets-prod.json +19 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +18 -16
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +18 -16
  11. package/es/components/booking/addons/index.d.ts +1 -1
  12. package/es/components/booking/addons/model.d.ts +2 -1
  13. package/es/components/booking/components/footer/index.js +1 -1
  14. package/es/components/booking/deposit/DepositItem/index.d.ts +4 -1
  15. package/es/components/booking/deposit/DepositItem/index.js +17 -6
  16. package/es/components/booking/deposit/DepositItem/index.less +36 -12
  17. package/es/components/booking/deposit/index.js +5 -2
  18. package/es/components/booking/forms/forms.d.ts +1 -1
  19. package/es/components/booking/forms/index.d.ts +1 -1
  20. package/es/components/booking/forms/model.d.ts +2 -1
  21. package/es/components/booking/index.d.ts +1 -1
  22. package/es/components/booking/info/index.d.ts +1 -1
  23. package/es/components/booking/info/model.d.ts +2 -1
  24. package/es/components/booking/info/service/editService/index.js +11 -9
  25. package/es/components/booking/locales.d.ts +12 -0
  26. package/es/components/booking/locales.js +12 -0
  27. package/es/components/booking/model.d.ts +2 -1
  28. package/es/components/booking/notes/index.d.ts +1 -1
  29. package/es/components/booking/notes/model.d.ts +2 -1
  30. package/es/components/booking/payments/index.d.ts +1 -1
  31. package/es/components/booking/payments/model.d.ts +2 -1
  32. package/es/components/index.d.ts +2 -1
  33. package/es/components/index.js +2 -1
  34. package/es/components/pay/toC/PayAmount/index.d.ts +15 -0
  35. package/es/components/pay/toC/PayAmount/index.js +25 -0
  36. package/es/components/pay/toC/PayAmount/index.less +21 -0
  37. package/es/components/pay/toC/PayCountdown/index.d.ts +15 -0
  38. package/es/components/pay/toC/PayCountdown/index.js +26 -0
  39. package/es/components/pay/toC/PayCountdown/index.less +22 -0
  40. package/es/components/pay/toC/PaymentList/index.d.ts +19 -0
  41. package/es/components/pay/toC/PaymentList/index.js +342 -0
  42. package/es/components/pay/toC/PaymentList/index.less +112 -0
  43. package/es/components/pay/toC/PaymentList/mock.d.ts +88 -0
  44. package/es/components/pay/toC/PaymentList/mock.js +128 -0
  45. package/es/components/pay/toC/PaymentList/payment/alipay.svg +13 -0
  46. package/es/components/pay/toC/PaymentList/payment/apple_pay.svg +7 -0
  47. package/es/components/pay/toC/PaymentList/payment/bank_deposit.svg +11 -0
  48. package/es/components/pay/toC/PaymentList/payment/cash.svg +8 -0
  49. package/es/components/pay/toC/PaymentList/payment/credit_card.svg +10 -0
  50. package/es/components/pay/toC/PaymentList/payment/custom.svg +10 -0
  51. package/es/components/pay/toC/PaymentList/payment/google_pay.svg +9 -0
  52. package/es/components/pay/toC/PaymentList/payment/paypal.svg +8 -0
  53. package/es/components/pay/toC/PaymentList/payment/stripe.svg +16 -0
  54. package/es/components/pay/toC/PaymentList/payment/wxpay.svg +5 -0
  55. package/es/components/pay/toC/PaymentList/serve.d.ts +26 -0
  56. package/es/components/pay/toC/PaymentList/serve.js +135 -0
  57. package/es/components/pay/toC/PaymentList/status.d.ts +4 -0
  58. package/es/components/pay/toC/PaymentList/status.js +100 -0
  59. package/es/components/pay/toC/PaymentList/utils.d.ts +10 -0
  60. package/es/components/pay/toC/PaymentList/utils.js +53 -0
  61. package/es/components/pay/toC/PaymentMethods/ApplePay/index.d.ts +10 -0
  62. package/es/components/pay/toC/PaymentMethods/ApplePay/index.js +113 -0
  63. package/es/components/pay/toC/PaymentMethods/ApplePay/index.less +0 -0
  64. package/es/components/pay/toC/PaymentMethods/BankDeposit/index.d.ts +10 -0
  65. package/es/components/pay/toC/PaymentMethods/BankDeposit/index.js +74 -0
  66. package/es/components/pay/toC/PaymentMethods/BankDeposit/index.less +0 -0
  67. package/es/components/pay/toC/PaymentMethods/CashManual/index.d.ts +10 -0
  68. package/es/components/pay/toC/PaymentMethods/CashManual/index.js +79 -0
  69. package/es/components/pay/toC/PaymentMethods/CashManual/index.less +0 -0
  70. package/es/components/pay/toC/PaymentMethods/CashManual/serve.d.ts +1 -0
  71. package/es/components/pay/toC/PaymentMethods/CashManual/serve.js +27 -0
  72. package/es/components/pay/toC/PaymentMethods/CustomPayment/index.d.ts +10 -0
  73. package/es/components/pay/toC/PaymentMethods/CustomPayment/index.js +78 -0
  74. package/es/components/pay/toC/PaymentMethods/CustomPayment/index.less +0 -0
  75. package/es/components/pay/toC/PaymentMethods/CustomPayment/serve.d.ts +1 -0
  76. package/es/components/pay/toC/PaymentMethods/CustomPayment/serve.js +27 -0
  77. package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +10 -0
  78. package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.js +109 -0
  79. package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.less +0 -0
  80. package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/serve.d.ts +2 -0
  81. package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/serve.js +41 -0
  82. package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.d.ts +10 -0
  83. package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.js +109 -0
  84. package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.less +0 -0
  85. package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/serve.d.ts +2 -0
  86. package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/serve.js +41 -0
  87. package/es/components/pay/toC/PaymentMethods/GlobePayQrcode/index.d.ts +10 -0
  88. package/es/components/pay/toC/PaymentMethods/GlobePayQrcode/index.js +65 -0
  89. package/es/components/pay/toC/PaymentMethods/GlobePayQrcode/index.less +0 -0
  90. package/es/components/pay/toC/PaymentMethods/GlobePayQrcode/serve.d.ts +2 -0
  91. package/es/components/pay/toC/PaymentMethods/GlobePayQrcode/serve.js +36 -0
  92. package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/index.d.ts +10 -0
  93. package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/index.js +109 -0
  94. package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/index.less +0 -0
  95. package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/serve.d.ts +2 -0
  96. package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/serve.js +41 -0
  97. package/es/components/pay/toC/PaymentMethods/GooglePay/index.d.ts +9 -0
  98. package/es/components/pay/toC/PaymentMethods/GooglePay/index.js +110 -0
  99. package/es/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.d.ts +12 -0
  100. package/es/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.js +349 -0
  101. package/es/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.less +25 -0
  102. package/es/components/pay/toC/PaymentMethods/MWCreditCard/List/index.d.ts +11 -0
  103. package/es/components/pay/toC/PaymentMethods/MWCreditCard/List/index.js +375 -0
  104. package/es/components/pay/toC/PaymentMethods/MWCreditCard/List/index.less +95 -0
  105. package/es/components/pay/toC/PaymentMethods/MWCreditCard/List/serve.d.ts +5 -0
  106. package/es/components/pay/toC/PaymentMethods/MWCreditCard/List/serve.js +37 -0
  107. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +4 -0
  108. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.js +21 -0
  109. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.less +24 -0
  110. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.d.ts +10 -0
  111. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.js +222 -0
  112. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.less +0 -0
  113. package/es/components/pay/toC/PaymentMethods/MWCreditCard/index.d.ts +7 -0
  114. package/es/components/pay/toC/PaymentMethods/MWCreditCard/index.js +130 -0
  115. package/es/components/pay/toC/PaymentMethods/MWCreditCard/index.less +0 -0
  116. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +61 -0
  117. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +524 -0
  118. package/es/components/pay/toC/PaymentMethods/OfflinePayment/index.d.ts +10 -0
  119. package/es/components/pay/toC/PaymentMethods/OfflinePayment/index.js +73 -0
  120. package/es/components/pay/toC/PaymentMethods/OfflinePayment/index.less +0 -0
  121. package/es/components/pay/toC/PaymentMethods/OfflinePayment/serve.d.ts +1 -0
  122. package/es/components/pay/toC/PaymentMethods/OfflinePayment/serve.js +27 -0
  123. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.d.ts +6 -0
  124. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.js +61 -0
  125. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +3 -0
  126. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.js +121 -0
  127. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.less +35 -0
  128. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/serve.d.ts +9 -0
  129. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/serve.js +33 -0
  130. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/DynamicSDK.d.ts +2 -0
  131. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/DynamicSDK.js +30 -0
  132. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +8 -0
  133. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.js +37 -0
  134. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +8 -0
  135. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.js +13 -0
  136. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +3 -0
  137. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.js +15 -0
  138. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.less +27 -0
  139. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/stripe_loading.gif +0 -0
  140. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +3 -0
  141. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.js +108 -0
  142. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +4 -0
  143. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.js +113 -0
  144. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.less +22 -0
  145. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +4 -0
  146. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.js +96 -0
  147. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.module.less +4 -0
  148. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/serve.d.ts +9 -0
  149. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/serve.js +33 -0
  150. package/es/components/pay/toC/PaymentMethods/StripePay/index.d.ts +10 -0
  151. package/es/components/pay/toC/PaymentMethods/StripePay/index.js +78 -0
  152. package/es/components/pay/toC/PaymentMethods/StripePay/index.less +0 -0
  153. package/es/components/pay/toC/PaymentMethods/StripePay/serve.d.ts +2 -0
  154. package/es/components/pay/toC/PaymentMethods/StripePay/serve.js +36 -0
  155. package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +10 -0
  156. package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +108 -0
  157. package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.less +0 -0
  158. package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/serve.d.ts +2 -0
  159. package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/serve.js +41 -0
  160. package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.d.ts +10 -0
  161. package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.js +109 -0
  162. package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.less +0 -0
  163. package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/serve.d.ts +2 -0
  164. package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/serve.js +41 -0
  165. package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +15 -0
  166. package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.js +142 -0
  167. package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.less +20 -0
  168. package/es/components/pay/toC/PaymentMethods/WalletPass/MultiModeSearch/index.d.ts +6 -0
  169. package/es/components/pay/toC/PaymentMethods/WalletPass/MultiModeSearch/index.js +19 -0
  170. package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +20 -0
  171. package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +344 -0
  172. package/es/components/pay/toC/PaymentMethods/WalletPass/index.less +0 -0
  173. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +111 -0
  174. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.js +114 -0
  175. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +3 -0
  176. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +40 -0
  177. package/es/components/pay/toC/PaymentMethods/index.d.ts +9 -0
  178. package/es/components/pay/toC/PaymentMethods/index.js +316 -0
  179. package/es/components/pay/toC/WalletPassBlock/index.d.ts +14 -0
  180. package/es/components/pay/toC/WalletPassBlock/index.js +72 -0
  181. package/es/components/pay/toC/WalletPassBlock/index.less +65 -0
  182. package/es/components/pay/toC/index.d.ts +3 -0
  183. package/es/components/pay/toC/index.js +647 -0
  184. package/es/components/pay/toC/index.less +22 -0
  185. package/es/components/pay/toC/locales.d.ts +208 -0
  186. package/es/components/pay/toC/locales.js +207 -0
  187. package/es/components/pay/toC/model.d.ts +35 -0
  188. package/es/components/pay/toC/model.js +43 -0
  189. package/es/components/pay/toC/payGroup.d.ts +48 -0
  190. package/es/components/pay/toC/payGroup.js +105 -0
  191. package/es/components/pay/toC/serve.d.ts +34 -0
  192. package/es/components/pay/toC/serve.js +148 -0
  193. package/es/components/pay/toC/status.d.ts +3 -0
  194. package/es/components/pay/toC/status.js +82 -0
  195. package/es/components/pay/toC/utils.d.ts +30 -0
  196. package/es/components/pay/toC/utils.js +48 -0
  197. package/es/components/schedules/index.d.ts +1 -1
  198. package/es/components/schedules/model.d.ts +2 -1
  199. package/es/index.d.ts +1 -0
  200. package/es/index.js +1 -0
  201. package/es/utils/index.d.ts +6 -5
  202. package/es/utils/index.js +28 -6
  203. package/lib/components/booking/addons/index.d.ts +1 -1
  204. package/lib/components/booking/addons/model.d.ts +2 -1
  205. package/lib/components/booking/components/footer/index.js +1 -1
  206. package/lib/components/booking/deposit/DepositItem/index.d.ts +4 -1
  207. package/lib/components/booking/deposit/DepositItem/index.js +17 -6
  208. package/lib/components/booking/deposit/DepositItem/index.less +36 -12
  209. package/lib/components/booking/deposit/index.js +5 -2
  210. package/lib/components/booking/forms/forms.d.ts +1 -1
  211. package/lib/components/booking/forms/index.d.ts +1 -1
  212. package/lib/components/booking/forms/model.d.ts +2 -1
  213. package/lib/components/booking/index.d.ts +1 -1
  214. package/lib/components/booking/info/index.d.ts +1 -1
  215. package/lib/components/booking/info/model.d.ts +2 -1
  216. package/lib/components/booking/info/service/editService/index.js +2 -0
  217. package/lib/components/booking/locales.d.ts +12 -0
  218. package/lib/components/booking/locales.js +12 -0
  219. package/lib/components/booking/model.d.ts +2 -1
  220. package/lib/components/booking/notes/index.d.ts +1 -1
  221. package/lib/components/booking/notes/model.d.ts +2 -1
  222. package/lib/components/booking/payments/index.d.ts +1 -1
  223. package/lib/components/booking/payments/model.d.ts +2 -1
  224. package/lib/components/index.d.ts +2 -1
  225. package/lib/components/index.js +5 -2
  226. package/lib/components/pay/toC/PayAmount/index.d.ts +15 -0
  227. package/lib/components/pay/toC/PayAmount/index.js +42 -0
  228. package/lib/components/pay/toC/PayAmount/index.less +21 -0
  229. package/lib/components/pay/toC/PayCountdown/index.d.ts +15 -0
  230. package/lib/components/pay/toC/PayCountdown/index.js +49 -0
  231. package/lib/components/pay/toC/PayCountdown/index.less +22 -0
  232. package/lib/components/pay/toC/PaymentList/index.d.ts +19 -0
  233. package/lib/components/pay/toC/PaymentList/index.js +256 -0
  234. package/lib/components/pay/toC/PaymentList/index.less +112 -0
  235. package/lib/components/pay/toC/PaymentList/mock.d.ts +88 -0
  236. package/lib/components/pay/toC/PaymentList/mock.js +174 -0
  237. package/lib/components/pay/toC/PaymentList/payment/alipay.svg +13 -0
  238. package/lib/components/pay/toC/PaymentList/payment/apple_pay.svg +7 -0
  239. package/lib/components/pay/toC/PaymentList/payment/bank_deposit.svg +11 -0
  240. package/lib/components/pay/toC/PaymentList/payment/cash.svg +8 -0
  241. package/lib/components/pay/toC/PaymentList/payment/credit_card.svg +10 -0
  242. package/lib/components/pay/toC/PaymentList/payment/custom.svg +10 -0
  243. package/lib/components/pay/toC/PaymentList/payment/google_pay.svg +9 -0
  244. package/lib/components/pay/toC/PaymentList/payment/paypal.svg +8 -0
  245. package/lib/components/pay/toC/PaymentList/payment/stripe.svg +16 -0
  246. package/lib/components/pay/toC/PaymentList/payment/wxpay.svg +5 -0
  247. package/lib/components/pay/toC/PaymentList/serve.d.ts +26 -0
  248. package/lib/components/pay/toC/PaymentList/serve.js +83 -0
  249. package/lib/components/pay/toC/PaymentList/status.d.ts +4 -0
  250. package/lib/components/pay/toC/PaymentList/status.js +132 -0
  251. package/lib/components/pay/toC/PaymentList/utils.d.ts +10 -0
  252. package/lib/components/pay/toC/PaymentList/utils.js +52 -0
  253. package/lib/components/pay/toC/PaymentMethods/ApplePay/index.d.ts +10 -0
  254. package/lib/components/pay/toC/PaymentMethods/ApplePay/index.js +96 -0
  255. package/lib/components/pay/toC/PaymentMethods/ApplePay/index.less +0 -0
  256. package/lib/components/pay/toC/PaymentMethods/BankDeposit/index.d.ts +10 -0
  257. package/lib/components/pay/toC/PaymentMethods/BankDeposit/index.js +68 -0
  258. package/lib/components/pay/toC/PaymentMethods/BankDeposit/index.less +0 -0
  259. package/lib/components/pay/toC/PaymentMethods/CashManual/index.d.ts +10 -0
  260. package/lib/components/pay/toC/PaymentMethods/CashManual/index.js +56 -0
  261. package/lib/components/pay/toC/PaymentMethods/CashManual/index.less +0 -0
  262. package/lib/components/pay/toC/PaymentMethods/CashManual/serve.d.ts +1 -0
  263. package/lib/components/pay/toC/PaymentMethods/CashManual/serve.js +33 -0
  264. package/lib/components/pay/toC/PaymentMethods/CustomPayment/index.d.ts +10 -0
  265. package/lib/components/pay/toC/PaymentMethods/CustomPayment/index.js +56 -0
  266. package/lib/components/pay/toC/PaymentMethods/CustomPayment/index.less +0 -0
  267. package/lib/components/pay/toC/PaymentMethods/CustomPayment/serve.d.ts +1 -0
  268. package/lib/components/pay/toC/PaymentMethods/CustomPayment/serve.js +33 -0
  269. package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +10 -0
  270. package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.js +89 -0
  271. package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.less +0 -0
  272. package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/serve.d.ts +2 -0
  273. package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/serve.js +44 -0
  274. package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.d.ts +10 -0
  275. package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.js +89 -0
  276. package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.less +0 -0
  277. package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/serve.d.ts +2 -0
  278. package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/serve.js +44 -0
  279. package/lib/components/pay/toC/PaymentMethods/GlobePayQrcode/index.d.ts +10 -0
  280. package/lib/components/pay/toC/PaymentMethods/GlobePayQrcode/index.js +61 -0
  281. package/lib/components/pay/toC/PaymentMethods/GlobePayQrcode/index.less +0 -0
  282. package/lib/components/pay/toC/PaymentMethods/GlobePayQrcode/serve.d.ts +2 -0
  283. package/lib/components/pay/toC/PaymentMethods/GlobePayQrcode/serve.js +43 -0
  284. package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/index.d.ts +10 -0
  285. package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/index.js +89 -0
  286. package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/index.less +0 -0
  287. package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/serve.d.ts +2 -0
  288. package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/serve.js +44 -0
  289. package/lib/components/pay/toC/PaymentMethods/GooglePay/index.d.ts +9 -0
  290. package/lib/components/pay/toC/PaymentMethods/GooglePay/index.js +95 -0
  291. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.d.ts +12 -0
  292. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.js +270 -0
  293. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.less +25 -0
  294. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/List/index.d.ts +11 -0
  295. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/List/index.js +224 -0
  296. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/List/index.less +95 -0
  297. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/List/serve.d.ts +5 -0
  298. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/List/serve.js +39 -0
  299. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +4 -0
  300. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.js +52 -0
  301. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.less +24 -0
  302. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.d.ts +10 -0
  303. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.js +139 -0
  304. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.less +0 -0
  305. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/index.d.ts +7 -0
  306. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/index.js +80 -0
  307. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/index.less +0 -0
  308. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +61 -0
  309. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +336 -0
  310. package/lib/components/pay/toC/PaymentMethods/OfflinePayment/index.d.ts +10 -0
  311. package/lib/components/pay/toC/PaymentMethods/OfflinePayment/index.js +53 -0
  312. package/lib/components/pay/toC/PaymentMethods/OfflinePayment/index.less +0 -0
  313. package/lib/components/pay/toC/PaymentMethods/OfflinePayment/serve.d.ts +1 -0
  314. package/lib/components/pay/toC/PaymentMethods/OfflinePayment/serve.js +33 -0
  315. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.d.ts +6 -0
  316. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.js +76 -0
  317. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +3 -0
  318. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.js +107 -0
  319. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.less +35 -0
  320. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/serve.d.ts +9 -0
  321. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/serve.js +30 -0
  322. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/DynamicSDK.d.ts +2 -0
  323. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/DynamicSDK.js +44 -0
  324. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +8 -0
  325. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.js +69 -0
  326. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +8 -0
  327. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.js +44 -0
  328. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +3 -0
  329. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.js +48 -0
  330. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.less +27 -0
  331. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/stripe_loading.gif +0 -0
  332. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +3 -0
  333. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.js +124 -0
  334. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +4 -0
  335. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.js +94 -0
  336. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.less +22 -0
  337. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +4 -0
  338. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.js +81 -0
  339. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.module.less +4 -0
  340. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/serve.d.ts +9 -0
  341. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/serve.js +30 -0
  342. package/lib/components/pay/toC/PaymentMethods/StripePay/index.d.ts +10 -0
  343. package/lib/components/pay/toC/PaymentMethods/StripePay/index.js +71 -0
  344. package/lib/components/pay/toC/PaymentMethods/StripePay/index.less +0 -0
  345. package/lib/components/pay/toC/PaymentMethods/StripePay/serve.d.ts +2 -0
  346. package/lib/components/pay/toC/PaymentMethods/StripePay/serve.js +43 -0
  347. package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +10 -0
  348. package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +88 -0
  349. package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.less +0 -0
  350. package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/serve.d.ts +2 -0
  351. package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/serve.js +44 -0
  352. package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.d.ts +10 -0
  353. package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.js +87 -0
  354. package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.less +0 -0
  355. package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/serve.d.ts +2 -0
  356. package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/serve.js +44 -0
  357. package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +15 -0
  358. package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.js +126 -0
  359. package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.less +20 -0
  360. package/lib/components/pay/toC/PaymentMethods/WalletPass/MultiModeSearch/index.d.ts +6 -0
  361. package/lib/components/pay/toC/PaymentMethods/WalletPass/MultiModeSearch/index.js +56 -0
  362. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +20 -0
  363. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +284 -0
  364. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.less +0 -0
  365. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +111 -0
  366. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.js +54 -0
  367. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +3 -0
  368. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +70 -0
  369. package/lib/components/pay/toC/PaymentMethods/index.d.ts +9 -0
  370. package/lib/components/pay/toC/PaymentMethods/index.js +176 -0
  371. package/lib/components/pay/toC/WalletPassBlock/index.d.ts +14 -0
  372. package/lib/components/pay/toC/WalletPassBlock/index.js +97 -0
  373. package/lib/components/pay/toC/WalletPassBlock/index.less +65 -0
  374. package/lib/components/pay/toC/index.d.ts +3 -0
  375. package/lib/components/pay/toC/index.js +366 -0
  376. package/lib/components/pay/toC/index.less +22 -0
  377. package/lib/components/pay/toC/locales.d.ts +208 -0
  378. package/lib/components/pay/toC/locales.js +231 -0
  379. package/lib/components/pay/toC/model.d.ts +35 -0
  380. package/lib/components/pay/toC/model.js +60 -0
  381. package/lib/components/pay/toC/payGroup.d.ts +48 -0
  382. package/lib/components/pay/toC/payGroup.js +77 -0
  383. package/lib/components/pay/toC/serve.d.ts +34 -0
  384. package/lib/components/pay/toC/serve.js +78 -0
  385. package/lib/components/pay/toC/status.d.ts +3 -0
  386. package/lib/components/pay/toC/status.js +92 -0
  387. package/lib/components/pay/toC/utils.d.ts +30 -0
  388. package/lib/components/pay/toC/utils.js +62 -0
  389. package/lib/components/schedules/index.d.ts +1 -1
  390. package/lib/components/schedules/model.d.ts +2 -1
  391. package/lib/index.d.ts +1 -0
  392. package/lib/index.js +3 -0
  393. package/lib/utils/index.d.ts +6 -5
  394. package/lib/utils/index.js +12 -1
  395. package/lowcode/toc-pay/meta.ts +59 -0
  396. package/package.json +4 -3
@@ -0,0 +1,524 @@
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 ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
5
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
+ 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); } }
9
+ 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); }); }; }
10
+ import { request } from "../../../../../utils";
11
+ import { PisellToast } from '@pisell/materials';
12
+ import { setPayNumber } from "../../payGroup";
13
+ var REACT_APP_API_ENV = process.env.REACT_APP_API_ENV;
14
+ var paymentInfo = {
15
+ transactionInfo: {
16
+ transactionProduct: 'TEST 3DSv2',
17
+ transactionAmount: '1.00',
18
+ transactionCurrency: 'AUD'
19
+ },
20
+ customerName: 'Jim Bob',
21
+ billingAddress: {
22
+ billAddrLine1: '123 Test Street',
23
+ billAddrCity: 'Brisbane',
24
+ billAddrState: 'QLD',
25
+ billAddrPostCode: '4000',
26
+ billAddrCountry: 'AU'
27
+ }
28
+ };
29
+ var paymentData = {};
30
+ var postmessageUrl = 'merchantwarrior';
31
+ var log = function log(data) {
32
+ // warningLog('tds2', data);
33
+ };
34
+
35
+ /**
36
+ * @title: 点击支付
37
+ * @description:
38
+ * @param {any} param1
39
+ * @return {*}
40
+ * @Author: Wzw
41
+ * @Date: 2022-10-22 10:05
42
+ */
43
+ export var startPayment = /*#__PURE__*/function () {
44
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref, callback) {
45
+ var orderId, cardInfo, payData, paymentInfo, step2, step3, step4, step5;
46
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
47
+ while (1) switch (_context.prev = _context.next) {
48
+ case 0:
49
+ orderId = _ref.orderId, cardInfo = _ref.cardInfo, payData = _ref.payData;
50
+ paymentInfo = {
51
+ amount: 0,
52
+ order_id: 0
53
+ };
54
+ _context.prev = 2;
55
+ paymentData = {};
56
+ // 提交卡信息到后端, 如果有 payData, 则直接使用传入数据
57
+ if (!payData) {
58
+ _context.next = 8;
59
+ break;
60
+ }
61
+ _context.t0 = payData;
62
+ _context.next = 11;
63
+ break;
64
+ case 8:
65
+ _context.next = 10;
66
+ return checkEnrollment(orderId, cardInfo, callback);
67
+ case 10:
68
+ _context.t0 = _context.sent;
69
+ case 11:
70
+ step2 = _context.t0;
71
+ if (!(step2 === 0)) {
72
+ _context.next = 14;
73
+ break;
74
+ }
75
+ return _context.abrupt("return");
76
+ case 14:
77
+ paymentData.step2 = step2;
78
+ paymentInfo.amount = step2.amount;
79
+ paymentInfo.order_id = step2.order_id;
80
+ console.log('第三步');
81
+
82
+ // 监听postMessage
83
+ _context.next = 20;
84
+ return createThreeDSMethodIframe(step2, callback);
85
+ case 20:
86
+ step3 = _context.sent;
87
+ paymentData.step3 = step3;
88
+ if (!(step3 === 'N')) {
89
+ _context.next = 24;
90
+ break;
91
+ }
92
+ return _context.abrupt("return");
93
+ case 24:
94
+ _context.next = 26;
95
+ return checkTDSAuth(step2, step3);
96
+ case 26:
97
+ step4 = _context.sent;
98
+ paymentData.step4 = step4;
99
+
100
+ // 返回数据执行步骤5, 没有则略过 5&6
101
+ if (!step4) {
102
+ _context.next = 35;
103
+ break;
104
+ }
105
+ _context.next = 31;
106
+ return createChallengeIframe(step4, callback);
107
+ case 31:
108
+ step5 = _context.sent;
109
+ paymentData.step5 = step5;
110
+
111
+ // 步骤6, 换取token
112
+ _context.next = 35;
113
+ return checkPARes(step2, step4, step5);
114
+ case 35:
115
+ callback({
116
+ key: 'hideModal'
117
+ });
118
+ // 支付结束
119
+ paymentEnd(_objectSpread({
120
+ status: 'success'
121
+ }, paymentInfo), callback);
122
+ return _context.abrupt("return", true);
123
+ case 40:
124
+ _context.prev = 40;
125
+ _context.t1 = _context["catch"](2);
126
+ console.log('error', _context.t1);
127
+ callback({
128
+ key: 'hideModal'
129
+ });
130
+ closeIframe();
131
+ if (!(_context.t1 === 0)) {
132
+ _context.next = 47;
133
+ break;
134
+ }
135
+ return _context.abrupt("return");
136
+ case 47:
137
+ paymentData.error = _context.t1;
138
+ paymentEnd(_objectSpread({
139
+ status: 'fail'
140
+ }, paymentInfo), callback);
141
+ return _context.abrupt("return", false);
142
+ case 50:
143
+ case "end":
144
+ return _context.stop();
145
+ }
146
+ }, _callee, null, [[2, 40]]);
147
+ }));
148
+ return function startPayment(_x, _x2) {
149
+ return _ref2.apply(this, arguments);
150
+ };
151
+ }();
152
+
153
+ /*******
154
+ * @title: 步骤2
155
+ * @description: 提交卡信息到后端
156
+ * @return {*}
157
+ * @Author: Wzw
158
+ * @Date: 2022-10-18 10:26
159
+ */
160
+ export var checkEnrollment = /*#__PURE__*/function () {
161
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(orderId, cardInfo, callback) {
162
+ var _yield$request$getReq, data;
163
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
164
+ while (1) switch (_context2.prev = _context2.next) {
165
+ case 0:
166
+ _context2.prev = 0;
167
+ _context2.next = 3;
168
+ return request.getRequest().post('/h5/pay/order/mw-3ds-pay/v2/' + orderId, _objectSpread({}, cardInfo));
169
+ case 3:
170
+ _yield$request$getReq = _context2.sent;
171
+ data = _yield$request$getReq.data;
172
+ setPayNumber(orderId, data === null || data === void 0 ? void 0 : data.pay_number);
173
+ return _context2.abrupt("return", data);
174
+ case 9:
175
+ _context2.prev = 9;
176
+ _context2.t0 = _context2["catch"](0);
177
+ // 记录卡失败的原因
178
+ log({
179
+ msg: _context2.t0,
180
+ data: {
181
+ orderId: orderId,
182
+ cardInfo: cardInfo
183
+ }
184
+ });
185
+ callback({
186
+ key: 'hideModal'
187
+ });
188
+ closeIframe();
189
+ PisellToast({
190
+ content: (_context2.t0 === null || _context2.t0 === void 0 ? void 0 : _context2.t0.message) || '',
191
+ duration: 2
192
+ });
193
+ console.log('error', _context2.t0);
194
+ return _context2.abrupt("return", 0);
195
+ case 17:
196
+ case "end":
197
+ return _context2.stop();
198
+ }
199
+ }, _callee2, null, [[0, 9]]);
200
+ }));
201
+ return function checkEnrollment(_x3, _x4, _x5) {
202
+ return _ref3.apply(this, arguments);
203
+ };
204
+ }();
205
+
206
+ /**
207
+ * @title: 步骤3
208
+ * @description: 创建iframe, 监听
209
+ * @param {any} threeDSMethodData
210
+ * @return {*}
211
+ * @Author: Wzw
212
+ * @Date: 2022-10-18 10:36
213
+ */
214
+ export var createThreeDSMethodIframe = /*#__PURE__*/function () {
215
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(threeDSMethodData, callback) {
216
+ var _threeDSMethodData$pa, _threeDSMethodData$pa2, _threeDSMethodData$pa3, _threeDSMethodData$pa4, _threeDSMethodData$pa5;
217
+ var defaultReturnParams, displayBox, iframe, form, input, timer;
218
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
219
+ while (1) switch (_context3.prev = _context3.next) {
220
+ case 0:
221
+ defaultReturnParams = {
222
+ threeDSServerTransID: (threeDSMethodData === null || threeDSMethodData === void 0 ? void 0 : (_threeDSMethodData$pa = threeDSMethodData.pay_info) === null || _threeDSMethodData$pa === void 0 ? void 0 : _threeDSMethodData$pa.threeDSServerTransID) || '',
223
+ threeDSCompInd: (threeDSMethodData === null || threeDSMethodData === void 0 ? void 0 : (_threeDSMethodData$pa2 = threeDSMethodData.pay_info) === null || _threeDSMethodData$pa2 === void 0 ? void 0 : _threeDSMethodData$pa2.threeDSCompInd) || ''
224
+ }; // 有返回 threeDSServerTransID 直接走第4步
225
+ if (!(threeDSMethodData !== null && threeDSMethodData !== void 0 && (_threeDSMethodData$pa3 = threeDSMethodData.pay_info) !== null && _threeDSMethodData$pa3 !== void 0 && _threeDSMethodData$pa3.threeDSServerTransID && threeDSMethodData !== null && threeDSMethodData !== void 0 && (_threeDSMethodData$pa4 = threeDSMethodData.pay_info) !== null && _threeDSMethodData$pa4 !== void 0 && _threeDSMethodData$pa4.threeDSCompInd)) {
226
+ _context3.next = 3;
227
+ break;
228
+ }
229
+ return _context3.abrupt("return", defaultReturnParams);
230
+ case 3:
231
+ if (!(!(threeDSMethodData !== null && threeDSMethodData !== void 0 && threeDSMethodData.pay_info.acsURL) || typeof (threeDSMethodData === null || threeDSMethodData === void 0 ? void 0 : (_threeDSMethodData$pa5 = threeDSMethodData.pay_info) === null || _threeDSMethodData$pa5 === void 0 ? void 0 : _threeDSMethodData$pa5.acsURL) !== 'string')) {
232
+ _context3.next = 5;
233
+ break;
234
+ }
235
+ return _context3.abrupt("return", defaultReturnParams);
236
+ case 5:
237
+ displayBox = document.getElementById('threeds-container'); // 创建iframe
238
+ iframe = document.createElement('iframe'); // iframe.src = "about:blank";
239
+ iframe.classList.add('hidden_TDS_From');
240
+ iframe.name = 'threeDSMethodIframe';
241
+ displayBox.appendChild(iframe);
242
+
243
+ // 创建表单
244
+ form = document.createElement('form');
245
+ form.classList.add('hidden_TDS_From');
246
+ form.id = 'threeDSMethodForm';
247
+ form.type = 'hidden';
248
+ displayBox.appendChild(form);
249
+
250
+ // 创建控件
251
+ input = document.createElement('input');
252
+ input.id = 'threeDSMethodData';
253
+ input.name = 'threeDSMethodData';
254
+ input.type = 'hidden';
255
+ input.value = threeDSMethodData.pay_info.paReq;
256
+ form.appendChild(input);
257
+
258
+ // 提交表单
259
+ form.action = threeDSMethodData.pay_info.acsURL;
260
+ form.target = iframe.name;
261
+ form.method = 'post';
262
+ form.submit();
263
+ timer = null; // 返回promise
264
+ return _context3.abrupt("return", new Promise(function (res, rej) {
265
+ // 10秒内没有成功则走N逻辑
266
+ timer = setTimeout(function () {
267
+ res(defaultReturnParams);
268
+ log({
269
+ msg: '第三步: 10秒超时则走N逻辑',
270
+ data: threeDSMethodData
271
+ });
272
+ }, 10000);
273
+ window.addEventListener('message', function (event) {
274
+ // 判断域名
275
+ if (event.origin.indexOf(postmessageUrl) !== -1 || event.origin.indexOf('securesuite') !== -1) {
276
+ // 返回 threeDSServerTransID 则 res
277
+ if (typeof event.data.threeDSServerTransID == 'string') {
278
+ if (timer) {
279
+ clearTimeout(timer);
280
+ }
281
+ // 10秒内成功则走Y逻辑
282
+ res({
283
+ threeDSServerTransID: event.data.threeDSServerTransID,
284
+ threeDSCompInd: 'Y'
285
+ });
286
+ }
287
+ }
288
+ }, false);
289
+ }));
290
+ case 27:
291
+ case "end":
292
+ return _context3.stop();
293
+ }
294
+ }, _callee3);
295
+ }));
296
+ return function createThreeDSMethodIframe(_x6, _x7) {
297
+ return _ref4.apply(this, arguments);
298
+ };
299
+ }();
300
+
301
+ /**
302
+ * @title: 步骤4
303
+ * @description:
304
+ * @param {any} param1
305
+ * @return {*}
306
+ * @Author: Wzw
307
+ * @Date: 2022-10-18 10:43
308
+ */
309
+ export var checkTDSAuth = /*#__PURE__*/function () {
310
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(step2, step3, callback) {
311
+ var pay_number, order_id, pay_info, amount, notifyURL, threeDSServerTransID, threeDSCompInd, currentData, isPre, _yield$request$getReq2, data;
312
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
313
+ while (1) switch (_context4.prev = _context4.next) {
314
+ case 0:
315
+ pay_number = step2.pay_number, order_id = step2.order_id, pay_info = step2.pay_info, amount = step2.amount, notifyURL = step2.notifyURL;
316
+ threeDSServerTransID = step3.threeDSServerTransID, threeDSCompInd = step3.threeDSCompInd;
317
+ currentData = new Date();
318
+ isPre = false;
319
+ if (REACT_APP_API_ENV === 'pre' && pay_info.check_tds_auth.card_name === 'aa bb') {
320
+ isPre = true;
321
+ }
322
+ _context4.next = 7;
323
+ return request.getRequest().post('/h5/pay/order/mw-3ds-pay/v2/tds_auth_pay', {
324
+ order_id: order_id,
325
+ pay_number: pay_number,
326
+ mw_data: {
327
+ accessToken: pay_info.check_tds_auth.access_token,
328
+ method: 'checkTDSAuth',
329
+ cardID: pay_info.check_tds_auth.card_id,
330
+ // paymentCardNumber: cardInfo.paymentCardNumber,
331
+ paymentCardExpiry: pay_info.check_tds_auth.card_expiry,
332
+ paymentCardName: pay_info.check_tds_auth.card_name,
333
+ // paymentCardCSC: cardInfo.paymentCardCSC,
334
+ customerName: pay_info.check_tds_auth.card_name,
335
+ transactionAmount: amount,
336
+ transactionCurrency: paymentInfo.transactionInfo.transactionCurrency,
337
+ transactionProduct: pay_info.check_tds_auth.product_name,
338
+ browserAcceptHeader: '*/*',
339
+ browserColorDepth: screen.colorDepth,
340
+ browserJavaEnabled: navigator.javaEnabled(),
341
+ browserJavascriptEnabled: true,
342
+ browserLanguage: navigator.language,
343
+ browserScreenHeight: screen.height,
344
+ browserScreenWidth: screen.width,
345
+ browserTZ: currentData.getTimezoneOffset(),
346
+ browserUserAgent: navigator.userAgent,
347
+ purchaseDate: '20220420165834',
348
+ billAddrCity: paymentInfo.billingAddress.billAddrCity,
349
+ billAddrCountry: paymentInfo.billingAddress.billAddrCountry,
350
+ billAddrLine1: paymentInfo.billingAddress.billAddrLine1,
351
+ billAddrPostCode: paymentInfo.billingAddress.billAddrPostCode,
352
+ billAddrState: paymentInfo.billingAddress.billAddrState,
353
+ threeDSCompInd: isPre ? '' : threeDSCompInd,
354
+ threeDSServerTransID: isPre ? '' : threeDSServerTransID,
355
+ threeDSRequestorAuthenticationInd: '01',
356
+ threeDSRequestorURL: window.location.href,
357
+ notifyURL: notifyURL
358
+ }
359
+ });
360
+ case 7:
361
+ _yield$request$getReq2 = _context4.sent;
362
+ data = _yield$request$getReq2.data;
363
+ if (data) {
364
+ _context4.next = 11;
365
+ break;
366
+ }
367
+ return _context4.abrupt("return", null);
368
+ case 11:
369
+ return _context4.abrupt("return", data);
370
+ case 12:
371
+ case "end":
372
+ return _context4.stop();
373
+ }
374
+ }, _callee4);
375
+ }));
376
+ return function checkTDSAuth(_x8, _x9, _x10) {
377
+ return _ref5.apply(this, arguments);
378
+ };
379
+ }();
380
+
381
+ /**
382
+ * @title: 步骤5
383
+ * @description: 监听
384
+ * @param {any} challengeData
385
+ * @return {*}
386
+ * @Author: Wzw
387
+ * @Date: 2022-10-18 10:45
388
+ */
389
+ export var createChallengeIframe = function createChallengeIframe(challengeData, callback) {
390
+ var displayBox = document.getElementById('threeds-container');
391
+
392
+ // 创建iframe
393
+ var iframe = document.createElement('iframe');
394
+ iframe.classList.add('tdsv2challengeIframe');
395
+ iframe.name = 'challengeIframe';
396
+ iframe.id = '3dsv2challengeIframe';
397
+ displayBox.appendChild(iframe);
398
+
399
+ // 创建表单
400
+ var form = document.createElement('form');
401
+ form.classList.add('hidden_TDS_From');
402
+ form.id = '3dsv2challengeForm';
403
+ displayBox.appendChild(form);
404
+
405
+ // 创建控件
406
+ var input = document.createElement('input');
407
+ input.id = 'creq';
408
+ input.name = 'creq';
409
+ input.value = challengeData.challengeData;
410
+ input.type = 'hidden';
411
+ form.appendChild(input);
412
+
413
+ // 提交
414
+ form.action = challengeData.acsURL;
415
+ form.target = iframe.name;
416
+ form.method = 'post';
417
+ form.submit(); //uncomment if we are not testing timeout
418
+
419
+ iframe.onload = function () {
420
+ // loadingSpinnerAnimation("off");
421
+ };
422
+
423
+ // callback({ key: 'hideModal' });
424
+
425
+ // 返回iframe
426
+ return new Promise(function (res, rej) {
427
+ var timer = null;
428
+
429
+ // 120秒没成功 认为失败
430
+ timer = setTimeout(function () {
431
+ log({
432
+ msg: '第五步: 60秒超时则走N逻辑',
433
+ data: challengeData
434
+ });
435
+ rej('time out');
436
+ }, 2 * 60 * 1000);
437
+ window.addEventListener('message', function (event) {
438
+ // loadingSpinnerAnimation("on");
439
+ if (event.origin.indexOf(postmessageUrl) !== -1 || event.origin.indexOf('securesuite') !== -1) {
440
+ if (typeof event.data.cres == 'string') {
441
+ if (timer) {
442
+ clearTimeout(timer);
443
+ }
444
+ res(event.data.cres);
445
+ closeIframe();
446
+ }
447
+ }
448
+ }, false);
449
+ });
450
+ };
451
+
452
+ /**
453
+ * @title: 步骤6
454
+ * @description:
455
+ * @param {any} cres
456
+ * @return {*}
457
+ * @Author: Wzw
458
+ * @Date: 2022-10-18 10:48
459
+ */
460
+ export var checkPARes = /*#__PURE__*/function () {
461
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(step2, step4, step5) {
462
+ var pay_number, order_id, pay_info, amount, tdsPayKey, tdsPayToken, cres, _yield$request$getReq3, data;
463
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
464
+ while (1) switch (_context5.prev = _context5.next) {
465
+ case 0:
466
+ pay_number = step2.pay_number, order_id = step2.order_id, pay_info = step2.pay_info, amount = step2.amount;
467
+ tdsPayKey = step4.tdsPayKey, tdsPayToken = step4.tdsPayToken;
468
+ cres = step5;
469
+ _context5.next = 5;
470
+ return request.getRequest().post('/h5/pay/order/mw-3ds-pay/v2/check_pares', {
471
+ order_id: order_id,
472
+ pay_number: pay_number,
473
+ mw_data: {
474
+ transactionProduct: pay_info.check_tds_auth.product_name,
475
+ cres: cres,
476
+ accessToken: pay_info.check_tds_auth.access_token,
477
+ tdsPayKey: tdsPayKey,
478
+ tdsPayToken: tdsPayToken,
479
+ paymentCardName: pay_info.check_tds_auth.card_name,
480
+ transactionAmount: amount,
481
+ card_id: pay_info.check_tds_auth.card_id
482
+ }
483
+ });
484
+ case 5:
485
+ _yield$request$getReq3 = _context5.sent;
486
+ data = _yield$request$getReq3.data;
487
+ return _context5.abrupt("return", data);
488
+ case 8:
489
+ case "end":
490
+ return _context5.stop();
491
+ }
492
+ }, _callee5);
493
+ }));
494
+ return function checkPARes(_x11, _x12, _x13) {
495
+ return _ref6.apply(this, arguments);
496
+ };
497
+ }();
498
+
499
+ /**
500
+ * @title: 支付结束
501
+ * @description:
502
+ * @return {*}
503
+ * @Author: Wzw
504
+ * @Date: 2022-10-18 14:28
505
+ */
506
+ export var paymentEnd = function paymentEnd(props, callback) {
507
+ var status = props.status;
508
+ callback({
509
+ key: status,
510
+ data: props
511
+ });
512
+ if (status !== 'success') {
513
+ log({
514
+ msg: '支付失败',
515
+ data: paymentData
516
+ });
517
+ }
518
+ };
519
+ var closeIframe = function closeIframe() {
520
+ var dom = document.querySelector('.tdsv2challengeIframe');
521
+ if (dom) {
522
+ dom.classList.add('tdsv2challengeIframeClose');
523
+ }
524
+ };
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ export interface OfflinePaymentRef {
4
+ init: (res: any) => Promise<any>;
5
+ }
6
+ export interface OfflinePaymentProps {
7
+ onChange?: (values: any) => void;
8
+ }
9
+ declare const _default: React.ForwardRefExoticComponent<OfflinePaymentProps & React.RefAttributes<any>>;
10
+ export default _default;
@@ -0,0 +1,73 @@
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 { useImperativeHandle, forwardRef, useContext } from 'react';
6
+ import { offlinePayment } from "./serve";
7
+ import { Context } from "../../model";
8
+ import { getPayGroupParamsFromStorage } from "../../payGroup";
9
+ import "./index.less";
10
+ /**
11
+ * @title: 线下支付
12
+ * @description:
13
+ * @param {OfflinePaymentProps} props
14
+ * @param {React} ref
15
+ * @return {*}
16
+ * @Author: zhiwei.Wang
17
+ * @Date: 2024-08-16 11:16
18
+ */
19
+ var OfflinePayment = function OfflinePayment(props, ref) {
20
+ var _useContext = useContext(Context),
21
+ state = _useContext.state;
22
+
23
+ /**
24
+ * @title: 初始化
25
+ * @description:
26
+ * @param {any} param1
27
+ * @return {*}
28
+ * @Author: zhiwei.Wang
29
+ * @Date: 2024-08-16 11:17
30
+ */
31
+ var init = /*#__PURE__*/function () {
32
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
33
+ var _item$params;
34
+ var payGroup, _item, params;
35
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
36
+ while (1) switch (_context.prev = _context.next) {
37
+ case 0:
38
+ payGroup = _ref.payGroup;
39
+ _item = payGroup === null || payGroup === void 0 ? void 0 : payGroup.otherPayment; // 获取交易组信息
40
+ params = getPayGroupParamsFromStorage(payGroup === null || payGroup === void 0 ? void 0 : payGroup.order_id, {
41
+ order_id: payGroup === null || payGroup === void 0 ? void 0 : payGroup.order_id,
42
+ payment_method: _item === null || _item === void 0 ? void 0 : (_item$params = _item.params) === null || _item$params === void 0 ? void 0 : _item$params.payment_method
43
+ });
44
+ if (params) {
45
+ _context.next = 5;
46
+ break;
47
+ }
48
+ return _context.abrupt("return");
49
+ case 5:
50
+ _context.next = 7;
51
+ return offlinePayment(params);
52
+ case 7:
53
+ state.payCallback({
54
+ key: 'success'
55
+ });
56
+ case 8:
57
+ case "end":
58
+ return _context.stop();
59
+ }
60
+ }, _callee);
61
+ }));
62
+ return function init(_x) {
63
+ return _ref2.apply(this, arguments);
64
+ };
65
+ }();
66
+ useImperativeHandle(ref, function () {
67
+ return {
68
+ init: init
69
+ };
70
+ });
71
+ return null;
72
+ };
73
+ export default /*#__PURE__*/forwardRef(OfflinePayment);
@@ -0,0 +1 @@
1
+ export declare const offlinePayment: (values: any) => Promise<any>;