@pisell/pisellos 0.0.282 → 0.0.284
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.
|
@@ -1129,30 +1129,29 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1129
1129
|
_context15.next = 38;
|
|
1130
1130
|
return this.handleError(new Error("EFTPOS \u652F\u4ED8\u540E\u8BA2\u5355\u540C\u6B65\u5931\u8D25: ".concat(_context15.t0 instanceof Error ? _context15.t0.message : String(_context15.t0))), CheckoutErrorType.OrderCreationFailed);
|
|
1131
1131
|
case 38:
|
|
1132
|
-
|
|
1133
|
-
|
|
1132
|
+
// 触发支付项添加事件(可以复用支付开始事件)
|
|
1133
|
+
this.core.effects.emit(CheckoutHooks.OnPaymentItemAdded, {
|
|
1134
1134
|
orderUuid: this.store.currentOrder.uuid,
|
|
1135
1135
|
paymentMethodCode: paymentItem.code,
|
|
1136
1136
|
paymentMethodName: paymentItem.name,
|
|
1137
1137
|
amount: String(paymentItem.amount),
|
|
1138
1138
|
timestamp: Date.now()
|
|
1139
1139
|
});
|
|
1140
|
-
|
|
1141
|
-
_context15.next = 48;
|
|
1140
|
+
_context15.next = 47;
|
|
1142
1141
|
break;
|
|
1143
|
-
case
|
|
1144
|
-
_context15.prev =
|
|
1142
|
+
case 41:
|
|
1143
|
+
_context15.prev = 41;
|
|
1145
1144
|
_context15.t1 = _context15["catch"](1);
|
|
1146
1145
|
this.logError('添加支付项失败:', _context15.t1);
|
|
1147
|
-
_context15.next =
|
|
1146
|
+
_context15.next = 46;
|
|
1148
1147
|
return this.handleError(_context15.t1, CheckoutErrorType.PaymentFailed);
|
|
1149
|
-
case
|
|
1148
|
+
case 46:
|
|
1150
1149
|
throw _context15.t1;
|
|
1151
|
-
case
|
|
1150
|
+
case 47:
|
|
1152
1151
|
case "end":
|
|
1153
1152
|
return _context15.stop();
|
|
1154
1153
|
}
|
|
1155
|
-
}, _callee15, this, [[1,
|
|
1154
|
+
}, _callee15, this, [[1, 41], [26, 33]]);
|
|
1156
1155
|
}));
|
|
1157
1156
|
function addPaymentItemAsync(_x14) {
|
|
1158
1157
|
return _addPaymentItemAsync.apply(this, arguments);
|
|
@@ -687,7 +687,7 @@ var CheckoutImpl = class extends import_BaseModule.BaseModule {
|
|
|
687
687
|
}
|
|
688
688
|
}
|
|
689
689
|
}
|
|
690
|
-
|
|
690
|
+
this.core.effects.emit(import_types.CheckoutHooks.OnPaymentItemAdded, {
|
|
691
691
|
orderUuid: this.store.currentOrder.uuid,
|
|
692
692
|
paymentMethodCode: paymentItem.code,
|
|
693
693
|
paymentMethodName: paymentItem.name,
|