@pisell/private-materials 6.8.76 → 6.8.77

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 (124) 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 +7 -7
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +9 -9
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +8 -8
  11. package/es/components/checkout/PaymentModal.js +32 -8
  12. package/es/components/checkout/components/PaymentOptionsModule/index.js +1 -1
  13. package/es/components/eftposPay/amount.d.ts +1 -1
  14. package/es/components/eftposPay/app.d.ts +1 -1
  15. package/es/components/eftposPay/app.js +0 -5
  16. package/es/components/eftposPay/component/fail/failCustom.js +12 -16
  17. package/es/components/eftposPay/component/fail/index.js +5 -12
  18. package/es/components/eftposPay/const.d.ts +1 -6
  19. package/es/components/eftposPay/const.js +0 -3
  20. package/es/components/eftposPay/device.d.ts +1 -1
  21. package/es/components/eftposPay/hooks.d.ts +2 -3
  22. package/es/components/eftposPay/hooks.js +0 -12
  23. package/es/components/eftposPay/index.js +1 -5
  24. package/es/components/eftposPay/locales.d.ts +0 -36
  25. package/es/components/eftposPay/locales.js +3 -42
  26. package/es/components/eftposPay/manufacturer.d.ts +0 -1
  27. package/es/components/eftposPay/manufacturer.js +0 -5
  28. package/es/components/eftposPay/pay.js +2 -6
  29. package/es/components/eftposPay/store/index.d.ts +5 -12
  30. package/es/components/kioskSkuDetail/index.d.ts +0 -3
  31. package/es/components/kioskSkuDetail/index.js +173 -266
  32. package/es/components/kioskSkuDetail/index.less +7 -49
  33. package/es/components/kioskSkuDetail/locales.d.ts +0 -6
  34. package/es/components/kioskSkuDetail/locales.js +3 -9
  35. package/es/components/pay/toB/components/EFTPOS/index.js +1 -8
  36. package/es/components/pay/toB/types/index.d.ts +0 -1
  37. package/es/components/pay/toC/PaymentList/serve.js +0 -14
  38. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +6 -7
  39. package/es/plus/skuOptionsSelection/components/VariantCard/index.js +1 -1
  40. package/es/plus/skuOptionsSelection/locales.d.ts +0 -3
  41. package/es/plus/skuOptionsSelection/locales.js +0 -3
  42. package/es/pro/Login2.0/components/LoginCodeInput.js +3 -36
  43. package/es/pro/Login2.0/steps/CodeInput.js +7 -37
  44. package/lib/components/checkout/PaymentModal.js +41 -24
  45. package/lib/components/checkout/components/PaymentOptionsModule/index.js +1 -2
  46. package/lib/components/eftposPay/amount.d.ts +1 -1
  47. package/lib/components/eftposPay/app.d.ts +1 -1
  48. package/lib/components/eftposPay/app.js +0 -5
  49. package/lib/components/eftposPay/component/fail/failCustom.js +9 -15
  50. package/lib/components/eftposPay/component/fail/index.js +1 -4
  51. package/lib/components/eftposPay/const.d.ts +1 -6
  52. package/lib/components/eftposPay/const.js +0 -3
  53. package/lib/components/eftposPay/device.d.ts +1 -1
  54. package/lib/components/eftposPay/hooks.d.ts +2 -3
  55. package/lib/components/eftposPay/hooks.js +0 -16
  56. package/lib/components/eftposPay/index.js +1 -5
  57. package/lib/components/eftposPay/locales.d.ts +0 -36
  58. package/lib/components/eftposPay/locales.js +3 -42
  59. package/lib/components/eftposPay/manufacturer.d.ts +0 -1
  60. package/lib/components/eftposPay/manufacturer.js +0 -7
  61. package/lib/components/eftposPay/pay.js +2 -3
  62. package/lib/components/eftposPay/store/index.d.ts +5 -12
  63. package/lib/components/kioskSkuDetail/index.d.ts +0 -3
  64. package/lib/components/kioskSkuDetail/index.js +113 -180
  65. package/lib/components/kioskSkuDetail/index.less +7 -49
  66. package/lib/components/kioskSkuDetail/locales.d.ts +0 -6
  67. package/lib/components/kioskSkuDetail/locales.js +3 -9
  68. package/lib/components/pay/toB/components/EFTPOS/index.js +1 -8
  69. package/lib/components/pay/toB/types/index.d.ts +0 -1
  70. package/lib/components/pay/toC/PaymentList/serve.js +0 -15
  71. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +6 -7
  72. package/lib/plus/skuOptionsSelection/components/VariantCard/index.js +0 -2
  73. package/lib/plus/skuOptionsSelection/locales.d.ts +0 -3
  74. package/lib/plus/skuOptionsSelection/locales.js +0 -3
  75. package/lib/pro/Login2.0/components/LoginCodeInput.js +4 -26
  76. package/lib/pro/Login2.0/steps/CodeInput.js +5 -27
  77. package/lowcode/kiosk-sku-detail/meta.ts +94 -229
  78. package/package.json +8 -2
  79. package/es/components/eftposPay/aggregatePayment/hooks/useMicropay.d.ts +0 -7
  80. package/es/components/eftposPay/aggregatePayment/hooks/useMicropay.js +0 -120
  81. package/es/components/eftposPay/aggregatePayment/index.d.ts +0 -3
  82. package/es/components/eftposPay/aggregatePayment/index.js +0 -3
  83. package/es/components/eftposPay/aggregatePayment/service.d.ts +0 -24
  84. package/es/components/eftposPay/aggregatePayment/service.js +0 -69
  85. package/es/components/eftposPay/aggregatePayment/types.d.ts +0 -106
  86. package/es/components/eftposPay/aggregatePayment/types.js +0 -65
  87. package/es/components/eftposPay/aggregatePayment/utils/logs.d.ts +0 -110
  88. package/es/components/eftposPay/aggregatePayment/utils/logs.js +0 -371
  89. package/es/components/eftposPay/aggregatePayment/utils/payment.d.ts +0 -139
  90. package/es/components/eftposPay/aggregatePayment/utils/payment.js +0 -1138
  91. package/es/components/eftposPay/huifu/Action.d.ts +0 -8
  92. package/es/components/eftposPay/huifu/Action.js +0 -146
  93. package/es/components/eftposPay/huifu/const.d.ts +0 -5
  94. package/es/components/eftposPay/huifu/const.js +0 -70
  95. package/es/components/eftposPay/huifu/hooks.d.ts +0 -25
  96. package/es/components/eftposPay/huifu/hooks.js +0 -184
  97. package/es/components/eftposPay/huifu/index.d.ts +0 -5
  98. package/es/components/eftposPay/huifu/index.js +0 -196
  99. package/es/components/eftposPay/huifu/index.less +0 -180
  100. package/es/components/eftposPay/huifu/types.d.ts +0 -14
  101. package/es/components/eftposPay/huifu/types.js +0 -1
  102. package/lib/components/eftposPay/aggregatePayment/hooks/useMicropay.d.ts +0 -7
  103. package/lib/components/eftposPay/aggregatePayment/hooks/useMicropay.js +0 -133
  104. package/lib/components/eftposPay/aggregatePayment/index.d.ts +0 -3
  105. package/lib/components/eftposPay/aggregatePayment/index.js +0 -42
  106. package/lib/components/eftposPay/aggregatePayment/service.d.ts +0 -24
  107. package/lib/components/eftposPay/aggregatePayment/service.js +0 -81
  108. package/lib/components/eftposPay/aggregatePayment/types.d.ts +0 -106
  109. package/lib/components/eftposPay/aggregatePayment/types.js +0 -74
  110. package/lib/components/eftposPay/aggregatePayment/utils/logs.d.ts +0 -110
  111. package/lib/components/eftposPay/aggregatePayment/utils/logs.js +0 -294
  112. package/lib/components/eftposPay/aggregatePayment/utils/payment.d.ts +0 -139
  113. package/lib/components/eftposPay/aggregatePayment/utils/payment.js +0 -752
  114. package/lib/components/eftposPay/huifu/Action.d.ts +0 -8
  115. package/lib/components/eftposPay/huifu/Action.js +0 -174
  116. package/lib/components/eftposPay/huifu/const.d.ts +0 -5
  117. package/lib/components/eftposPay/huifu/const.js +0 -86
  118. package/lib/components/eftposPay/huifu/hooks.d.ts +0 -25
  119. package/lib/components/eftposPay/huifu/hooks.js +0 -186
  120. package/lib/components/eftposPay/huifu/index.d.ts +0 -5
  121. package/lib/components/eftposPay/huifu/index.js +0 -200
  122. package/lib/components/eftposPay/huifu/index.less +0 -180
  123. package/lib/components/eftposPay/huifu/types.d.ts +0 -14
  124. package/lib/components/eftposPay/huifu/types.js +0 -17
@@ -1,180 +0,0 @@
1
- .pisell-eftpos-pay-huifu {
2
- &-scan {
3
- height: 100%;
4
- display: flex;
5
- flex-direction: column;
6
-
7
- &-status {
8
- position: relative;
9
-
10
- &-wrapper {
11
- position: absolute;
12
- left: -4px;
13
- bottom: 4px;
14
- width: 14px;
15
- height: 14px;
16
- }
17
- }
18
-
19
- &-header {
20
- position: relative;
21
- padding-bottom: 20px;
22
- display: flex;
23
- align-items: center;
24
-
25
- &-close {
26
- position: absolute;
27
- right: -10px;
28
- padding: 10px;
29
- cursor: pointer;
30
- }
31
-
32
- &-divider {
33
- position: absolute;
34
- bottom: 0;
35
- left: -24px;
36
- right: -24px;
37
- height: 1px;
38
- background: #eaecf0;
39
- }
40
-
41
- &-title {
42
- color: #101828;
43
- font-size: 18px;
44
- font-weight: 600;
45
- }
46
- }
47
-
48
- &-content {
49
- padding-bottom: 24px;
50
- flex: 1;
51
- display: flex;
52
- flex-direction: column;
53
- gap: 20px;
54
-
55
- &-title {
56
- color: #344054;
57
- font-size: 14px;
58
- font-weight: 600;
59
- }
60
-
61
- &-scanner {
62
- padding: 16px;
63
- display: flex;
64
- align-items: center;
65
- gap: 16px;
66
- border-radius: 12px;
67
-
68
- &-right {
69
- flex: 1;
70
- display: flex;
71
- flex-direction: column;
72
- gap: 4px;
73
- }
74
- }
75
-
76
- &-scanner-active {
77
- border: 1px solid #75e0a7;
78
- background: #f6fef9;
79
- box-shadow: 0 1px 2px 0 rgba(16, 24, 40, 0.05);
80
-
81
- &-title {
82
- color: #067647;
83
- font-size: 14px;
84
- font-weight: 600;
85
- }
86
-
87
- &-desc {
88
- color: #067647;
89
- font-size: 14px;
90
- font-weight: 400;
91
- }
92
- }
93
-
94
- &-scanner-unactive {
95
- border: 1px solid #fda29b;
96
- background: #fffbfa;
97
- box-shadow: 0 1px 2px 0 rgba(16, 24, 40, 0.05);
98
-
99
- &-title {
100
- color: #b42318;
101
- font-size: 14px;
102
- font-weight: 600;
103
- }
104
-
105
- &-desc {
106
- color: #b42318;
107
- font-size: 14px;
108
- font-weight: 400;
109
- }
110
- }
111
-
112
- &-camera {
113
- padding: 16px;
114
- display: flex;
115
- align-items: center;
116
- gap: 8px;
117
- border-radius: 12px;
118
- background: #f2f4f7;
119
- cursor: pointer;
120
-
121
- &-right {
122
- flex: 1;
123
- display: flex;
124
- flex-direction: column;
125
- gap: 6px;
126
- }
127
-
128
- &-title {
129
- color: #175cd3;
130
- font-size: 14px;
131
- font-weight: 500;
132
- }
133
-
134
- &-desc {
135
- color: #000;
136
- font-size: 14px;
137
- font-weight: 400;
138
- }
139
- }
140
-
141
- &-input-wrapper {
142
- display: flex;
143
- flex-direction: column;
144
- gap: 8px;
145
-
146
- &-title {
147
- color: #344054;
148
- font-size: 14px;
149
- font-weight: 600;
150
- }
151
-
152
- &-tip {
153
- color: #475467;
154
- font-size: 14px;
155
- font-weight: 400;
156
- }
157
- }
158
- }
159
-
160
- &-footer {
161
- position: relative;
162
- padding-top: 24px;
163
- display: flex;
164
- gap: 12px;
165
-
166
- &-divider {
167
- position: absolute;
168
- top: 0;
169
- left: -24px;
170
- right: -24px;
171
- height: 1px;
172
- background: #eaecf0;
173
- }
174
-
175
- &-button {
176
- height: 48px;
177
- }
178
- }
179
- }
180
- }
@@ -1,14 +0,0 @@
1
- export declare type Peripherals = {
2
- scanner: 'none' | 'connected' | 'disconnect';
3
- nfc: 'none' | 'connected' | 'disconnect';
4
- };
5
- export interface HuifuProps {
6
- isNativeApp?: boolean;
7
- onChange: (status: any, params: any) => void;
8
- }
9
- export interface HuifuActionProps {
10
- isNativeApp?: boolean;
11
- onClose: () => void;
12
- onPayClick: (scanResult: string) => void;
13
- onScanCallback: (scanResult: string) => void;
14
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,7 +0,0 @@
1
- import { HooksRunParams, PaymentMethodOptions } from '../types';
2
- declare const useMicropay: (options: PaymentMethodOptions) => {
3
- run: (runParams?: HooksRunParams) => void;
4
- query: () => void;
5
- action: (data: Record<string, any>) => void;
6
- };
7
- export default useMicropay;
@@ -1,133 +0,0 @@
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/aggregatePayment/hooks/useMicropay.ts
30
- var useMicropay_exports = {};
31
- __export(useMicropay_exports, {
32
- default: () => useMicropay_default
33
- });
34
- module.exports = __toCommonJS(useMicropay_exports);
35
- var import_react = require("react");
36
- var import_payment = __toESM(require("../utils/payment"));
37
- var import_const = require("../../const");
38
- var import_hooks = require("../../hooks");
39
- var import_helper = require("../../helper");
40
- var import_store = require("../../store");
41
- var import_store2 = require("../../store");
42
- var useMicropay = (options) => {
43
- const { custom } = (0, import_store2.useContextData)();
44
- const { modeRef, payRef, orderIdRef, eftposRef, deviceRef, amountRef } = (0, import_hooks.useStoreRef)();
45
- const paymentMethodRef = (0, import_react.useRef)(null);
46
- const dispatch = (0, import_store.useDispatch)();
47
- const uniquePaymentNumberRef = (0, import_react.useRef)(null);
48
- const isPay = modeRef.current === import_const.ModeEnum.Pay || modeRef.current === import_const.ModeEnum.FullPay;
49
- (0, import_react.useEffect)(() => {
50
- var _a;
51
- if (!paymentMethodRef.current) {
52
- if (!options.paymentNum) {
53
- const paymentNum = (0, import_helper.getUuid)();
54
- dispatch((0, import_store.updateState)({ number: paymentNum }));
55
- options.paymentNum = paymentNum;
56
- uniquePaymentNumberRef.current = paymentNum;
57
- } else {
58
- uniquePaymentNumberRef.current = options.paymentNum;
59
- }
60
- options.orderId = orderIdRef.current;
61
- options.deviceId = (_a = deviceRef.current) == null ? void 0 : _a.id;
62
- paymentMethodRef.current = new import_payment.default(options);
63
- }
64
- return () => {
65
- var _a2, _b;
66
- (_b = (_a2 = paymentMethodRef.current) == null ? void 0 : _a2.destroy) == null ? void 0 : _b.call(_a2);
67
- paymentMethodRef.current = null;
68
- };
69
- }, []);
70
- const run = (runParams) => {
71
- var _a, _b, _c, _d, _e, _f, _g;
72
- const params = {
73
- order_id: orderIdRef.current,
74
- unique_payment_number: uniquePaymentNumberRef.current,
75
- payment_code: options.paymentCode,
76
- amount: isPay ? (_a = payRef.current) == null ? void 0 : _a.total : amountRef.current,
77
- operator_id: custom == null ? void 0 : custom.operator_id,
78
- operator_type: custom == null ? void 0 : custom.operator_type,
79
- platform: custom == null ? void 0 : custom.platform,
80
- micropay: {
81
- card_reader_type: eftposRef.current,
82
- card_reader_id: (_b = deviceRef.current) == null ? void 0 : _b.id
83
- }
84
- };
85
- if (isPay) {
86
- params.payment = {
87
- original_amount: (_c = payRef.current) == null ? void 0 : _c.amount,
88
- order_payment_type: "normal",
89
- // TODO: 需要使用方提供
90
- custom_payment_id: custom == null ? void 0 : custom.custom_payment_id,
91
- custom_payment_code: custom == null ? void 0 : custom.custom_payment_code,
92
- custom_payment_name: custom == null ? void 0 : custom.custom_payment_name,
93
- custom_payment_type: custom == null ? void 0 : custom.custom_payment_type,
94
- service_charge: {
95
- amount: (_d = payRef.current) == null ? void 0 : _d.surMoney,
96
- percentage: (_e = payRef.current) == null ? void 0 : _e.surPercentRate
97
- },
98
- metadata: {
99
- unique_payment_number: uniquePaymentNumberRef.current
100
- }
101
- };
102
- params.micropay.auth_code = (runParams == null ? void 0 : runParams.authCode) || "";
103
- (_f = paymentMethodRef.current) == null ? void 0 : _f.pay(params);
104
- } else {
105
- params.micropay.order_payment_id = (runParams == null ? void 0 : runParams.orderPaymentId) || "";
106
- (_g = paymentMethodRef.current) == null ? void 0 : _g.refund(params);
107
- }
108
- };
109
- const query = () => {
110
- var _a, _b;
111
- if (isPay) {
112
- (_a = paymentMethodRef.current) == null ? void 0 : _a.payQuery();
113
- } else {
114
- (_b = paymentMethodRef.current) == null ? void 0 : _b.refundQuery();
115
- }
116
- };
117
- const action = (data) => {
118
- var _a, _b;
119
- const params = {
120
- order_id: orderIdRef.current,
121
- unique_payment_number: uniquePaymentNumberRef.current,
122
- payment_code: options.paymentCode,
123
- data
124
- };
125
- if (isPay) {
126
- (_a = paymentMethodRef.current) == null ? void 0 : _a.payAction(params);
127
- } else {
128
- (_b = paymentMethodRef.current) == null ? void 0 : _b.refundAction(params);
129
- }
130
- };
131
- return { run, query, action };
132
- };
133
- var useMicropay_default = useMicropay;
@@ -1,3 +0,0 @@
1
- import { EActionStatus } from './types';
2
- import useMicropay from './hooks/useMicropay';
3
- export { useMicropay, EActionStatus };
@@ -1,42 +0,0 @@
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/aggregatePayment/index.ts
30
- var aggregatePayment_exports = {};
31
- __export(aggregatePayment_exports, {
32
- EActionStatus: () => import_types.EActionStatus,
33
- useMicropay: () => import_useMicropay.default
34
- });
35
- module.exports = __toCommonJS(aggregatePayment_exports);
36
- var import_types = require("./types");
37
- var import_useMicropay = __toESM(require("./hooks/useMicropay"));
38
- // Annotate the CommonJS export names for ESM import in node:
39
- 0 && (module.exports = {
40
- EActionStatus,
41
- useMicropay
42
- });
@@ -1,24 +0,0 @@
1
- /**
2
- * 聚合支付-支付接口
3
- */
4
- export declare const AGPTPayApi: (data: any, config: any) => Promise<any>;
5
- /**
6
- * 聚合支付-支付-查询接口
7
- */
8
- export declare const AGPTQueryApi: (param: any, config: any) => Promise<any>;
9
- /**
10
- * 聚合支付-支付-支付行为接口
11
- */
12
- export declare const AGPTActionApi: (param: any, config: any) => Promise<any>;
13
- /**
14
- * 聚合支付-退款接口
15
- */
16
- export declare const AGPTRefundApi: (data: any, config: any) => Promise<any>;
17
- /**
18
- * 聚合支付-退款-查询接口
19
- */
20
- export declare const AGPTRefundQueryApi: (param: any, config: any) => Promise<any>;
21
- /**
22
- * 聚合支付-退款-支付行为接口
23
- */
24
- export declare const AGPTRefundActionApi: (param: any, config: any) => Promise<any>;
@@ -1,81 +0,0 @@
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/aggregatePayment/service.ts
20
- var service_exports = {};
21
- __export(service_exports, {
22
- AGPTActionApi: () => AGPTActionApi,
23
- AGPTPayApi: () => AGPTPayApi,
24
- AGPTQueryApi: () => AGPTQueryApi,
25
- AGPTRefundActionApi: () => AGPTRefundActionApi,
26
- AGPTRefundApi: () => AGPTRefundApi,
27
- AGPTRefundQueryApi: () => AGPTRefundQueryApi
28
- });
29
- module.exports = __toCommonJS(service_exports);
30
- var import_utils = require("../../../utils");
31
- var AGPTPayApi = (data, config) => {
32
- return import_utils.request.getRequest().post("/shop/pay/external-unified/pay", data, {
33
- ...config || {},
34
- customMessage: true,
35
- fullResult: true
36
- });
37
- };
38
- var AGPTQueryApi = (param, config) => {
39
- return import_utils.request.getRequest().post("/shop/pay/external-unified/pay/verify", param, {
40
- ...config || {},
41
- customMessage: true,
42
- fullResult: true
43
- });
44
- };
45
- var AGPTActionApi = (param, config) => {
46
- return import_utils.request.getRequest().post("/shop/pay/external-unified/pay/action", param, {
47
- ...config || {},
48
- customMessage: true,
49
- fullResult: true
50
- });
51
- };
52
- var AGPTRefundApi = (data, config) => {
53
- return import_utils.request.getRequest().post("/shop/pay/external-unified/refund", data, {
54
- ...config || {},
55
- customMessage: true,
56
- fullResult: true
57
- });
58
- };
59
- var AGPTRefundQueryApi = (param, config) => {
60
- return import_utils.request.getRequest().post("/shop/pay/external-unified/refund/verify", param, {
61
- ...config || {},
62
- customMessage: true,
63
- fullResult: true
64
- });
65
- };
66
- var AGPTRefundActionApi = (param, config) => {
67
- return import_utils.request.getRequest().post("/shop/pay/external-unified/refund/action", param, {
68
- ...config || {},
69
- customMessage: true,
70
- fullResult: true
71
- });
72
- };
73
- // Annotate the CommonJS export names for ESM import in node:
74
- 0 && (module.exports = {
75
- AGPTActionApi,
76
- AGPTPayApi,
77
- AGPTQueryApi,
78
- AGPTRefundActionApi,
79
- AGPTRefundApi,
80
- AGPTRefundQueryApi
81
- });
@@ -1,106 +0,0 @@
1
- import PaymentMethod from './utils/payment';
2
- export declare enum EVisibleButtonType {
3
- /** 取消按钮 */
4
- CancelButton = "CancelButton",
5
- /** 等待按钮 */
6
- WaitButton = "WaitButton"
7
- }
8
- export declare enum EActionStatus {
9
- /** 空 */
10
- Empty = "Empty",
11
- /** 取消 */
12
- Cancel = "Cancel",
13
- /** 取消中 */
14
- CancelWaiting = "CancelWaiting",
15
- /** 签名 */
16
- Signature = "Signature",
17
- /** 签名等待中 */
18
- SignatureWaiting = "SignatureWaiting"
19
- }
20
- export declare const QUERY_START_DELAY: number;
21
- export declare const GLOBAL_TIMEOUT: number;
22
- export declare const REQUEST_TIMEOUT: number;
23
- export declare const QUERY_INTERVAL: number;
24
- /**
25
- * 聚合支付初始化参数
26
- */
27
- export interface PaymentMethodOptions {
28
- /** 支付类型 */
29
- paymentCode: string;
30
- /** 交易号 */
31
- paymentNum: string;
32
- /** 订单ID */
33
- orderId?: string | number;
34
- /** 设备ID */
35
- deviceId?: string | number;
36
- /** 统一回调函数 */
37
- callback: PaymentCallback;
38
- /** 检查是否应该继续处理结果 */
39
- shouldContinue?: () => boolean;
40
- /** 配置 */
41
- config?: PaymentMethodConfig;
42
- }
43
- /**
44
- * 聚合支付操作类型
45
- */
46
- export declare enum ActionType {
47
- /** 支付 */
48
- Pay = "pay",
49
- /** 支付查询 */
50
- PayQuery = "payQuery",
51
- /** 支付行为 */
52
- PayAction = "payAction",
53
- /** 退款 */
54
- Refund = "refund",
55
- /** 退款查询 */
56
- RefundQuery = "refundQuery",
57
- /** 退款行为 */
58
- RefundAction = "refundAction"
59
- }
60
- /** 回调事件 */
61
- export interface CallbackEvent {
62
- /** 事件类型:成功、失败、进度 */
63
- status: EPaymentStatus;
64
- /** 操作类型 */
65
- actionType: ActionType;
66
- /** 数据:成功时是结果,失败时是错误信息,进度时是进度数据 */
67
- data: any;
68
- }
69
- /** 统一回调函数 */
70
- export declare type PaymentCallback = (instance: PaymentMethod, event: CallbackEvent) => void;
71
- /**
72
- * 执行操作参数
73
- */
74
- export interface RunOptions {
75
- /** 操作类型 */
76
- actionType: ActionType;
77
- /** 请求参数 */
78
- params?: Record<string, any>;
79
- }
80
- /**
81
- * 聚合支付配置参数
82
- */
83
- export interface PaymentMethodConfig {
84
- /** 是否需要轮询间隔 */
85
- hasQueryInterval?: boolean;
86
- }
87
- /**
88
- * 支付状态
89
- */
90
- export declare enum EPaymentStatus {
91
- /** 支付中 */
92
- Processing = "processing",
93
- /** 支付成功 */
94
- Success = "success",
95
- /** 支付失败 */
96
- Failed = "failed"
97
- }
98
- /**
99
- * 执行操作参数
100
- */
101
- export interface HooksRunParams {
102
- /** 付款码 */
103
- authCode?: string | number;
104
- /** 订单支付ID */
105
- orderPaymentId?: string | number;
106
- }
@@ -1,74 +0,0 @@
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/aggregatePayment/types.ts
20
- var types_exports = {};
21
- __export(types_exports, {
22
- ActionType: () => ActionType,
23
- EActionStatus: () => EActionStatus,
24
- EPaymentStatus: () => EPaymentStatus,
25
- EVisibleButtonType: () => EVisibleButtonType,
26
- GLOBAL_TIMEOUT: () => GLOBAL_TIMEOUT,
27
- QUERY_INTERVAL: () => QUERY_INTERVAL,
28
- QUERY_START_DELAY: () => QUERY_START_DELAY,
29
- REQUEST_TIMEOUT: () => REQUEST_TIMEOUT
30
- });
31
- module.exports = __toCommonJS(types_exports);
32
- var EVisibleButtonType = /* @__PURE__ */ ((EVisibleButtonType2) => {
33
- EVisibleButtonType2["CancelButton"] = "CancelButton";
34
- EVisibleButtonType2["WaitButton"] = "WaitButton";
35
- return EVisibleButtonType2;
36
- })(EVisibleButtonType || {});
37
- var EActionStatus = /* @__PURE__ */ ((EActionStatus2) => {
38
- EActionStatus2["Empty"] = "Empty";
39
- EActionStatus2["Cancel"] = "Cancel";
40
- EActionStatus2["CancelWaiting"] = "CancelWaiting";
41
- EActionStatus2["Signature"] = "Signature";
42
- EActionStatus2["SignatureWaiting"] = "SignatureWaiting";
43
- return EActionStatus2;
44
- })(EActionStatus || {});
45
- var QUERY_START_DELAY = 1e3 * 10;
46
- var GLOBAL_TIMEOUT = 1e3 * 60 * 2;
47
- var REQUEST_TIMEOUT = 1e3 * 10;
48
- var QUERY_INTERVAL = 1e3 * 2;
49
- var ActionType = /* @__PURE__ */ ((ActionType2) => {
50
- ActionType2["Pay"] = "pay";
51
- ActionType2["PayQuery"] = "payQuery";
52
- ActionType2["PayAction"] = "payAction";
53
- ActionType2["Refund"] = "refund";
54
- ActionType2["RefundQuery"] = "refundQuery";
55
- ActionType2["RefundAction"] = "refundAction";
56
- return ActionType2;
57
- })(ActionType || {});
58
- var EPaymentStatus = /* @__PURE__ */ ((EPaymentStatus2) => {
59
- EPaymentStatus2["Processing"] = "processing";
60
- EPaymentStatus2["Success"] = "success";
61
- EPaymentStatus2["Failed"] = "failed";
62
- return EPaymentStatus2;
63
- })(EPaymentStatus || {});
64
- // Annotate the CommonJS export names for ESM import in node:
65
- 0 && (module.exports = {
66
- ActionType,
67
- EActionStatus,
68
- EPaymentStatus,
69
- EVisibleButtonType,
70
- GLOBAL_TIMEOUT,
71
- QUERY_INTERVAL,
72
- QUERY_START_DELAY,
73
- REQUEST_TIMEOUT
74
- });