@pisell/private-materials 3.0.136 → 3.0.138

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 (219) 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 +12 -12
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +11 -11
  11. package/es/components/booking/forms/single/index.js +3 -0
  12. package/es/components/eftpos/const.d.ts +26 -0
  13. package/es/components/eftpos/const.js +40 -8
  14. package/es/components/eftpos/device.d.ts +3 -2
  15. package/es/components/eftpos/device.js +6 -5
  16. package/es/components/eftpos/form/index.d.ts +5 -0
  17. package/es/components/eftpos/form/index.js +8 -0
  18. package/es/components/eftpos/hooks.d.ts +34 -0
  19. package/es/components/{eftposPay/windcave/hook.js → eftpos/hooks.js} +96 -122
  20. package/es/components/eftpos/icon/apiKey.d.ts +5 -0
  21. package/es/components/eftpos/icon/apiKey.js +17 -0
  22. package/es/components/eftpos/icon/device.d.ts +5 -0
  23. package/es/components/eftpos/icon/device.js +19 -0
  24. package/es/components/eftpos/index.d.ts +10 -0
  25. package/es/components/eftpos/index.js +329 -46
  26. package/es/components/eftpos/index.less +38 -1
  27. package/es/components/eftpos/locales.d.ts +12 -0
  28. package/es/components/eftpos/locales.js +15 -3
  29. package/es/components/eftpos/log.d.ts +8 -0
  30. package/es/components/eftpos/log.js +85 -0
  31. package/es/components/eftpos/pos.d.ts +1 -1
  32. package/es/components/eftpos/pos.js +8 -5
  33. package/es/components/eftpos/surcharge/index.d.ts +25 -2
  34. package/es/components/eftpos/surcharge/index.js +100 -16
  35. package/es/components/eftpos/table.d.ts +4 -0
  36. package/es/components/eftpos/table.js +102 -10
  37. package/es/components/eftposPay/amount.d.ts +7 -1
  38. package/es/components/eftposPay/amount.js +65 -38
  39. package/es/components/eftposPay/component/fail/failCustom.js +65 -20
  40. package/es/components/eftposPay/component/fail/index.js +60 -30
  41. package/es/components/eftposPay/component/fail/network.d.ts +5 -0
  42. package/es/components/eftposPay/component/fail/network.js +13 -0
  43. package/es/components/eftposPay/component/fail/unknow.d.ts +6 -0
  44. package/es/components/eftposPay/component/fail/unknow.js +18 -3
  45. package/es/components/eftposPay/component/header/index.d.ts +2 -1
  46. package/es/components/eftposPay/component/header/index.js +4 -1
  47. package/es/components/eftposPay/component/header/index.less +1 -10
  48. package/es/components/eftposPay/component/manual/index.d.ts +6 -1
  49. package/es/components/eftposPay/component/manual/index.js +174 -23
  50. package/es/components/eftposPay/component/manual/index.less +42 -14
  51. package/es/components/eftposPay/component/signature/index.d.ts +5 -0
  52. package/es/components/eftposPay/component/signature/index.js +20 -2
  53. package/es/components/eftposPay/component/step/index.d.ts +7 -7
  54. package/es/components/eftposPay/component/step/step.d.ts +4 -4
  55. package/es/components/eftposPay/const.d.ts +19 -4
  56. package/es/components/eftposPay/const.js +4 -2
  57. package/es/components/eftposPay/device.d.ts +7 -0
  58. package/es/components/eftposPay/device.js +22 -0
  59. package/es/components/eftposPay/helper.d.ts +54 -0
  60. package/es/components/eftposPay/helper.js +93 -1
  61. package/es/components/eftposPay/hooks.d.ts +30 -1
  62. package/es/components/eftposPay/hooks.js +181 -26
  63. package/es/components/eftposPay/index.d.ts +2 -4
  64. package/es/components/eftposPay/index.js +119 -31
  65. package/es/components/eftposPay/index.less +27 -19
  66. package/es/components/eftposPay/locales.d.ts +45 -0
  67. package/es/components/eftposPay/locales.js +348 -3
  68. package/es/components/eftposPay/manufacturer.d.ts +2 -2
  69. package/es/components/eftposPay/manufacturer.js +9 -10
  70. package/es/components/eftposPay/pay.d.ts +10 -1
  71. package/es/components/eftposPay/pay.js +112 -34
  72. package/es/components/eftposPay/payo/config.js +137 -270
  73. package/es/components/eftposPay/payo/const.d.ts +22 -2
  74. package/es/components/eftposPay/payo/const.js +83 -33
  75. package/es/components/eftposPay/payo/hooks.d.ts +5 -0
  76. package/es/components/eftposPay/payo/hooks.js +19 -2
  77. package/es/components/eftposPay/store/index.d.ts +154 -53
  78. package/es/components/eftposPay/store/index.js +112 -60
  79. package/es/components/eftposPay/tyro/const.d.ts +17 -0
  80. package/es/components/eftposPay/{eftpos → tyro}/const.js +71 -90
  81. package/es/components/eftposPay/tyro/hooks.d.ts +14 -0
  82. package/es/components/eftposPay/tyro/hooks.js +40 -0
  83. package/es/components/eftposPay/tyro/index.d.ts +9 -0
  84. package/es/components/eftposPay/tyro/index.js +575 -0
  85. package/es/components/eftposPay/windcave/const.d.ts +24 -9
  86. package/es/components/eftposPay/windcave/const.js +90 -81
  87. package/es/components/eftposPay/windcave/helper.d.ts +16 -2
  88. package/es/components/eftposPay/windcave/helper.js +175 -42
  89. package/es/components/eftposPay/windcave/receiptAction.d.ts +12 -0
  90. package/es/components/eftposPay/windcave/receiptAction.js +91 -43
  91. package/es/components/eftposPay/windcave/timer.d.ts +13 -1
  92. package/es/components/eftposPay/windcave/timer.js +18 -1
  93. package/es/components/eftposPay/windcave/windcave.d.ts +2 -1
  94. package/es/components/eftposPay/windcave/windcave.js +155 -139
  95. package/es/utils/load.d.ts +11 -0
  96. package/es/utils/load.js +85 -0
  97. package/lib/components/booking/forms/single/index.js +1 -0
  98. package/lib/components/eftpos/const.d.ts +26 -0
  99. package/lib/components/eftpos/const.js +13 -1
  100. package/lib/components/eftpos/device.d.ts +3 -2
  101. package/lib/components/eftpos/device.js +2 -2
  102. package/lib/components/eftpos/form/index.d.ts +5 -0
  103. package/lib/components/eftpos/hooks.d.ts +34 -0
  104. package/lib/components/eftpos/hooks.js +106 -0
  105. package/lib/components/eftpos/icon/apiKey.d.ts +5 -0
  106. package/lib/components/eftpos/icon/apiKey.js +57 -0
  107. package/lib/components/eftpos/icon/device.d.ts +5 -0
  108. package/lib/components/eftpos/icon/device.js +57 -0
  109. package/lib/components/eftpos/index.d.ts +10 -0
  110. package/lib/components/eftpos/index.js +262 -97
  111. package/lib/components/eftpos/index.less +38 -1
  112. package/lib/components/eftpos/locales.d.ts +12 -0
  113. package/lib/components/eftpos/locales.js +15 -3
  114. package/lib/components/eftpos/log.d.ts +8 -0
  115. package/lib/components/eftpos/log.js +87 -0
  116. package/lib/components/eftpos/pos.d.ts +1 -1
  117. package/lib/components/eftpos/pos.js +5 -4
  118. package/lib/components/eftpos/surcharge/index.d.ts +25 -2
  119. package/lib/components/eftpos/surcharge/index.js +36 -6
  120. package/lib/components/eftpos/table.d.ts +4 -0
  121. package/lib/components/eftpos/table.js +40 -8
  122. package/lib/components/eftposPay/amount.d.ts +7 -1
  123. package/lib/components/eftposPay/amount.js +10 -33
  124. package/lib/components/eftposPay/component/fail/failCustom.js +27 -6
  125. package/lib/components/eftposPay/component/fail/index.js +39 -18
  126. package/lib/components/eftposPay/component/fail/network.d.ts +5 -0
  127. package/lib/components/eftposPay/component/fail/unknow.d.ts +6 -0
  128. package/lib/components/eftposPay/component/fail/unknow.js +3 -3
  129. package/lib/components/eftposPay/component/header/index.d.ts +2 -1
  130. package/lib/components/eftposPay/component/header/index.js +2 -1
  131. package/lib/components/eftposPay/component/header/index.less +1 -10
  132. package/lib/components/eftposPay/component/manual/index.d.ts +6 -1
  133. package/lib/components/eftposPay/component/manual/index.js +122 -31
  134. package/lib/components/eftposPay/component/manual/index.less +42 -14
  135. package/lib/components/eftposPay/component/signature/index.d.ts +5 -0
  136. package/lib/components/eftposPay/component/signature/index.js +2 -2
  137. package/lib/components/eftposPay/component/step/index.d.ts +7 -7
  138. package/lib/components/eftposPay/component/step/step.d.ts +4 -4
  139. package/lib/components/eftposPay/const.d.ts +19 -4
  140. package/lib/components/eftposPay/const.js +3 -1
  141. package/lib/components/eftposPay/device.d.ts +7 -0
  142. package/lib/components/eftposPay/helper.d.ts +54 -0
  143. package/lib/components/eftposPay/helper.js +64 -0
  144. package/lib/components/eftposPay/hooks.d.ts +30 -1
  145. package/lib/components/eftposPay/hooks.js +182 -44
  146. package/lib/components/eftposPay/index.d.ts +2 -4
  147. package/lib/components/eftposPay/index.js +74 -27
  148. package/lib/components/eftposPay/index.less +27 -19
  149. package/lib/components/eftposPay/locales.d.ts +45 -0
  150. package/lib/components/eftposPay/locales.js +352 -3
  151. package/lib/components/eftposPay/manufacturer.d.ts +2 -2
  152. package/lib/components/eftposPay/manufacturer.js +13 -13
  153. package/lib/components/eftposPay/pay.d.ts +10 -1
  154. package/lib/components/eftposPay/pay.js +86 -25
  155. package/lib/components/eftposPay/payo/config.js +121 -268
  156. package/lib/components/eftposPay/payo/const.d.ts +22 -2
  157. package/lib/components/eftposPay/payo/const.js +55 -36
  158. package/lib/components/eftposPay/payo/hooks.d.ts +5 -0
  159. package/lib/components/eftposPay/payo/hooks.js +1 -1
  160. package/lib/components/eftposPay/store/index.d.ts +154 -53
  161. package/lib/components/eftposPay/store/index.js +7 -66
  162. package/lib/components/eftposPay/tyro/const.d.ts +17 -0
  163. package/lib/components/eftposPay/tyro/const.js +114 -0
  164. package/lib/components/eftposPay/tyro/hooks.d.ts +14 -0
  165. package/lib/components/eftposPay/{eftpos/index.js → tyro/hooks.js} +31 -36
  166. package/lib/components/eftposPay/tyro/index.d.ts +9 -0
  167. package/lib/components/eftposPay/tyro/index.js +558 -0
  168. package/lib/components/eftposPay/windcave/const.d.ts +24 -9
  169. package/lib/components/eftposPay/windcave/const.js +53 -104
  170. package/lib/components/eftposPay/windcave/helper.d.ts +16 -2
  171. package/lib/components/eftposPay/windcave/helper.js +163 -48
  172. package/lib/components/eftposPay/windcave/receiptAction.d.ts +12 -0
  173. package/lib/components/eftposPay/windcave/receiptAction.js +15 -47
  174. package/lib/components/eftposPay/windcave/timer.d.ts +13 -1
  175. package/lib/components/eftposPay/windcave/timer.js +5 -0
  176. package/lib/components/eftposPay/windcave/windcave.d.ts +2 -1
  177. package/lib/components/eftposPay/windcave/windcave.js +130 -130
  178. package/lib/utils/load.d.ts +11 -0
  179. package/lib/utils/load.js +100 -0
  180. package/lowcode/eftpos/meta.ts +202 -160
  181. package/lowcode/eftpos-pay/meta.ts +45 -12
  182. package/package.json +4 -4
  183. package/es/components/eftposPay/eftpos/config.d.ts +0 -11
  184. package/es/components/eftposPay/eftpos/config.js +0 -178
  185. package/es/components/eftposPay/eftpos/const.d.ts +0 -10
  186. package/es/components/eftposPay/eftpos/index.d.ts +0 -7
  187. package/es/components/eftposPay/eftpos/index.js +0 -35
  188. package/es/components/eftposPay/windcave/action.d.ts +0 -8
  189. package/es/components/eftposPay/windcave/action.js +0 -104
  190. package/es/components/eftposPay/windcave/hook.d.ts +0 -14
  191. package/es/components/eftposPay/windcave/index.d.ts +0 -8
  192. package/es/components/eftposPay/windcave/index.js +0 -49
  193. package/es/components/eftposPay/windcave/pos.d.ts +0 -8
  194. package/es/components/eftposPay/windcave/pos.js +0 -180
  195. package/es/components/eftposPay/windcave/pwd.d.ts +0 -8
  196. package/es/components/eftposPay/windcave/pwd.js +0 -124
  197. package/es/components/eftposPay/windcave/receipet.d.ts +0 -6
  198. package/es/components/eftposPay/windcave/receipet.js +0 -67
  199. package/es/components/eftposPay/windcave/wait.d.ts +0 -12
  200. package/es/components/eftposPay/windcave/wait.js +0 -139
  201. package/lib/components/eftposPay/eftpos/config.d.ts +0 -11
  202. package/lib/components/eftposPay/eftpos/config.js +0 -199
  203. package/lib/components/eftposPay/eftpos/const.d.ts +0 -10
  204. package/lib/components/eftposPay/eftpos/const.js +0 -165
  205. package/lib/components/eftposPay/eftpos/index.d.ts +0 -7
  206. package/lib/components/eftposPay/windcave/action.d.ts +0 -8
  207. package/lib/components/eftposPay/windcave/action.js +0 -143
  208. package/lib/components/eftposPay/windcave/hook.d.ts +0 -14
  209. package/lib/components/eftposPay/windcave/hook.js +0 -139
  210. package/lib/components/eftposPay/windcave/index.d.ts +0 -8
  211. package/lib/components/eftposPay/windcave/index.js +0 -78
  212. package/lib/components/eftposPay/windcave/pos.d.ts +0 -8
  213. package/lib/components/eftposPay/windcave/pos.js +0 -197
  214. package/lib/components/eftposPay/windcave/pwd.d.ts +0 -8
  215. package/lib/components/eftposPay/windcave/pwd.js +0 -143
  216. package/lib/components/eftposPay/windcave/receipet.d.ts +0 -6
  217. package/lib/components/eftposPay/windcave/receipet.js +0 -93
  218. package/lib/components/eftposPay/windcave/wait.d.ts +0 -12
  219. package/lib/components/eftposPay/windcave/wait.js +0 -163
@@ -48,6 +48,17 @@ export default {
48
48
  'page.eftpos-pay.text.accept': 'Accept',
49
49
  'page.eftpos-pay.text.decline': 'Decline',
50
50
  'page.eftpos-pay.text.manual.marking': 'Manual marking',
51
+ 'page.eftpos-pay.text.manual.title': 'Confirm payment amount',
52
+ 'page.eftpos-pay.text.manual.subtitle': function pageEftposPayTextManualSubtitle(money) {
53
+ return "Amount paid for this transaction:".concat(money, ".");
54
+ },
55
+ 'page.eftpos-pay.text.manual.confirm': 'Please verify if the payment amount matches the amount on the EFTPOS.',
56
+ 'page.eftpos-pay.text.manual.btn.confirm': function pageEftposPayTextManualBtnConfirm(money) {
57
+ return "Confirm(".concat(money, ")");
58
+ },
59
+ 'page.eftpos-pay.text.manual.diff': "If it doesn't match, please enter the actual transaction amount in the input box below.",
60
+ 'page.eftpos-pay.text.manual.tip': "Amount tendered (incl. surcharge)",
61
+ 'page.eftpos-pay.text.manual.cancel': 'Cancel current transaction',
51
62
  'page.eftpos-pay.text.modify.payment.info': function pageEftposPayTextModifyPaymentInfo(mode) {
52
63
  return mode === 'pay' ? 'Modify payment info' : 'Modify refund information';
53
64
  },
@@ -87,6 +98,12 @@ export default {
87
98
  'page.eftpos-pay.text.surcharge.edit.rate': 'Rate',
88
99
  'page.eftpos-pay.text.surcharge.edit.surcharge': 'Edit Surcharge',
89
100
  'page.eftpos-pay.text.transaction.end': 'Transaction end',
101
+ 'page.eftpos-pay.text.transaction.user.declined.title': 'Signature declined',
102
+ 'page.eftpos-pay.text.transaction.user.declined.text': 'The transaction failed due to signature decline.',
103
+ 'page.eftpos-pay.text.transaction.user.config.title': 'Configuration Parameter Error',
104
+ 'page.eftpos-pay.text.transaction.user.config.text': 'Sorry, please check if the configuration parameters in the device settings are filled in correctly.',
105
+ 'page.eftpos-pay.text.transaction.back.declined.title': 'Transaction Declined',
106
+ 'page.eftpos-pay.text.transaction.back.declined.text': "We're sorry, the bank has declined this transaction. Please try another card.",
90
107
  'page.eftpos-pay.text.transaction.fail': 'Transaction failed.',
91
108
  'page.eftpos-pay.text.transaction.fail.timeout': 'Transaction timeout.',
92
109
  'page.eftpos-pay.text.transaction.pay.fail.timeout': 'Transaction timeout.',
@@ -119,7 +136,13 @@ export default {
119
136
  'page.eftpos-pay.text.reconnecting': 'Reconnecting',
120
137
  'page.eftpos-pay.text.reconnect.network': 'Reconnect network',
121
138
  'page.eftpos-pay.text.network.disconnected': 'Network disconnected',
122
- 'page.eftpos-pay.text.not.connected': 'The network is not connected'
139
+ 'page.eftpos-pay.text.not.connected': 'The network is not connected',
140
+ 'page.eftpos-pay.text.tyro-btn': function pageEftposPayTextTyroBtn(key) {
141
+ return key;
142
+ },
143
+ 'page.eftpos-pay.text.tyro': function pageEftposPayTextTyro(key) {
144
+ return key;
145
+ }
123
146
  },
124
147
  'zh-CN': {
125
148
  'page.eftpos-pay.text.loading': function pageEftposPayTextLoading(mode) {
@@ -170,6 +193,17 @@ export default {
170
193
  'page.eftpos-pay.text.accept': '接受',
171
194
  'page.eftpos-pay.text.decline': '拒绝',
172
195
  'page.eftpos-pay.text.manual.marking': '手动标记',
196
+ 'page.eftpos-pay.text.manual.title': '确认支付金额',
197
+ 'page.eftpos-pay.text.manual.subtitle': function pageEftposPayTextManualSubtitle(money) {
198
+ return "\u6B64\u6B21\u4ED8\u6B3E\u91D1\u989D\uFF1A".concat(money, "\u3002");
199
+ },
200
+ 'page.eftpos-pay.text.manual.confirm': '请检查付款金额是否与刷卡机上的金额一致。',
201
+ 'page.eftpos-pay.text.manual.btn.confirm': function pageEftposPayTextManualBtnConfirm(money) {
202
+ return "\u786E\u8BA4(".concat(money, ")");
203
+ },
204
+ 'page.eftpos-pay.text.manual.diff': "如不一致请在下方输入框内输入真实的交易金额。",
205
+ 'page.eftpos-pay.text.manual.tip': "实付金额(含附加费)",
206
+ 'page.eftpos-pay.text.manual.cancel': '取消当前交易',
173
207
  'page.eftpos-pay.text.modify.payment.info': function pageEftposPayTextModifyPaymentInfo(mode) {
174
208
  return mode === 'pay' ? '修改支付信息' : '修改退款信息';
175
209
  },
@@ -217,6 +251,12 @@ export default {
217
251
  // Edit Surcharge
218
252
 
219
253
  'page.eftpos-pay.text.transaction.end': '交易结束',
254
+ 'page.eftpos-pay.text.transaction.user.declined.title': '签名被拒绝',
255
+ 'page.eftpos-pay.text.transaction.user.declined.text': '由于签名被拒绝,此交易失败。',
256
+ 'page.eftpos-pay.text.transaction.user.config.title': '配置参数错误',
257
+ 'page.eftpos-pay.text.transaction.user.config.text': '抱歉,请检查设备设置中的配置参数是否填写正确。',
258
+ 'page.eftpos-pay.text.transaction.back.declined.title': '交易被拒绝',
259
+ 'page.eftpos-pay.text.transaction.back.declined.text': "很抱歉,银行拒绝了此次交易。请更换其他卡片进行尝试。",
220
260
  'page.eftpos-pay.text.transaction.fail': '交易失败',
221
261
  'page.eftpos-pay.text.transaction.fail.timeout': '交易等待超时',
222
262
  'page.eftpos-pay.text.transaction.pay.fail.timeout': '交易请求超时',
@@ -249,7 +289,151 @@ export default {
249
289
  'page.eftpos-pay.text.reconnecting': '连接中',
250
290
  'page.eftpos-pay.text.reconnect.network': '重连网络',
251
291
  'page.eftpos-pay.text.network.disconnected': '网络断开连接',
252
- 'page.eftpos-pay.text.not.connected': '当前网络未连接'
292
+ 'page.eftpos-pay.text.not.connected': '当前网络未连接',
293
+ 'page.eftpos-pay.text.tyro-btn': function pageEftposPayTextTyroBtn(key) {
294
+ if (key === 'YES') {
295
+ return '是';
296
+ }
297
+ if (key === 'NO') {
298
+ return '否';
299
+ }
300
+ if (key === 'OK') {
301
+ return '好的';
302
+ }
303
+ if (key === 'RETRY') {
304
+ return '重试';
305
+ }
306
+ if (key === 'Retrying...') {
307
+ return '重试';
308
+ }
309
+ if (key === 'QUIT') {
310
+ return '退出';
311
+ }
312
+ return key;
313
+ },
314
+ 'page.eftpos-pay.text.tyro': function pageEftposPayTextTyro(key) {
315
+ if (key === 'Initiating...') {
316
+ return '初始化中...';
317
+ }
318
+ if (key === 'Retrying...') {
319
+ return '重试';
320
+ }
321
+ if (key === 'REVERSED') {
322
+ return '已撤销';
323
+ }
324
+ if (key === 'APPROVED') {
325
+ return '已批准';
326
+ }
327
+ if (key === 'DECLINED') {
328
+ return '已拒绝';
329
+ }
330
+ if (key === 'Select account') {
331
+ return '请选择账户';
332
+ }
333
+ if (key === 'Enter PIN') {
334
+ return '请输入密码';
335
+ }
336
+ if (key.includes('Swipe card. Purchase:')) {
337
+ return key.replace(/^(Swipe card. Purchase)/i, '请刷卡。购买金额');
338
+ }
339
+ if (key === 'APPROVED W/ SIGNATURE. Signature OK?') {
340
+ return '请确认签名?';
341
+ }
342
+ if (key === "Sending answer 'NO'...") {
343
+ return '拒绝处理中,请等待...';
344
+ }
345
+ if (key === "Sending answer 'YES'...") {
346
+ return '处理中,请等待...';
347
+ }
348
+ if (key === 'Cancel this transaction') {
349
+ return '取消此交易?';
350
+ }
351
+ if (key.includes('Connection lost. Attempting to recover')) {
352
+ return '连接丢失,正在尝试恢复';
353
+ }
354
+ if (key === 'Please perform the "Authorise POS" function on your terminal') {
355
+ return '请在您的EFTPOS上执行“授权POS”功能';
356
+ }
357
+ if (key.includes('Processing transaction - please wait')) {
358
+ return '交易处理中, 请等待...';
359
+ }
360
+ if (key.includes('Transaction could not be processed (410). Void transaction via terminal if necessary')) {
361
+ return '交易无法处理。必要时可以通过刷卡机作废交易。';
362
+ }
363
+ if (key.includes('Invalid transaction details')) {
364
+ return key.replace(/^(Invalid transaction details)/i, '交易详细信息无效');
365
+ }
366
+ if (key === 'Tyro system not ready (202). Please try again.') {
367
+ return 'Tyro系统未就绪(202)。请重试。';
368
+ }
369
+ if (key === 'Querying terminal...') {
370
+ return '正在查询终端... ';
371
+ }
372
+ if (key === 'Transaction could not be processed (202). Void transaction via terminal if necessary.') {
373
+ return '无法处理交易(202)。请通过终端撤销交易。';
374
+ }
375
+ if (key === 'Transaction could not be processed (403). Void transaction via terminal if necessary.') {
376
+ return '无法处理交易(403)。请通过终端撤销交易。';
377
+ }
378
+ if (key === 'Transaction could not be processed (400). Void transaction via terminal if necessary.') {
379
+ return '无法处理交易(400)。请通过终端撤销交易。';
380
+ }
381
+ if (key === 'Transaction could not be processed (404). Void transaction via terminal if necessary.') {
382
+ return '无法处理交易(404)。请通过终端撤销交易。';
383
+ }
384
+ if (key === 'Transaction could not be processed (502). Void transaction via terminal if necessary.') {
385
+ return '无法处理交易(502)。请通过终端撤销交易。';
386
+ }
387
+ if (key === 'Transaction could not be processed (503). Void transaction via terminal if necessary.') {
388
+ return '无法处理交易(503)。请通过终端撤销交易。';
389
+ }
390
+ if (key === 'Transaction could not be processed (504). Void transaction via terminal if necessary.') {
391
+ return '无法处理交易(504)。请通过终端撤销交易。';
392
+ }
393
+ if (key === 'Connection to terminal lost (404). Check terminal connection.') {
394
+ return '终端设备连接丢失(404)。请检查设备连接';
395
+ }
396
+ if (key === 'Connection to terminal lost (502). Check terminal connection.') {
397
+ return '终端设备连接丢失(502)。请检查设备连接';
398
+ }
399
+ if (key === 'Connection to terminal lost (504). Check terminal connection.') {
400
+ return '终端设备连接丢失(504)。请检查设备连接';
401
+ }
402
+ if (key === 'Connection to terminal lost (404). Check connection and try again(404).') {
403
+ return '终端设备连接丢失。请检查设备连接并重试(404)';
404
+ }
405
+ if (key === 'Transaction could not be processed (410).') {
406
+ return '无法处理交易(410)。';
407
+ }
408
+ if (key === 'Continuing last transaction...') {
409
+ return '继续进行上次交易';
410
+ }
411
+ if (key === 'Enter PIN or press SIGN') {
412
+ return '请输入密码或签名';
413
+ }
414
+ if (key === 'TRANSACTION CANCELLED') {
415
+ return '交易已取消';
416
+ }
417
+ if (key === 'Reversing transaction') {
418
+ return '正在撤销交易...';
419
+ }
420
+ if (key === 'POS is not paired with a terminal') {
421
+ return ['POS未与EFTPOS配对。', '请先配对后再发起支付。'];
422
+ }
423
+ if (key === 'Terminal is busy processing another transaction (503)') {
424
+ return ['交易繁忙,刷卡机正在处理另一笔交易。', '请在刷卡机上处理完成上一笔交易后再次发起支付。'];
425
+ }
426
+ if (key === 'DECLINED. Print customer copy?') {
427
+ return '已拒绝。是否打印客户副本?';
428
+ }
429
+ if (key === 'APPROVED. Print customer copy?' || key === 'Approved. Print customer copy?') {
430
+ return '已批准。是否打印客户副本?';
431
+ }
432
+ if (key === 'Please answer this question with one of the following option/s') {
433
+ return '请使用以下选项之一回答此问题';
434
+ }
435
+ return key;
436
+ }
253
437
  },
254
438
  'zh-HK': {
255
439
  'page.eftpos-pay.text.loading': function pageEftposPayTextLoading(mode) {
@@ -300,6 +484,17 @@ export default {
300
484
  'page.eftpos-pay.text.accept': '接受',
301
485
  'page.eftpos-pay.text.decline': '拒絕',
302
486
  'page.eftpos-pay.text.manual.marking': '手動標記',
487
+ 'page.eftpos-pay.text.manual.title': '確認支付金額',
488
+ 'page.eftpos-pay.text.manual.subtitle': function pageEftposPayTextManualSubtitle(money) {
489
+ return "\u6B64\u6B21\u4ED8\u6B3E\u91D1\u984D\uFF1A".concat(money, "\u3002");
490
+ },
491
+ 'page.eftpos-pay.text.manual.confirm': '請檢查付款金額是否與刷卡機上的金額一致。',
492
+ 'page.eftpos-pay.text.manual.btn.confirm': function pageEftposPayTextManualBtnConfirm(money) {
493
+ return "\u78BA\u8A8D(".concat(money, ")");
494
+ },
495
+ 'page.eftpos-pay.text.manual.diff': "如不一致請在下方輸入框內輸入真實的交易金額。",
496
+ 'page.eftpos-pay.text.manual.tip': "實付金額(含附加費)",
497
+ 'page.eftpos-pay.text.manual.cancel': '取消當前交易',
303
498
  'page.eftpos-pay.text.modify.payment.info': function pageEftposPayTextModifyPaymentInfo(mode) {
304
499
  return mode === 'pay' ? '修改支付信息' : '修改退款信息';
305
500
  },
@@ -347,6 +542,12 @@ export default {
347
542
  // Edit Surcharge
348
543
 
349
544
  'page.eftpos-pay.text.transaction.end': '交易結束',
545
+ 'page.eftpos-pay.text.transaction.user.declined.title': '簽名被拒絕',
546
+ 'page.eftpos-pay.text.transaction.user.declined.text': '由於簽名被拒絕,此交易失敗。',
547
+ 'page.eftpos-pay.text.transaction.user.config.title': '配置參數錯誤',
548
+ 'page.eftpos-pay.text.transaction.user.config.text': '抱歉,請檢查設備設置中的配置參數是否填寫正確。',
549
+ 'page.eftpos-pay.text.transaction.back.declined.title': '交易被拒絕',
550
+ 'page.eftpos-pay.text.transaction.back.declined.text': "很抱歉,銀行拒絕了此次交易。請更換其他卡片進行嘗試。",
350
551
  'page.eftpos-pay.text.transaction.fail': '交易失敗',
351
552
  'page.eftpos-pay.text.transaction.fail.timeout': '交易等待超時',
352
553
  'page.eftpos-pay.text.transaction.pay.fail.timeout': '交易請求超時',
@@ -379,6 +580,150 @@ export default {
379
580
  'page.eftpos-pay.text.reconnecting': '連接中',
380
581
  'page.eftpos-pay.text.reconnect.network': '重連網絡',
381
582
  'page.eftpos-pay.text.network.disconnected': '網絡斷開連接',
382
- 'page.eftpos-pay.text.not.connected': '當前網絡未連接'
583
+ 'page.eftpos-pay.text.not.connected': '當前網絡未連接',
584
+ 'page.eftpos-pay.text.tyro-btn': function pageEftposPayTextTyroBtn(key) {
585
+ if (key === 'YES') {
586
+ return '是';
587
+ }
588
+ if (key === 'NO') {
589
+ return '否';
590
+ }
591
+ if (key === 'OK') {
592
+ return '好的';
593
+ }
594
+ if (key === 'RETRY') {
595
+ return '重試';
596
+ }
597
+ if (key === 'Retrying...') {
598
+ return '重試';
599
+ }
600
+ if (key === 'QUIT') {
601
+ return '退出';
602
+ }
603
+ return key;
604
+ },
605
+ 'page.eftpos-pay.text.tyro': function pageEftposPayTextTyro(key) {
606
+ if (key === 'Initiating...') {
607
+ return '初始化中...';
608
+ }
609
+ if (key === 'Retrying...') {
610
+ return '重試';
611
+ }
612
+ if (key === 'REVERSED') {
613
+ return '已撤銷';
614
+ }
615
+ if (key === 'APPROVED') {
616
+ return '已批准';
617
+ }
618
+ if (key === 'DECLINED') {
619
+ return '已拒絕';
620
+ }
621
+ if (key === 'Select account') {
622
+ return '請選擇賬户';
623
+ }
624
+ if (key === 'Enter PIN') {
625
+ return '請輸入密碼';
626
+ }
627
+ if (key.includes('Swipe card. Purchase:')) {
628
+ return key.replace(/^(Swipe card. Purchase)/i, '請刷卡。購買金額');
629
+ }
630
+ if (key === 'APPROVED W/ SIGNATURE. Signature OK?') {
631
+ return '請確認簽名?';
632
+ }
633
+ if (key === "Sending answer 'NO'...") {
634
+ return '拒絕處理中,請等待...';
635
+ }
636
+ if (key === "Sending answer 'YES'...") {
637
+ return '處理中,請等待...';
638
+ }
639
+ if (key === 'Cancel this transaction') {
640
+ return '取消此交易?';
641
+ }
642
+ if (key.includes('Connection lost. Attempting to recover')) {
643
+ return '連接丟失,正在嘗試恢復';
644
+ }
645
+ if (key === 'Please perform the "Authorise POS" function on your terminal') {
646
+ return '請在您的EFTPOS上執行“授權POS”功能';
647
+ }
648
+ if (key.includes('Processing transaction - please wait')) {
649
+ return '交易處理中, 請等待...';
650
+ }
651
+ if (key.includes('Transaction could not be processed (410). Void transaction via terminal if necessary')) {
652
+ return '交易無法處理。必要時可以通過刷卡機作廢交易。';
653
+ }
654
+ if (key.includes('Invalid transaction details')) {
655
+ return key.replace(/^(Invalid transaction details)/i, '交易詳細信息無效');
656
+ }
657
+ if (key === 'Tyro system not ready (202). Please try again.') {
658
+ return 'Tyro系統未就緒(202)。請重試。';
659
+ }
660
+ if (key === 'Querying terminal...') {
661
+ return '正在查詢終端... ';
662
+ }
663
+ if (key === 'Transaction could not be processed (202). Void transaction via terminal if necessary.') {
664
+ return '無法處理交易(202)。請通過終端撤銷交易。';
665
+ }
666
+ if (key === 'Transaction could not be processed (403). Void transaction via terminal if necessary.') {
667
+ return '無法處理交易(403)。請通過終端撤銷交易。';
668
+ }
669
+ if (key === 'Transaction could not be processed (400). Void transaction via terminal if necessary.') {
670
+ return '無法處理交易(400)。請通過終端撤銷交易。';
671
+ }
672
+ if (key === 'Transaction could not be processed (404). Void transaction via terminal if necessary.') {
673
+ return '無法處理交易(404)。請通過終端撤銷交易。';
674
+ }
675
+ if (key === 'Transaction could not be processed (502). Void transaction via terminal if necessary.') {
676
+ return '無法處理交易(502)。請通過終端撤銷交易。';
677
+ }
678
+ if (key === 'Transaction could not be processed (503). Void transaction via terminal if necessary.') {
679
+ return '無法處理交易(503)。請通過終端撤銷交易。';
680
+ }
681
+ if (key === 'Transaction could not be processed (504). Void transaction via terminal if necessary.') {
682
+ return '無法處理交易(504)。請通過終端撤銷交易。';
683
+ }
684
+ if (key === 'Connection to terminal lost (404). Check terminal connection.') {
685
+ return '終端設備連接丟失(404)。請檢查設備連接';
686
+ }
687
+ if (key === 'Connection to terminal lost (502). Check terminal connection.') {
688
+ return '終端設備連接丟失(502)。請檢查設備連接';
689
+ }
690
+ if (key === 'Connection to terminal lost (504). Check terminal connection.') {
691
+ return '終端設備連接丟失(504)。請檢查設備連接';
692
+ }
693
+ if (key === 'Connection to terminal lost (404). Check connection and try again(404).') {
694
+ return '終端設備連接丟失。請檢查設備連接並重試(404)';
695
+ }
696
+ if (key === 'Transaction could not be processed (410).') {
697
+ return '無法處理交易(410)。';
698
+ }
699
+ if (key === 'Continuing last transaction...') {
700
+ return '繼續進行上次交易';
701
+ }
702
+ if (key === 'Enter PIN or press SIGN') {
703
+ return '請輸入密碼或簽名';
704
+ }
705
+ if (key === 'TRANSACTION CANCELLED') {
706
+ return '交易已取消';
707
+ }
708
+ if (key === 'Reversing transaction') {
709
+ return '正在撤銷交易...';
710
+ }
711
+ if (key === 'POS is not paired with a terminal') {
712
+ return ['POS未與EFTPOS配對。', '請先配對後再發起支付。'];
713
+ }
714
+ if (key === 'Terminal is busy processing another transaction (503)') {
715
+ return ['交易繁忙,刷卡機正在處理另一筆交易。', '請在刷卡機上處理完成上一筆交易後再次發起支付。'];
716
+ }
717
+ if (key === 'DECLINED. Print customer copy?') {
718
+ return '已拒絕。是否打印客户副本?';
719
+ }
720
+ if (key === 'APPROVED. Print customer copy?' || key === 'Approved. Print customer copy?') {
721
+ return '已批准。是否打印客户副本?';
722
+ }
723
+ if (key === 'Please answer this question with one of the following option/s') {
724
+ return '請使用以下選項之一回答此問題';
725
+ }
726
+ return key;
727
+ }
383
728
  }
384
729
  };
@@ -1,6 +1,6 @@
1
1
  import { State } from './store';
2
2
  export { default as Payo } from './payo';
3
3
  export { default as Windcave } from './windcave/windcave';
4
- export { default as Eftpos } from './eftpos';
4
+ export { default as Tyro } from './tyro';
5
5
  export declare const getInitState: (type: string, params?: any) => State;
6
- export declare const getDeviceInfo: (store: State) => import("./const").Amount;
6
+ export declare const getAmonunt: (store: State) => import("./const").Amount;
@@ -1,32 +1,31 @@
1
1
  import { EftposEnum } from "./const";
2
- import getEftposInitState, { getAmonunt as getEftposAmonunt } from "./eftpos/const";
3
2
  import getPayoInitState, { getAmonunt as getPayoAmonunt } from "./payo/const";
3
+ import getTyroInitState, { getAmonunt as getTyroAmonunt } from "./tyro/const";
4
4
  import getWindcaveInitState, { getAmonunt as getWindcaveAmonunt } from "./windcave/const";
5
5
  export { default as Payo } from "./payo";
6
- // export { default as Windcave } from './windcave';
7
6
  export { default as Windcave } from "./windcave/windcave";
8
- export { default as Eftpos } from "./eftpos";
7
+ export { default as Tyro } from "./tyro";
9
8
  export var getInitState = function getInitState(type, params) {
10
9
  switch (type) {
11
10
  case EftposEnum.Payo:
12
11
  return getPayoInitState(params);
13
- case EftposEnum.Eftpos:
14
- return getEftposInitState(params);
15
12
  case EftposEnum.Windcave:
16
13
  return getWindcaveInitState(params);
14
+ case EftposEnum.Tyro:
15
+ return getTyroInitState(params);
17
16
  default:
18
17
  throw new Error('未知的厂商类型');
19
18
  }
20
19
  };
21
- export var getDeviceInfo = function getDeviceInfo(store) {
22
- if (store.eftpos === EftposEnum.Eftpos) {
23
- return getPayoAmonunt(store);
24
- }
20
+ export var getAmonunt = function getAmonunt(store) {
25
21
  if (store.eftpos === EftposEnum.Payo) {
26
- return getEftposAmonunt(store);
22
+ return getPayoAmonunt(store);
27
23
  }
28
24
  if (store.eftpos === EftposEnum.Windcave) {
29
25
  return getWindcaveAmonunt(store);
30
26
  }
27
+ if (store.eftpos === EftposEnum.Tyro) {
28
+ return getTyroAmonunt(store);
29
+ }
31
30
  throw new Error('未知的厂商类型');
32
31
  };
@@ -1,11 +1,20 @@
1
1
  import React from 'react';
2
2
  import { PayProps } from './const';
3
3
  import './index.less';
4
- declare const Pay: ({ api, onChange: onChangeStatus, className, terminal, net, isIpad }: PayProps & {
4
+ /**
5
+ * @title: 支付组件
6
+ * @description:
7
+ * @Author: hongbing.wang
8
+ * @Date: 2024-08-20 14:59
9
+ */
10
+ declare const Pay: ({ api, onChange: onChangeStatus, className, terminal, net, isIpad, tyroUrl, tyroVersion, formatAmount, }: PayProps & {
5
11
  terminal: {
6
12
  network: boolean;
7
13
  };
8
14
  net: boolean;
9
15
  isIpad: boolean;
16
+ tyroUrl?: string | undefined;
17
+ tyroVersion?: string | undefined;
18
+ formatAmount(amount: number | string, precision: number, symbol: string): string;
10
19
  }) => React.JSX.Element;
11
20
  export default Pay;