@pisell/private-materials 6.8.83 → 6.8.84

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 (134) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -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 +10 -10
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +9 -9
  11. package/es/components/booking/components/footer/index.d.ts +1 -0
  12. package/es/components/booking/info/index.d.ts +1 -0
  13. package/es/components/checkout/PaymentModal.js +4 -2
  14. package/es/components/checkout/components/PaymentOptionsModule/index.js +1 -1
  15. package/es/components/eftposPay/aggregatePayment/hooks/useMicropay.d.ts +7 -0
  16. package/es/components/eftposPay/aggregatePayment/hooks/useMicropay.js +120 -0
  17. package/es/components/eftposPay/aggregatePayment/index.d.ts +3 -0
  18. package/es/components/eftposPay/aggregatePayment/index.js +3 -0
  19. package/es/components/eftposPay/aggregatePayment/service.d.ts +24 -0
  20. package/es/components/eftposPay/aggregatePayment/service.js +69 -0
  21. package/es/components/eftposPay/aggregatePayment/types.d.ts +106 -0
  22. package/es/components/eftposPay/aggregatePayment/types.js +65 -0
  23. package/es/components/eftposPay/aggregatePayment/utils/logs.d.ts +110 -0
  24. package/es/components/eftposPay/aggregatePayment/utils/logs.js +371 -0
  25. package/es/components/eftposPay/aggregatePayment/utils/payment.d.ts +139 -0
  26. package/es/components/eftposPay/aggregatePayment/utils/payment.js +1138 -0
  27. package/es/components/eftposPay/amount.d.ts +1 -1
  28. package/es/components/eftposPay/app.d.ts +1 -1
  29. package/es/components/eftposPay/app.js +5 -0
  30. package/es/components/eftposPay/component/fail/failCustom.js +16 -12
  31. package/es/components/eftposPay/component/fail/index.js +12 -5
  32. package/es/components/eftposPay/const.d.ts +6 -1
  33. package/es/components/eftposPay/const.js +3 -0
  34. package/es/components/eftposPay/device.d.ts +1 -1
  35. package/es/components/eftposPay/hooks.d.ts +3 -2
  36. package/es/components/eftposPay/hooks.js +12 -0
  37. package/es/components/eftposPay/huifu/Action.d.ts +8 -0
  38. package/es/components/eftposPay/huifu/Action.js +146 -0
  39. package/es/components/eftposPay/huifu/const.d.ts +5 -0
  40. package/es/components/eftposPay/huifu/const.js +70 -0
  41. package/es/components/eftposPay/huifu/hooks.d.ts +25 -0
  42. package/es/components/eftposPay/huifu/hooks.js +184 -0
  43. package/es/components/eftposPay/huifu/index.d.ts +5 -0
  44. package/es/components/eftposPay/huifu/index.js +196 -0
  45. package/es/components/eftposPay/huifu/index.less +180 -0
  46. package/es/components/eftposPay/huifu/types.d.ts +14 -0
  47. package/es/components/eftposPay/huifu/types.js +1 -0
  48. package/es/components/eftposPay/index.js +5 -1
  49. package/es/components/eftposPay/locales.d.ts +36 -0
  50. package/es/components/eftposPay/locales.js +42 -3
  51. package/es/components/eftposPay/manufacturer.d.ts +1 -0
  52. package/es/components/eftposPay/manufacturer.js +5 -0
  53. package/es/components/eftposPay/pay.js +6 -2
  54. package/es/components/eftposPay/store/index.d.ts +11 -4
  55. package/es/components/kioskSkuDetail/index.d.ts +3 -0
  56. package/es/components/kioskSkuDetail/index.js +266 -173
  57. package/es/components/kioskSkuDetail/index.less +49 -7
  58. package/es/components/kioskSkuDetail/locales.d.ts +6 -0
  59. package/es/components/kioskSkuDetail/locales.js +9 -3
  60. package/es/components/pay/toB/components/Cache/index.d.ts +1 -0
  61. package/es/components/pay/toB/components/EFTPOS/index.js +8 -1
  62. package/es/components/pay/toB/types/index.d.ts +1 -0
  63. package/es/components/pay/toC/PaymentList/serve.js +14 -0
  64. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +7 -6
  65. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
  66. package/es/components/ticketBooking/index.d.ts +16 -0
  67. package/es/plus/skuOptionsSelection/components/VariantCard/index.js +1 -1
  68. package/es/plus/skuOptionsSelection/locales.d.ts +3 -0
  69. package/es/plus/skuOptionsSelection/locales.js +3 -0
  70. package/es/pro/Login2.0/components/LoginCodeInput.js +36 -3
  71. package/es/pro/Login2.0/steps/CodeInput.js +37 -7
  72. package/lib/components/booking/components/footer/index.d.ts +1 -0
  73. package/lib/components/booking/info/index.d.ts +1 -0
  74. package/lib/components/checkout/PaymentModal.js +5 -2
  75. package/lib/components/checkout/components/PaymentOptionsModule/index.js +2 -1
  76. package/lib/components/eftposPay/aggregatePayment/hooks/useMicropay.d.ts +7 -0
  77. package/lib/components/eftposPay/aggregatePayment/hooks/useMicropay.js +133 -0
  78. package/lib/components/eftposPay/aggregatePayment/index.d.ts +3 -0
  79. package/lib/components/eftposPay/aggregatePayment/index.js +42 -0
  80. package/lib/components/eftposPay/aggregatePayment/service.d.ts +24 -0
  81. package/lib/components/eftposPay/aggregatePayment/service.js +81 -0
  82. package/lib/components/eftposPay/aggregatePayment/types.d.ts +106 -0
  83. package/lib/components/eftposPay/aggregatePayment/types.js +74 -0
  84. package/lib/components/eftposPay/aggregatePayment/utils/logs.d.ts +110 -0
  85. package/lib/components/eftposPay/aggregatePayment/utils/logs.js +294 -0
  86. package/lib/components/eftposPay/aggregatePayment/utils/payment.d.ts +139 -0
  87. package/lib/components/eftposPay/aggregatePayment/utils/payment.js +752 -0
  88. package/lib/components/eftposPay/amount.d.ts +1 -1
  89. package/lib/components/eftposPay/app.d.ts +1 -1
  90. package/lib/components/eftposPay/app.js +5 -0
  91. package/lib/components/eftposPay/component/fail/failCustom.js +15 -9
  92. package/lib/components/eftposPay/component/fail/index.js +4 -1
  93. package/lib/components/eftposPay/const.d.ts +6 -1
  94. package/lib/components/eftposPay/const.js +3 -0
  95. package/lib/components/eftposPay/device.d.ts +1 -1
  96. package/lib/components/eftposPay/hooks.d.ts +3 -2
  97. package/lib/components/eftposPay/hooks.js +16 -0
  98. package/lib/components/eftposPay/huifu/Action.d.ts +8 -0
  99. package/lib/components/eftposPay/huifu/Action.js +174 -0
  100. package/lib/components/eftposPay/huifu/const.d.ts +5 -0
  101. package/lib/components/eftposPay/huifu/const.js +86 -0
  102. package/lib/components/eftposPay/huifu/hooks.d.ts +25 -0
  103. package/lib/components/eftposPay/huifu/hooks.js +186 -0
  104. package/lib/components/eftposPay/huifu/index.d.ts +5 -0
  105. package/lib/components/eftposPay/huifu/index.js +200 -0
  106. package/lib/components/eftposPay/huifu/index.less +180 -0
  107. package/lib/components/eftposPay/huifu/types.d.ts +14 -0
  108. package/lib/components/eftposPay/huifu/types.js +17 -0
  109. package/lib/components/eftposPay/index.js +5 -1
  110. package/lib/components/eftposPay/locales.d.ts +36 -0
  111. package/lib/components/eftposPay/locales.js +42 -3
  112. package/lib/components/eftposPay/manufacturer.d.ts +1 -0
  113. package/lib/components/eftposPay/manufacturer.js +7 -0
  114. package/lib/components/eftposPay/pay.js +3 -2
  115. package/lib/components/eftposPay/store/index.d.ts +11 -4
  116. package/lib/components/kioskSkuDetail/index.d.ts +3 -0
  117. package/lib/components/kioskSkuDetail/index.js +180 -113
  118. package/lib/components/kioskSkuDetail/index.less +49 -7
  119. package/lib/components/kioskSkuDetail/locales.d.ts +6 -0
  120. package/lib/components/kioskSkuDetail/locales.js +9 -3
  121. package/lib/components/pay/toB/components/Cache/index.d.ts +1 -0
  122. package/lib/components/pay/toB/components/EFTPOS/index.js +8 -1
  123. package/lib/components/pay/toB/types/index.d.ts +1 -0
  124. package/lib/components/pay/toC/PaymentList/serve.js +15 -0
  125. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +7 -6
  126. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
  127. package/lib/components/ticketBooking/index.d.ts +16 -0
  128. package/lib/plus/skuOptionsSelection/components/VariantCard/index.js +2 -0
  129. package/lib/plus/skuOptionsSelection/locales.d.ts +3 -0
  130. package/lib/plus/skuOptionsSelection/locales.js +3 -0
  131. package/lib/pro/Login2.0/components/LoginCodeInput.js +26 -4
  132. package/lib/pro/Login2.0/steps/CodeInput.js +27 -5
  133. package/lowcode/kiosk-sku-detail/meta.ts +229 -94
  134. package/package.json +1 -1
@@ -0,0 +1,139 @@
1
+ /**
2
+ * 聚合支付方法类
3
+ * 核心点:
4
+ * 1.发起支付/退款,在十秒钟后发起轮询操作,两个接口谁先返回成功用谁的结果,如果返回的失败是存在明确code信息的则全部失败
5
+ * 2.轮询操作总查询时间2分钟,超时直接失败,单次轮询超时时间5秒,超时直接abort本次请求,间隔两秒后发起新的请求
6
+ * 3.最终成功或者失败都需要把定时器给清理掉,并将未完成的接口abort掉
7
+ */
8
+ import { PaymentMethodOptions } from '../types';
9
+ declare class PaymentMethod {
10
+ /** 初始化参数 */
11
+ private initOptions;
12
+ private paymentNum;
13
+ private orderId?;
14
+ private deviceId?;
15
+ private callback;
16
+ private shouldContinue;
17
+ private config;
18
+ private controller;
19
+ private queryController;
20
+ private queryStartTimer;
21
+ private globalTimeoutTimer;
22
+ private requestTimeoutTimer;
23
+ private queryIntervalTimer;
24
+ private isFinished;
25
+ private isQuerying;
26
+ private currentActionType;
27
+ private currentQueryId;
28
+ private currentRunId;
29
+ private currentQueryApi;
30
+ constructor(options: PaymentMethodOptions);
31
+ /**
32
+ * 判断请求是否需要等待轮询结果
33
+ * 1. 有明确错误code且不是超时和支付超时,则直接失败
34
+ * @param code 错误码
35
+ */
36
+ private isRequestFailed;
37
+ /**
38
+ * 清理定时器和请求控制器
39
+ */
40
+ private cleanupTimersAndControllers;
41
+ /**
42
+ * 清理资源并重置状态
43
+ * @param markAsFinished 是否标记为已完成(true: 操作完成; false: 准备新操作)
44
+ */
45
+ private clean;
46
+ /**
47
+ * 开始新的操作流程(统一的流程初始化)
48
+ * @param actionType 操作类型
49
+ * @returns 本次流程的唯一ID
50
+ */
51
+ private startNewOperation;
52
+ /**
53
+ * 处理操作过程
54
+ */
55
+ private handleOperationProcess;
56
+ /**
57
+ * 处理成功结果
58
+ */
59
+ private handleOperationSuccess;
60
+ /**
61
+ * 处理错误(最终失败)
62
+ * @param error 错误信息
63
+ */
64
+ private handleOperationError;
65
+ /**
66
+ * 处理接口响应
67
+ */
68
+ private handleResponse;
69
+ /**
70
+ * 创建超时 Promise
71
+ */
72
+ private createTimeoutPromise;
73
+ /**
74
+ * 单次查询请求
75
+ */
76
+ private performQuery;
77
+ /**
78
+ * 安排下一次查询
79
+ */
80
+ private scheduleNextQuery;
81
+ /**
82
+ * 开始轮询
83
+ */
84
+ private startQuery;
85
+ /**
86
+ * 获取操作API和查询API
87
+ */
88
+ private getActionApi;
89
+ /**
90
+ * 执行纯查询操作(不需要先调用支付/退款接口)
91
+ */
92
+ private runQuery;
93
+ /**
94
+ * 执行操作的核心方法
95
+ */
96
+ private run;
97
+ /**
98
+ * 执行操作
99
+ */
100
+ private runAction;
101
+ /**
102
+ * 支付
103
+ * @param params 支付参数
104
+ */
105
+ pay(params: Record<string, any>): void;
106
+ /**
107
+ * 支付取消
108
+ * @param params 取消参数
109
+ */
110
+ payAction(params: Record<string, any>): void;
111
+ /**
112
+ * 退款
113
+ * @param params 退款参数
114
+ */
115
+ refund(params: Record<string, any>): void;
116
+ /**
117
+ * 退款取消
118
+ * @param params 取消参数
119
+ */
120
+ refundAction(params: Record<string, any>): void;
121
+ /**
122
+ * 支付查询(直接查询,带2分钟超时和轮询机制)
123
+ */
124
+ payQuery(): void;
125
+ /**
126
+ * 退款查询(直接查询,带2分钟超时和轮询机制)
127
+ */
128
+ refundQuery(): void;
129
+ /**
130
+ * 停止操作,后续依然可以重新发起操作
131
+ */
132
+ stop(): void;
133
+ /**
134
+ * 销毁实例(完全清理并上传日志)
135
+ * 注意:销毁后实例不可再使用
136
+ */
137
+ destroy(): void;
138
+ }
139
+ export default PaymentMethod;