@alipay/ams-checkout 0.0.1757400863-dev.3 → 0.0.1757400863-dev.4

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.
@@ -351,7 +351,7 @@ export var EasySafePayProcessor = /*#__PURE__*/function () {
351
351
  value: function () {
352
352
  var _processSubmitPay = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
353
353
  var _this$paymentContext9, _this$paymentContext10, _this$paymentContext11, _this$channelBehavior2, _this$channelBehavior3, _this$paymentContext$8, _this$paymentContext12;
354
- var submitParams, _ref3, _ref3$productSceneVer, productSceneVersion, _ref4, _ref4$action, _ref4$action2, _ref4$action2$enableS, enableSignAgreement, _ref4$action2$autoDeb, autoDebitWithToken, _this$paymentContext$7, paymentMethodType, isAppWebview, backScheme, requestBizId, extParams, requester, _this$paymentContext$9, res;
354
+ var submitParams, _ref3, _ref3$productSceneVer, productSceneVersion, _ref4, _ref4$action, _ref4$action2, _ref4$action2$enableS, enableSignAgreement, _ref4$action2$autoDeb, autoDebitWithToken, _this$paymentContext$7, paymentMethodType, isAppWebview, isNativeAppWebview, backScheme, requestBizId, extParams, requester, _this$paymentContext$9, res;
355
355
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
356
356
  while (1) switch (_context3.prev = _context3.next) {
357
357
  case 0:
@@ -366,7 +366,8 @@ export var EasySafePayProcessor = /*#__PURE__*/function () {
366
366
  submitParams['signAgreement'] = enableSignAgreement;
367
367
  paymentMethodType = (_this$paymentContext$7 = this.paymentContext.paymentSessionObj) === null || _this$paymentContext$7 === void 0 || (_this$paymentContext$7 = _this$paymentContext$7.paymentMethodInfoView) === null || _this$paymentContext$7 === void 0 ? void 0 : _this$paymentContext$7.paymentMethodType;
368
368
  isAppWebview = this.paymentContext.startBizFlowOptions.isAppWebview;
369
- if (paymentMethodType == 'ALIPAY_CN' && !isAppWebview) {
369
+ isNativeAppWebview = this.paymentContext.startBizFlowOptions.isNativeAppWebview;
370
+ if (paymentMethodType == 'ALIPAY_CN' && (!isAppWebview || !isNativeAppWebview)) {
370
371
  backScheme = getBackScheme(undefined, this.logger);
371
372
  if (backScheme && backScheme !== 'https') {
372
373
  submitParams['h5FromApp'] = encodeURIComponent(backScheme);
@@ -741,7 +741,7 @@ var ComponentApp = /*#__PURE__*/function () {
741
741
  this._actionSubmitPromise = new Promise( /*#__PURE__*/function () {
742
742
  var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(resolve) {
743
743
  var _channelBehavior$buil, _this6$_renderParams$, _this6$_renderParams4;
744
- var shouldSkipSubmitPayInSDK, _this6$_renderParams, _this6$_renderParams2, _this6$_renderParams3, _ref10, _ref10$productSceneVe, productSceneVersion, _ref10$productScene, productScene, _ref11, _ref11$action, _ref11$action2, _ref11$action2$enable, enableSignAgreement, _ref11$action2$autoDe, autoDebitWithToken, _ref12, _ref12$paymentMethodI, _ref12$paymentMethodI2, _ref12$paymentMethodI3, paymentMethodType, isAppWebview, backScheme, extParams;
744
+ var shouldSkipSubmitPayInSDK, _this6$_renderParams, _this6$_renderParams2, _this6$_renderParams3, _ref10, _ref10$productSceneVe, productSceneVersion, _ref10$productScene, productScene, _ref11, _ref11$action, _ref11$action2, _ref11$action2$enable, enableSignAgreement, _ref11$action2$autoDe, autoDebitWithToken, _ref12, _ref12$paymentMethodI, _ref12$paymentMethodI2, _ref12$paymentMethodI3, paymentMethodType, isAppWebview, isNativeAppWebview, backScheme, extParams;
745
745
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
746
746
  while (1) switch (_context3.prev = _context3.next) {
747
747
  case 0:
@@ -766,9 +766,10 @@ var ComponentApp = /*#__PURE__*/function () {
766
766
  _ref11 = ((_this6$_renderParams2 = _this6._renderParams) === null || _this6$_renderParams2 === void 0 ? void 0 : _this6$_renderParams2.paymentSessionMetaData) || {}, _ref11$action = _ref11.action, _ref11$action2 = _ref11$action === void 0 ? {} : _ref11$action, _ref11$action2$enable = _ref11$action2.enableSignAgreement, enableSignAgreement = _ref11$action2$enable === void 0 ? false : _ref11$action2$enable, _ref11$action2$autoDe = _ref11$action2.autoDebitWithToken, autoDebitWithToken = _ref11$action2$autoDe === void 0 ? false : _ref11$action2$autoDe;
767
767
  _ref12 = ((_this6$_renderParams3 = _this6._renderParams) === null || _this6$_renderParams3 === void 0 ? void 0 : _this6$_renderParams3.paymentSessionMetaData) || {}, _ref12$paymentMethodI = _ref12.paymentMethodInfoView, _ref12$paymentMethodI2 = _ref12$paymentMethodI === void 0 ? {} : _ref12$paymentMethodI, _ref12$paymentMethodI3 = _ref12$paymentMethodI2.paymentMethodType, paymentMethodType = _ref12$paymentMethodI3 === void 0 ? '' : _ref12$paymentMethodI3;
768
768
  if (productScene === ProductSceneEnum.EASY_PAY && productSceneVersion === '2.0' && !autoDebitWithToken) {
769
- isAppWebview = _this6._isAppWebview || false; ///EasyPay 2.0 首次传signAgreement字段
769
+ isAppWebview = _this6._isAppWebview || false;
770
+ isNativeAppWebview = _this6._isNativeAppWebview || false; ///EasyPay 2.0 首次传signAgreement字段
770
771
  params['signAgreement'] = enableSignAgreement;
771
- if (paymentMethodType == 'ALIPAY_CN' && !isAppWebview) {
772
+ if (paymentMethodType == 'ALIPAY_CN' && (!isAppWebview || !isNativeAppWebview)) {
772
773
  backScheme = getBackScheme(undefined, _this6.AMSSDK.logger);
773
774
  if (backScheme && backScheme !== 'https') {
774
775
  params['h5FromApp'] = encodeURIComponent(backScheme);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alipay/ams-checkout",
3
- "version": "0.0.1757400863-dev.3",
3
+ "version": "0.0.1757400863-dev.4",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "main": "esm/index.js",