@alipay/ams-checkout 0.0.1701393225-dev.15 → 0.0.1701393225-dev.16
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.
@@ -53,6 +53,7 @@ var ApplePayComponent = /*#__PURE__*/function (_CoreInstance) {
|
|
53
53
|
_defineProperty(_assertThisInitialized(_this), "_applePayService", void 0);
|
54
54
|
_defineProperty(_assertThisInitialized(_this), "_parseData", void 0);
|
55
55
|
_defineProperty(_assertThisInitialized(_this), "_sessionData", void 0);
|
56
|
+
_defineProperty(_assertThisInitialized(_this), "_isFinish", false);
|
56
57
|
_this._applePayService = new ApplePayService();
|
57
58
|
return _this;
|
58
59
|
}
|
@@ -146,6 +147,7 @@ var ApplePayComponent = /*#__PURE__*/function (_CoreInstance) {
|
|
146
147
|
key: "submitPay",
|
147
148
|
value: function submitPay(paymentSessionData) {
|
148
149
|
var _this3 = this;
|
150
|
+
this._isFinish = false;
|
149
151
|
// parse session Data
|
150
152
|
var _parseSessionData = parseSessionData(paymentSessionData),
|
151
153
|
_parseSessionData2 = _slicedToArray(_parseSessionData, 2),
|
@@ -307,6 +309,7 @@ var ApplePayComponent = /*#__PURE__*/function (_CoreInstance) {
|
|
307
309
|
}();
|
308
310
|
var completeApplePay = function completeApplePay(data) {
|
309
311
|
var _data$actionForm;
|
312
|
+
_this3._isFinish = true;
|
310
313
|
_this3._eventCenter.emit(EVENT.eventCallback.name, {
|
311
314
|
code: eventCodeEnum.SDK_PAYMENT_FINISH,
|
312
315
|
result: {
|
@@ -325,6 +328,10 @@ var ApplePayComponent = /*#__PURE__*/function (_CoreInstance) {
|
|
325
328
|
type: 'error',
|
326
329
|
biz: 'sdk'
|
327
330
|
}).send();
|
331
|
+
if (_this3._isFinish) {
|
332
|
+
return;
|
333
|
+
}
|
334
|
+
_this3._isFinish = true;
|
328
335
|
if (msg === 'UserCancel') {
|
329
336
|
_this3._eventCenter.emit(EVENT.eventCallback.name, {
|
330
337
|
code: eventCodeEnum.SDK_PAYMENT_CANCEL
|