@pisell/private-materials 6.6.62 → 6.6.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +9 -9
- package/es/components/booking/components/footer/amount.js +4 -3
- package/es/components/booking/components/footer/utils.js +10 -3
- package/es/components/booking/components/voucher/index.js +1 -1
- package/es/components/booking/info2/service/editService/index.js +76 -8
- package/es/components/booking/info2/service/editService/utils.d.ts +1 -0
- package/es/components/booking/info2/service/editService/utils.js +16 -0
- package/es/components/booking/payments/index.js +1 -1
- package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/es/components/eftpos/PairModal/hooks.d.ts +27 -0
- package/es/components/eftpos/PairModal/hooks.js +67 -0
- package/es/components/eftpos/PairModal/index.d.ts +11 -0
- package/es/components/eftpos/PairModal/index.js +246 -0
- package/es/components/eftpos/PairModal/index.less +70 -0
- package/es/components/eftpos/SettlementModal/Action.d.ts +7 -0
- package/es/components/eftpos/SettlementModal/Action.js +141 -0
- package/es/components/eftpos/SettlementModal/index.d.ts +7 -0
- package/es/components/eftpos/SettlementModal/index.js +135 -0
- package/es/components/eftpos/SettlementModal/index.less +33 -0
- package/es/components/eftpos/SettlementModal/serve.d.ts +8 -0
- package/es/components/eftpos/SettlementModal/serve.js +171 -0
- package/es/components/eftpos/SettlementModal/types.d.ts +138 -0
- package/es/components/eftpos/SettlementModal/types.js +35 -0
- package/es/components/eftpos/SettlementModal/utils.d.ts +18 -0
- package/es/components/eftpos/SettlementModal/utils.js +351 -0
- package/es/components/eftpos/assets/mx51SCI.svg +15 -0
- package/es/components/eftpos/const.d.ts +3 -1
- package/es/components/eftpos/const.js +2 -0
- package/es/components/eftpos/device.d.ts +3 -1
- package/es/components/eftpos/device.js +14 -3
- package/es/components/eftpos/hooks.d.ts +13 -0
- package/es/components/eftpos/hooks.js +35 -0
- package/es/components/eftpos/index.js +198 -24
- package/es/components/eftpos/index.less +32 -1
- package/es/components/eftpos/locales.d.ts +80 -0
- package/es/components/eftpos/locales.js +205 -25
- package/es/components/eftpos/table.js +47 -3
- package/es/components/eftposPay/aggregatePayment/hooks/useMicropay.d.ts +2 -2
- package/es/components/eftposPay/aggregatePayment/hooks/usePayment.d.ts +8 -0
- package/es/components/eftposPay/aggregatePayment/hooks/usePayment.js +145 -0
- package/es/components/eftposPay/aggregatePayment/index.d.ts +2 -1
- package/es/components/eftposPay/aggregatePayment/index.js +2 -1
- package/es/components/eftposPay/aggregatePayment/mock.d.ts +495 -0
- package/es/components/eftposPay/aggregatePayment/mock.js +567 -0
- package/es/components/eftposPay/aggregatePayment/service.js +1 -0
- package/es/components/eftposPay/aggregatePayment/types.d.ts +12 -12
- package/es/components/eftposPay/aggregatePayment/types.js +4 -8
- package/es/components/eftposPay/aggregatePayment/utils/payment.d.ts +13 -13
- package/es/components/eftposPay/aggregatePayment/utils/payment.js +231 -168
- package/es/components/eftposPay/amount.js +15 -1
- package/es/components/eftposPay/app.js +2 -3
- package/es/components/eftposPay/component/fail/failCustom.js +13 -4
- package/es/components/eftposPay/component/fail/index.js +12 -5
- package/es/components/eftposPay/component/fail/network.js +3 -0
- package/es/components/eftposPay/component/fail/unknow.js +8 -0
- package/es/components/eftposPay/component/manual/index.js +17 -3
- package/es/components/eftposPay/component/signature/index.js +3 -0
- package/es/components/eftposPay/const.d.ts +8 -3
- package/es/components/eftposPay/const.js +2 -0
- package/es/components/eftposPay/device.js +225 -38
- package/es/components/eftposPay/helper.d.ts +3 -0
- package/es/components/eftposPay/helper.js +2 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/index.js +50 -13
- package/es/components/eftposPay/linkly/const.js +1 -1
- package/es/components/eftposPay/linkly/hooks/normal.js +21 -68
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +20 -81
- package/es/components/eftposPay/linkly/index.js +11 -23
- package/es/components/eftposPay/locales.d.ts +15 -0
- package/es/components/eftposPay/locales.js +30 -15
- package/es/components/eftposPay/manufacturer.d.ts +1 -0
- package/es/components/eftposPay/manufacturer.js +4 -0
- package/es/components/eftposPay/mx51/Action.d.ts +6 -0
- package/es/components/eftposPay/mx51/Action.js +144 -0
- package/es/components/eftposPay/mx51/const.d.ts +5 -0
- package/es/components/eftposPay/mx51/const.js +69 -0
- package/es/components/eftposPay/mx51/index.d.ts +6 -0
- package/es/components/eftposPay/mx51/index.js +498 -0
- package/es/components/eftposPay/mx51/types.d.ts +142 -0
- package/es/components/eftposPay/mx51/types.js +35 -0
- package/es/components/eftposPay/mx51/utils.d.ts +10 -0
- package/es/components/eftposPay/mx51/utils.js +121 -0
- package/es/components/eftposPay/pay.js +21 -9
- package/es/components/eftposPay/payo/config.js +39 -5
- package/es/components/eftposPay/payo/const.js +1 -1
- package/es/components/eftposPay/payo/hooks.js +3 -12
- package/es/components/eftposPay/payo/payment.js +69 -136
- package/es/components/eftposPay/store/index.d.ts +4 -8
- package/es/components/eftposPay/tip.js +5 -0
- package/es/components/eftposPay/tyro/const.js +1 -1
- package/es/components/eftposPay/tyro/index.js +44 -11
- package/es/components/eftposPay/utils/payLog.d.ts +81 -0
- package/es/components/eftposPay/utils/payLog.js +458 -0
- package/es/components/eftposPay/windcave/const.js +1 -1
- package/es/components/eftposPay/windcave/receiptAction.js +5 -0
- package/es/components/eftposPay/windcave/windcave.js +37 -38
- package/lib/components/booking/components/footer/amount.js +3 -3
- package/lib/components/booking/components/footer/utils.js +12 -5
- package/lib/components/booking/components/voucher/index.js +1 -1
- package/lib/components/booking/info2/service/editService/index.js +56 -5
- package/lib/components/booking/info2/service/editService/utils.d.ts +1 -0
- package/lib/components/booking/info2/service/editService/utils.js +16 -0
- package/lib/components/booking/payments/index.js +1 -1
- package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/lib/components/eftpos/PairModal/hooks.d.ts +27 -0
- package/lib/components/eftpos/PairModal/hooks.js +70 -0
- package/lib/components/eftpos/PairModal/index.d.ts +11 -0
- package/lib/components/eftpos/PairModal/index.js +197 -0
- package/lib/components/eftpos/PairModal/index.less +70 -0
- package/lib/components/eftpos/SettlementModal/Action.d.ts +7 -0
- package/lib/components/eftpos/SettlementModal/Action.js +153 -0
- package/lib/components/eftpos/SettlementModal/index.d.ts +7 -0
- package/lib/components/eftpos/SettlementModal/index.js +170 -0
- package/lib/components/eftpos/SettlementModal/index.less +33 -0
- package/lib/components/eftpos/SettlementModal/serve.d.ts +8 -0
- package/lib/components/eftpos/SettlementModal/serve.js +45 -0
- package/lib/components/eftpos/SettlementModal/types.d.ts +138 -0
- package/lib/components/eftpos/SettlementModal/types.js +43 -0
- package/lib/components/eftpos/SettlementModal/utils.d.ts +18 -0
- package/lib/components/eftpos/SettlementModal/utils.js +248 -0
- package/lib/components/eftpos/assets/mx51SCI.svg +15 -0
- package/lib/components/eftpos/const.d.ts +3 -1
- package/lib/components/eftpos/const.js +2 -0
- package/lib/components/eftpos/device.d.ts +3 -1
- package/lib/components/eftpos/device.js +13 -3
- package/lib/components/eftpos/hooks.d.ts +13 -0
- package/lib/components/eftpos/hooks.js +30 -0
- package/lib/components/eftpos/index.js +121 -8
- package/lib/components/eftpos/index.less +32 -1
- package/lib/components/eftpos/locales.d.ts +80 -0
- package/lib/components/eftpos/locales.js +231 -21
- package/lib/components/eftpos/table.js +30 -2
- package/lib/components/eftposPay/aggregatePayment/hooks/useMicropay.d.ts +2 -2
- package/lib/components/eftposPay/aggregatePayment/hooks/usePayment.d.ts +8 -0
- package/lib/components/eftposPay/aggregatePayment/hooks/usePayment.js +171 -0
- package/lib/components/eftposPay/aggregatePayment/index.d.ts +2 -1
- package/lib/components/eftposPay/aggregatePayment/index.js +5 -2
- package/lib/components/eftposPay/aggregatePayment/mock.d.ts +495 -0
- package/lib/components/eftposPay/aggregatePayment/mock.js +679 -0
- package/lib/components/eftposPay/aggregatePayment/types.d.ts +12 -12
- package/lib/components/eftposPay/aggregatePayment/utils/payment.d.ts +13 -13
- package/lib/components/eftposPay/aggregatePayment/utils/payment.js +173 -123
- package/lib/components/eftposPay/amount.js +13 -1
- package/lib/components/eftposPay/app.js +4 -5
- package/lib/components/eftposPay/component/fail/failCustom.js +10 -2
- package/lib/components/eftposPay/component/fail/index.js +10 -2
- package/lib/components/eftposPay/component/fail/network.js +3 -0
- package/lib/components/eftposPay/component/fail/unknow.js +8 -0
- package/lib/components/eftposPay/component/manual/index.js +16 -2
- package/lib/components/eftposPay/component/signature/index.js +3 -0
- package/lib/components/eftposPay/const.d.ts +8 -3
- package/lib/components/eftposPay/const.js +2 -0
- package/lib/components/eftposPay/device.js +114 -25
- package/lib/components/eftposPay/helper.d.ts +3 -0
- package/lib/components/eftposPay/helper.js +2 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/index.js +38 -13
- package/lib/components/eftposPay/linkly/const.js +1 -1
- package/lib/components/eftposPay/linkly/hooks/normal.js +22 -43
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +13 -65
- package/lib/components/eftposPay/linkly/index.js +8 -10
- package/lib/components/eftposPay/locales.d.ts +15 -0
- package/lib/components/eftposPay/locales.js +30 -15
- package/lib/components/eftposPay/manufacturer.d.ts +1 -0
- package/lib/components/eftposPay/manufacturer.js +6 -0
- package/lib/components/eftposPay/mx51/Action.d.ts +6 -0
- package/lib/components/eftposPay/mx51/Action.js +154 -0
- package/lib/components/eftposPay/mx51/const.d.ts +5 -0
- package/lib/components/eftposPay/mx51/const.js +85 -0
- package/lib/components/eftposPay/mx51/index.d.ts +6 -0
- package/lib/components/eftposPay/mx51/index.js +433 -0
- package/lib/components/eftposPay/mx51/types.d.ts +142 -0
- package/lib/components/eftposPay/mx51/types.js +43 -0
- package/lib/components/eftposPay/mx51/utils.d.ts +10 -0
- package/lib/components/eftposPay/mx51/utils.js +115 -0
- package/lib/components/eftposPay/pay.js +13 -3
- package/lib/components/eftposPay/payo/config.js +16 -8
- package/lib/components/eftposPay/payo/const.js +1 -1
- package/lib/components/eftposPay/payo/hooks.js +12 -10
- package/lib/components/eftposPay/payo/payment.js +31 -65
- package/lib/components/eftposPay/store/index.d.ts +4 -8
- package/lib/components/eftposPay/tip.js +5 -0
- package/lib/components/eftposPay/tyro/const.js +1 -1
- package/lib/components/eftposPay/tyro/index.js +21 -17
- package/lib/components/eftposPay/utils/payLog.d.ts +81 -0
- package/lib/components/eftposPay/utils/payLog.js +321 -0
- package/lib/components/eftposPay/windcave/const.js +1 -1
- package/lib/components/eftposPay/windcave/receiptAction.js +5 -0
- package/lib/components/eftposPay/windcave/windcave.js +27 -29
- package/package.json +2 -2
- package/es/components/eftposPay/utils/log/index.d.ts +0 -110
- package/es/components/eftposPay/utils/log/index.js +0 -371
- package/lib/components/eftposPay/utils/log/index.d.ts +0 -110
- package/lib/components/eftposPay/utils/log/index.js +0 -294
|
@@ -148,7 +148,10 @@ var locales_default = {
|
|
|
148
148
|
"page.eftpos-pay.text.huifu.scan.input-placeholder": "Enter payment code",
|
|
149
149
|
"page.eftpos-pay.text.huifu.scan.input-tip": "Tip: The payment code is 18 digits",
|
|
150
150
|
"page.eftpos-pay.text.huifu.scan.cancel": "Cancel",
|
|
151
|
-
"page.eftpos-pay.text.huifu.scan.confirm": "Confirm Payment"
|
|
151
|
+
"page.eftpos-pay.text.huifu.scan.confirm": "Confirm Payment",
|
|
152
|
+
"page.eftpos-pay.text.mx51.result.loading": "Checking transaction result…",
|
|
153
|
+
"page.eftpos-pay.text.manual.success.toast": "Payment marked as successful",
|
|
154
|
+
"page.eftpos-pay.text.manual.fail.toast": "Payment marked as failed. Please retry payment."
|
|
152
155
|
},
|
|
153
156
|
"zh-CN": {
|
|
154
157
|
"page.eftpos-pay.text.loading": (mode) => `${mode === "pay" || mode === "fullPay" ? "支付" : "退款"}进行中...`,
|
|
@@ -428,17 +431,20 @@ var locales_default = {
|
|
|
428
431
|
"page.eftpos-pay.text.huifu.scan.input-placeholder": "请输入",
|
|
429
432
|
"page.eftpos-pay.text.huifu.scan.input-tip": "提示:付款码为18位数字",
|
|
430
433
|
"page.eftpos-pay.text.huifu.scan.cancel": "取消",
|
|
431
|
-
"page.eftpos-pay.text.huifu.scan.confirm": "确认支付"
|
|
434
|
+
"page.eftpos-pay.text.huifu.scan.confirm": "确认支付",
|
|
435
|
+
"page.eftpos-pay.text.mx51.result.loading": "正在获取交易结果…",
|
|
436
|
+
"page.eftpos-pay.text.manual.success.toast": "支付标记为成功",
|
|
437
|
+
"page.eftpos-pay.text.manual.fail.toast": "支付标记为失败,请重试支付。"
|
|
432
438
|
},
|
|
433
439
|
"zh-HK": {
|
|
434
440
|
"page.eftpos-pay.text.loading": (mode) => `${mode === "pay" || mode === "fullPay" ? "支付" : "退款"}進行中...`,
|
|
435
441
|
"page.eftpos-pay.text.wait": (val, mode) => mode === "pay" || mode === "fullPay" ? `等待EFTPOS接受${val}的付款` : `請求EFTPOS接受${val}的退款。`,
|
|
436
|
-
"page.eftpos-pay.text.surcharge": "
|
|
437
|
-
"page.eftpos-pay.text.card": "
|
|
438
|
-
"page.eftpos-pay.text.account": "
|
|
439
|
-
"page.eftpos-pay.text.pin": "
|
|
440
|
-
"page.eftpos-pay.text.receipt": "
|
|
441
|
-
"page.eftpos-pay.text.receipt.again.title": "
|
|
442
|
+
"page.eftpos-pay.text.surcharge": "等待客戶確認支付手續費",
|
|
443
|
+
"page.eftpos-pay.text.card": "等待客戶出示卡片",
|
|
444
|
+
"page.eftpos-pay.text.account": "等待客戶選擇賬戶",
|
|
445
|
+
"page.eftpos-pay.text.pin": "等待客戶輸入密碼或簽名",
|
|
446
|
+
"page.eftpos-pay.text.receipt": "請客戶在收據上簽名",
|
|
447
|
+
"page.eftpos-pay.text.receipt.again.title": "確認客戶簽名",
|
|
442
448
|
"page.eftpos-pay.text.receipt.again.text": "如果簽名正確,請點擊“接受”。如果簽名錯誤,請點擊“拒絕”。",
|
|
443
449
|
"page.eftpos-pay.text.signature.title": "確認拒絕簽名?",
|
|
444
450
|
"page.eftpos-pay.text.signature.text": (mode) => mode === "pay" || mode === "fullPay" ? "拒絕將導致支付失敗,需重新支付。" : "拒絕將導致退款失敗;需要重新退款",
|
|
@@ -446,7 +452,7 @@ var locales_default = {
|
|
|
446
452
|
"page.eftpos-pay.text.timedout.text": (mode) => mode === "pay" || mode === "fullPay" ? "請您根據刷卡機上的支付狀態,手動標記支付結果,以確保交易的準確性。" : "請根據顯示在刷卡機上的退款狀態,手動標記退款結果,以確保交易準確性。",
|
|
447
453
|
"page.eftpos-pay.text.request.title": (mode) => `${mode === "pay" || mode === "fullPay" ? "支付" : "退款"}請求仍在進行中... `,
|
|
448
454
|
"page.eftpos-pay.text.request.text": (mode) => mode === "pay" || mode === "fullPay" ? "請您根據刷卡機上的支付狀態,手動標記支付結果,以確保交易的準確性。" : "請根據顯示在刷卡機上的退款狀態,手動標記退款結果,以確保交易準確性。",
|
|
449
|
-
"page.eftpos-pay.text.request.unknown.title": (mode) => `抱歉, ${mode === "pay" || mode === "fullPay" ? "支付" : "退款"}
|
|
455
|
+
"page.eftpos-pay.text.request.unknown.title": (mode) => `抱歉, ${mode === "pay" || mode === "fullPay" ? "支付" : "退款"} 過程中出現了未知錯誤`,
|
|
450
456
|
"page.eftpos-pay.text.request.unknown.text": (mode) => mode === "pay" || mode === "fullPay" ? "請您根據刷卡機上的支付狀態,手動標記支付結果,以確保交易的準確性。" : `請您根據刷卡機上的退款狀態,手動標記退款結果,以確保交易的準確性。`,
|
|
451
457
|
"page.eftpos-pay.text.interrupted": "EFTPOS設備連接中斷",
|
|
452
458
|
"page.eftpos-pay.text.reconnect": "正在嘗試重新連接EFTPOS。。。",
|
|
@@ -531,7 +537,7 @@ var locales_default = {
|
|
|
531
537
|
"page.eftpos-pay.text.transaction.eftpos.fail.network": "3. 檢查設備網絡",
|
|
532
538
|
"page.eftpos-pay.text.transaction.eftpos.fail.if": (mode) => mode === "pay" || mode === "fullPay" ? "如果您已確認此交易的付款狀態,請點擊手動標記" : "如果您已確認此訂單的退款狀態,請點擊手動標記。",
|
|
533
539
|
"page.eftpos-pay.text.transaction.eftpos.fail.other": "刷卡機支付出現問題,請打印收據後聯繫店員處理。",
|
|
534
|
-
"page.eftpos-pay.text.application": "
|
|
540
|
+
"page.eftpos-pay.text.application": "等待客戶選擇應用",
|
|
535
541
|
"page.eftpos-pay.text.approved": "已接受",
|
|
536
542
|
"page.eftpos-pay.text.device.no.title": "您還沒有添加任何設備。請添加設備後使用",
|
|
537
543
|
"page.eftpos-pay.text.device.no.add": "添加設備方式:",
|
|
@@ -686,10 +692,10 @@ var locales_default = {
|
|
|
686
692
|
];
|
|
687
693
|
}
|
|
688
694
|
if (key === "DECLINED. Print customer copy?") {
|
|
689
|
-
return "
|
|
695
|
+
return "已拒絕。是否列印客戶副本?";
|
|
690
696
|
}
|
|
691
697
|
if (key === "APPROVED. Print customer copy?" || key === "Approved. Print customer copy?") {
|
|
692
|
-
return "
|
|
698
|
+
return "已批准。是否列印客戶副本?";
|
|
693
699
|
}
|
|
694
700
|
if (key === "Please answer this question with one of the following option/s") {
|
|
695
701
|
return "請使用以下選項之一回答此問題";
|
|
@@ -708,7 +714,10 @@ var locales_default = {
|
|
|
708
714
|
"page.eftpos-pay.text.huifu.scan.input-placeholder": "請輸入",
|
|
709
715
|
"page.eftpos-pay.text.huifu.scan.input-tip": "提示:付款碼為18位數字",
|
|
710
716
|
"page.eftpos-pay.text.huifu.scan.cancel": "取消",
|
|
711
|
-
"page.eftpos-pay.text.huifu.scan.confirm": "確認支付"
|
|
717
|
+
"page.eftpos-pay.text.huifu.scan.confirm": "確認支付",
|
|
718
|
+
"page.eftpos-pay.text.mx51.result.loading": "正在獲取交易結果…",
|
|
719
|
+
"page.eftpos-pay.text.manual.success.toast": "支付標記為成功",
|
|
720
|
+
"page.eftpos-pay.text.manual.fail.toast": "支付標記為失敗,請重試支付。"
|
|
712
721
|
},
|
|
713
722
|
ja: {
|
|
714
723
|
"page.eftpos-pay.text.loading": (mode) => `${mode === "pay" || mode === "fullPay" ? "支払い" : "返金"}進行中...`,
|
|
@@ -833,7 +842,10 @@ var locales_default = {
|
|
|
833
842
|
"page.eftpos-pay.text.huifu.scan.input-placeholder": "支払いコードを入力",
|
|
834
843
|
"page.eftpos-pay.text.huifu.scan.input-tip": "ヒント:支払いコードは18桁の数字です",
|
|
835
844
|
"page.eftpos-pay.text.huifu.scan.cancel": "キャンセル",
|
|
836
|
-
"page.eftpos-pay.text.huifu.scan.confirm": "支払いを確認"
|
|
845
|
+
"page.eftpos-pay.text.huifu.scan.confirm": "支払いを確認",
|
|
846
|
+
"page.eftpos-pay.text.mx51.result.loading": "取引結果を確認中…",
|
|
847
|
+
"page.eftpos-pay.text.manual.success.toast": "支払いを成功としてマークしました",
|
|
848
|
+
"page.eftpos-pay.text.manual.fail.toast": "支払いを失敗としてマークしました。再度お支払いください。"
|
|
837
849
|
},
|
|
838
850
|
pt: {
|
|
839
851
|
"page.eftpos-pay.text.loading": (mode) => `${mode === "pay" || mode === "fullPay" ? "Pagamento" : "Reembolso"} em andamento...`,
|
|
@@ -958,6 +970,9 @@ var locales_default = {
|
|
|
958
970
|
"page.eftpos-pay.text.huifu.scan.input-placeholder": "Digite o código de pagamento",
|
|
959
971
|
"page.eftpos-pay.text.huifu.scan.input-tip": "Dica: O código de pagamento tem 18 dígitos",
|
|
960
972
|
"page.eftpos-pay.text.huifu.scan.cancel": "Cancelar",
|
|
961
|
-
"page.eftpos-pay.text.huifu.scan.confirm": "Confirmar Pagamento"
|
|
973
|
+
"page.eftpos-pay.text.huifu.scan.confirm": "Confirmar Pagamento",
|
|
974
|
+
"page.eftpos-pay.text.mx51.result.loading": "Verificando resultado da transação…",
|
|
975
|
+
"page.eftpos-pay.text.manual.success.toast": "Pagamento marcado como bem-sucedido",
|
|
976
|
+
"page.eftpos-pay.text.manual.fail.toast": "Pagamento marcado como falhou. Por favor, tente pagar novamente."
|
|
962
977
|
}
|
|
963
978
|
};
|
|
@@ -5,4 +5,5 @@ export { default as Windcave } from './windcave/windcave';
|
|
|
5
5
|
export { default as Tyro } from './tyro';
|
|
6
6
|
export { default as Linkly } from './linkly';
|
|
7
7
|
export { default as Huifu } from './huifu';
|
|
8
|
+
export { default as Mx51 } from './mx51';
|
|
8
9
|
export declare const getInitState: (type: string, params?: any) => State;
|
|
@@ -31,6 +31,7 @@ var manufacturer_exports = {};
|
|
|
31
31
|
__export(manufacturer_exports, {
|
|
32
32
|
Huifu: () => import_huifu.default,
|
|
33
33
|
Linkly: () => import_linkly.default,
|
|
34
|
+
Mx51: () => import_mx51.default,
|
|
34
35
|
Payo: () => import_payo.default,
|
|
35
36
|
Tyro: () => import_tyro.default,
|
|
36
37
|
Windcave: () => import_windcave.default,
|
|
@@ -44,12 +45,14 @@ var import_const3 = __toESM(require("./tyro/const"));
|
|
|
44
45
|
var import_const4 = __toESM(require("./windcave/const"));
|
|
45
46
|
var import_const5 = __toESM(require("./linkly/const"));
|
|
46
47
|
var import_const6 = __toESM(require("./huifu/const"));
|
|
48
|
+
var import_const7 = __toESM(require("./mx51/const"));
|
|
47
49
|
var import_helper = require("./helper");
|
|
48
50
|
var import_payo = __toESM(require("./payo"));
|
|
49
51
|
var import_windcave = __toESM(require("./windcave/windcave"));
|
|
50
52
|
var import_tyro = __toESM(require("./tyro"));
|
|
51
53
|
var import_linkly = __toESM(require("./linkly"));
|
|
52
54
|
var import_huifu = __toESM(require("./huifu"));
|
|
55
|
+
var import_mx51 = __toESM(require("./mx51"));
|
|
53
56
|
var getInitState = (type, params) => {
|
|
54
57
|
console.log("type = ", type);
|
|
55
58
|
switch (type) {
|
|
@@ -63,6 +66,8 @@ var getInitState = (type, params) => {
|
|
|
63
66
|
return (0, import_const5.default)(params);
|
|
64
67
|
case import_const.EftposEnum.Huifu:
|
|
65
68
|
return (0, import_const6.default)(params);
|
|
69
|
+
case import_const.EftposEnum.MX51:
|
|
70
|
+
return (0, import_const7.default)(params);
|
|
66
71
|
default:
|
|
67
72
|
throw new Error("未知的厂商类型");
|
|
68
73
|
}
|
|
@@ -71,6 +76,7 @@ var getInitState = (type, params) => {
|
|
|
71
76
|
0 && (module.exports = {
|
|
72
77
|
Huifu,
|
|
73
78
|
Linkly,
|
|
79
|
+
Mx51,
|
|
74
80
|
Payo,
|
|
75
81
|
Tyro,
|
|
76
82
|
Windcave,
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/eftposPay/mx51/Action.tsx
|
|
30
|
+
var Action_exports = {};
|
|
31
|
+
__export(Action_exports, {
|
|
32
|
+
default: () => Action_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Action_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_types = require("./types");
|
|
38
|
+
var Action = (props) => {
|
|
39
|
+
var _a, _b;
|
|
40
|
+
const { data, showMessage = true, cancelDisabled = false } = props;
|
|
41
|
+
const [inputValues, setInputValues] = (0, import_react.useState)({});
|
|
42
|
+
const inputValuesRef = (0, import_react.useRef)(inputValues);
|
|
43
|
+
(0, import_react.useEffect)(() => {
|
|
44
|
+
var _a2;
|
|
45
|
+
if (!data) return;
|
|
46
|
+
const inputObj = {};
|
|
47
|
+
(_a2 = data == null ? void 0 : data.layouts) == null ? void 0 : _a2.forEach((item) => {
|
|
48
|
+
var _a3;
|
|
49
|
+
(_a3 = item == null ? void 0 : item.elements) == null ? void 0 : _a3.forEach((element) => {
|
|
50
|
+
if ((element == null ? void 0 : element.type) === "input" && (element == null ? void 0 : element.name)) {
|
|
51
|
+
inputObj[element == null ? void 0 : element.name] = inputValuesRef.current[element == null ? void 0 : element.name] || "";
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
setInputValues(inputObj);
|
|
56
|
+
}, [data]);
|
|
57
|
+
(0, import_react.useEffect)(() => {
|
|
58
|
+
inputValuesRef.current = inputValues;
|
|
59
|
+
}, [inputValues]);
|
|
60
|
+
const handleInputChange = (key, value) => {
|
|
61
|
+
setInputValues((prev) => ({ ...prev, [key]: value }));
|
|
62
|
+
};
|
|
63
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, showMessage && (data == null ? void 0 : data.message) && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-step-item pisell-lowcode__eft-pay-step-item-tip" }, data == null ? void 0 : data.message), ((_a = data == null ? void 0 : data.layouts) == null ? void 0 : _a.length) > 0 && ((_b = data == null ? void 0 : data.layouts) == null ? void 0 : _b.map((item, index) => {
|
|
64
|
+
var _a2;
|
|
65
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
66
|
+
"div",
|
|
67
|
+
{
|
|
68
|
+
key: index,
|
|
69
|
+
className: "pisell-lowcode__eft-pay-step-item-btns",
|
|
70
|
+
style: {
|
|
71
|
+
marginTop: "20px",
|
|
72
|
+
width: "100%",
|
|
73
|
+
display: "flex",
|
|
74
|
+
justifyContent: "center"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
(_a2 = item == null ? void 0 : item.elements) == null ? void 0 : _a2.map((element) => {
|
|
78
|
+
const { key, label, type, text, name } = element;
|
|
79
|
+
if (type === "button") {
|
|
80
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
81
|
+
import_antd.Button,
|
|
82
|
+
{
|
|
83
|
+
key: key + label,
|
|
84
|
+
block: true,
|
|
85
|
+
className: "pisell-lowcode__eft-pay-step-item-btn",
|
|
86
|
+
onClick: () => {
|
|
87
|
+
var _a3;
|
|
88
|
+
return (_a3 = props == null ? void 0 : props.onClick) == null ? void 0 : _a3.call(props, element, { inputValues });
|
|
89
|
+
},
|
|
90
|
+
disabled: key === import_types.EButtonKeyType.CancelTransaction ? cancelDisabled : false
|
|
91
|
+
},
|
|
92
|
+
element.label
|
|
93
|
+
);
|
|
94
|
+
} else if (type === "text") {
|
|
95
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
96
|
+
"div",
|
|
97
|
+
{
|
|
98
|
+
key: key + label,
|
|
99
|
+
className: "pisell-lowcode__eft-pay-step-item-tip"
|
|
100
|
+
},
|
|
101
|
+
label ? `${label}: ` : "",
|
|
102
|
+
text || ""
|
|
103
|
+
);
|
|
104
|
+
} else if (type === "image") {
|
|
105
|
+
const { name: name2, data: data2, encoding } = (element == null ? void 0 : element.image) || {};
|
|
106
|
+
const imageUrl = data2 ? `data:${name2 || "image/png"};${encoding || "base64"},${data2}` : "";
|
|
107
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
108
|
+
"div",
|
|
109
|
+
{
|
|
110
|
+
style: {
|
|
111
|
+
width: "100%",
|
|
112
|
+
display: "flex",
|
|
113
|
+
justifyContent: "center"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
/* @__PURE__ */ import_react.default.createElement("img", { key: key + label, src: imageUrl, alt: label })
|
|
117
|
+
);
|
|
118
|
+
} else if (type === "input") {
|
|
119
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
120
|
+
"div",
|
|
121
|
+
{
|
|
122
|
+
style: {
|
|
123
|
+
width: "100%",
|
|
124
|
+
display: "flex",
|
|
125
|
+
alignItems: "center",
|
|
126
|
+
flexWrap: "wrap"
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
/* @__PURE__ */ import_react.default.createElement("span", { style: { marginRight: "10px" } }, `${label ? `${label} ` : ""}`),
|
|
130
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
131
|
+
import_antd.Input,
|
|
132
|
+
{
|
|
133
|
+
key: key + label,
|
|
134
|
+
alt: label,
|
|
135
|
+
style: { flex: 1, minWidth: "200px" },
|
|
136
|
+
value: inputValues[name] || "",
|
|
137
|
+
onChange: (e) => handleInputChange(name, e.target.value)
|
|
138
|
+
}
|
|
139
|
+
)
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
return null;
|
|
143
|
+
})
|
|
144
|
+
);
|
|
145
|
+
})), (data == null ? void 0 : data.detailsText) && /* @__PURE__ */ import_react.default.createElement(
|
|
146
|
+
"div",
|
|
147
|
+
{
|
|
148
|
+
className: "pisell-lowcode__eft-pay-step-item pisell-lowcode__eft-pay-step-item-tip",
|
|
149
|
+
style: { marginTop: "24px" }
|
|
150
|
+
},
|
|
151
|
+
data == null ? void 0 : data.detailsText
|
|
152
|
+
));
|
|
153
|
+
};
|
|
154
|
+
var Action_default = Action;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/eftposPay/mx51/const.ts
|
|
20
|
+
var const_exports = {};
|
|
21
|
+
__export(const_exports, {
|
|
22
|
+
default: () => const_default,
|
|
23
|
+
getStep: () => getStep
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(const_exports);
|
|
26
|
+
var import_utils = require("@pisell/utils");
|
|
27
|
+
var import_const = require("../const");
|
|
28
|
+
var getStep = (mode = import_const.ModeEnum.Pay) => [
|
|
29
|
+
{
|
|
30
|
+
key: Date.now(),
|
|
31
|
+
title: import_utils.locales.getText("page.eftpos-pay.text.loading")(mode),
|
|
32
|
+
// 'Payment in process...',
|
|
33
|
+
text: import_utils.locales.getText("page.eftpos-pay.text.waiting.processing"),
|
|
34
|
+
// 'Waiting for the processing...',
|
|
35
|
+
warn: "",
|
|
36
|
+
tip: import_utils.locales.getText("page.eftpos-pay.text.processing"),
|
|
37
|
+
// 'processing...',
|
|
38
|
+
status: import_const.StatusEnum.Loading
|
|
39
|
+
}
|
|
40
|
+
];
|
|
41
|
+
var const_default = (params) => {
|
|
42
|
+
const {
|
|
43
|
+
order_id,
|
|
44
|
+
name,
|
|
45
|
+
symbol,
|
|
46
|
+
amount,
|
|
47
|
+
mode,
|
|
48
|
+
number,
|
|
49
|
+
pay,
|
|
50
|
+
device,
|
|
51
|
+
net,
|
|
52
|
+
client,
|
|
53
|
+
...other
|
|
54
|
+
} = params || {
|
|
55
|
+
mode: import_const.ModeEnum.Pay
|
|
56
|
+
};
|
|
57
|
+
console.log("params =>>>>>> ", params);
|
|
58
|
+
return {
|
|
59
|
+
order_id,
|
|
60
|
+
name,
|
|
61
|
+
symbol,
|
|
62
|
+
amount,
|
|
63
|
+
mode,
|
|
64
|
+
eftpos: import_const.EftposEnum.MX51,
|
|
65
|
+
key: Date.now(),
|
|
66
|
+
step: 0,
|
|
67
|
+
type: import_const.PayRouteEnum.Step,
|
|
68
|
+
title: import_utils.locales.getText("page.eftpos-pay.text.loading")(mode),
|
|
69
|
+
component: "",
|
|
70
|
+
status: import_const.StatusEnum.Loading,
|
|
71
|
+
steps: getStep(mode),
|
|
72
|
+
render: true,
|
|
73
|
+
client: client !== "undefined" ? client : import_const.ClientEnum.Merchant,
|
|
74
|
+
warn: "",
|
|
75
|
+
custom: other || {},
|
|
76
|
+
...typeof net !== "undefined" ? { net } : {},
|
|
77
|
+
...typeof number !== "undefined" ? { number } : {},
|
|
78
|
+
...typeof pay !== "undefined" ? { pay } : {},
|
|
79
|
+
...typeof device !== "undefined" ? { device } : {}
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
83
|
+
0 && (module.exports = {
|
|
84
|
+
getStep
|
|
85
|
+
});
|