@alipay/ams-checkout 0.0.1717141544-dev.5 → 0.0.1717141544-dev.7
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.
@@ -47,6 +47,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
47
47
|
_defineProperty(this, "_selector", void 0);
|
48
48
|
_defineProperty(this, "_appVersion", void 0);
|
49
49
|
_defineProperty(this, "_isRetention", void 0);
|
50
|
+
_defineProperty(this, "_allowSubmitPayCallAhead", void 0);
|
50
51
|
_defineProperty(this, "_actionQueryPromise", null);
|
51
52
|
_defineProperty(this, "_actionSubmitPromise", null);
|
52
53
|
_defineProperty(this, "_renderParams", null);
|
@@ -653,7 +654,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
653
654
|
this._actionSubmitPromise = new Promise( /*#__PURE__*/function () {
|
654
655
|
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(resolve) {
|
655
656
|
var _channelBehavior$buil, _this6$_renderParams$;
|
656
|
-
var shouldSkipSubmitPayInSDK, _this6$_renderParams, _this6$_renderParams2, _ref11, _ref11$productSceneVe, productSceneVersion, _ref11$productScene, productScene, _ref12, _ref12$action, _ref12$action2, _ref12$action2$enable, enableSignAgreement, extParams;
|
657
|
+
var shouldSkipSubmitPayInSDK, _this6$_renderParams, _this6$_renderParams2, _ref11, _ref11$productSceneVe, productSceneVersion, _ref11$productScene, productScene, _ref12, _ref12$action, _ref12$action2, _ref12$action2$enable, enableSignAgreement, _ref12$action2$autoDe, autoDebitWithToken, extParams;
|
657
658
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
658
659
|
while (1) switch (_context3.prev = _context3.next) {
|
659
660
|
case 0:
|
@@ -666,20 +667,23 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
666
667
|
}
|
667
668
|
if (componentSignEnum.EASY_PAY_WALLET === _this6._componentSign) {
|
668
669
|
_ref11 = params.paymentSessionConfig || {}, _ref11$productSceneVe = _ref11.productSceneVersion, productSceneVersion = _ref11$productSceneVe === void 0 ? '' : _ref11$productSceneVe, _ref11$productScene = _ref11.productScene, productScene = _ref11$productScene === void 0 ? '' : _ref11$productScene;
|
669
|
-
_ref12 = ((_this6$_renderParams2 = _this6._renderParams) === null || _this6$_renderParams2 === void 0 ? void 0 : _this6$_renderParams2.paymentSessionMetaData) || {}, _ref12$action = _ref12.action, _ref12$action2 = _ref12$action === void 0 ? {} : _ref12$action, _ref12$action2$enable = _ref12$action2.enableSignAgreement, enableSignAgreement = _ref12$action2$enable === void 0 ? false : _ref12$action2$enable;
|
670
|
-
if (productScene === productSceneEnum.EASY_PAY && productSceneVersion === '2.0') {
|
670
|
+
_ref12 = ((_this6$_renderParams2 = _this6._renderParams) === null || _this6$_renderParams2 === void 0 ? void 0 : _this6$_renderParams2.paymentSessionMetaData) || {}, _ref12$action = _ref12.action, _ref12$action2 = _ref12$action === void 0 ? {} : _ref12$action, _ref12$action2$enable = _ref12$action2.enableSignAgreement, enableSignAgreement = _ref12$action2$enable === void 0 ? false : _ref12$action2$enable, _ref12$action2$autoDe = _ref12$action2.autoDebitWithToken, autoDebitWithToken = _ref12$action2$autoDe === void 0 ? false : _ref12$action2$autoDe;
|
671
|
+
if (productScene === productSceneEnum.EASY_PAY && productSceneVersion === '2.0' && !autoDebitWithToken) {
|
672
|
+
///EasyPay 2.0 首次传signAgreement字段
|
671
673
|
params['signAgreement'] = enableSignAgreement;
|
672
674
|
}
|
673
675
|
}
|
676
|
+
// 带上标记告知WebCheckOut SDK已发送submitpay请求
|
677
|
+
_this6._allowSubmitPayCallAhead = !shouldSkipSubmitPayInSDK;
|
674
678
|
if (!shouldSkipSubmitPayInSDK) {
|
675
|
-
_context3.next =
|
679
|
+
_context3.next = 6;
|
676
680
|
break;
|
677
681
|
}
|
678
682
|
return _context3.abrupt("return", resolve({
|
679
683
|
message: 'sdk no need to make submitPay request',
|
680
684
|
success: true
|
681
685
|
}));
|
682
|
-
case
|
686
|
+
case 6:
|
683
687
|
_this6.AMSSDK.logger.logInfo({
|
684
688
|
title: 'sdk_event_submitPay'
|
685
689
|
}, {
|
@@ -698,9 +702,9 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
698
702
|
_context3.t0 = submitPayInfo;
|
699
703
|
_context3.t1 = params;
|
700
704
|
_context3.t2 = _this6.AMSSDK.options.env.environment;
|
701
|
-
_context3.next =
|
705
|
+
_context3.next = 14;
|
702
706
|
return _this6.getDeviceIdAndLog();
|
703
|
-
case
|
707
|
+
case 14:
|
704
708
|
_context3.t3 = _context3.sent;
|
705
709
|
_context3.t4 = {
|
706
710
|
deviceId: _context3.t3
|
@@ -734,7 +738,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
734
738
|
success: false
|
735
739
|
});
|
736
740
|
});
|
737
|
-
case
|
741
|
+
case 19:
|
738
742
|
case "end":
|
739
743
|
return _context3.stop();
|
740
744
|
}
|
@@ -1551,6 +1555,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
1551
1555
|
appearance: (_this$_renderParams18 = this._renderParams) === null || _this$_renderParams18 === void 0 ? void 0 : _this$_renderParams18.appearance,
|
1552
1556
|
notRedirectAfterComplete: ((_this$_renderParams19 = this._renderParams) === null || _this$_renderParams19 === void 0 ? void 0 : _this$_renderParams19.notRedirectAfterComplete) === true,
|
1553
1557
|
merchantAppointParam: this._merchantAppointParam,
|
1558
|
+
allowSubmitPayCallAhead: this._allowSubmitPayCallAhead,
|
1554
1559
|
envInfo: {
|
1555
1560
|
screenHeight: screen.height,
|
1556
1561
|
screenWidth: screen.width
|