@alipay/ams-checkout 0.0.1756796178-dev.0 → 0.0.1756796178-dev.2

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.
@@ -66,6 +66,10 @@ export declare const ERRORMESSAGE: {
66
66
  code: eventCodeEnum;
67
67
  message: string;
68
68
  };
69
+ NETWORK_REQUEST_ERROR: {
70
+ code: eventCodeEnum;
71
+ message: string;
72
+ };
69
73
  };
70
74
  SDK_LAUNCH_PAYMENT_APP_ERROR: {
71
75
  code: eventCodeEnum;
@@ -65,6 +65,10 @@ export var ERRORMESSAGE = {
65
65
  LOAD_APP_TIMEOUT: {
66
66
  code: eventCodeEnum.SDK_CREATECOMPONENT_ERROR,
67
67
  message: 'Load resource timeout'
68
+ },
69
+ NETWORK_REQUEST_ERROR: {
70
+ code: eventCodeEnum.SDK_CREATECOMPONENT_ERROR,
71
+ message: 'Network request error'
68
72
  }
69
73
  },
70
74
  SDK_LAUNCH_PAYMENT_APP_ERROR: {
@@ -659,13 +659,25 @@ var ComponentApp = /*#__PURE__*/function () {
659
659
  key: 'sdk_action_query_end',
660
660
  value: Date.now()
661
661
  });
662
- resolve(res);
663
662
  _this5.AMSSDK.logger.logInfo({
664
663
  title: 'sdk_event_sdkQueryEnd'
665
664
  }, {
666
665
  paymentSessionConfig: JSON.stringify(params.paymentSessionConfig)
667
666
  }).send();
667
+ // fix: 泡泡玛特CVV场景,actionQuery报错会进入错误兜底页,导致CVV页面占用大幅空间
668
+ if (ComponentSignEnum.CASHIER_PAYMENT_CARD === _this5._componentSign && !(res !== null && res !== void 0 && res.success)) {
669
+ // 通用操作:抛CREATECOMPONENT_ERROR错误码给商户,商户升级到新版本需要处理CREATECOMPONENT_ERROR逻辑
670
+ _this5.dispatchToSDK(EVENT.error.name, {
671
+ code: ERRORMESSAGE.CREATECOMPONENT_ERROR.code,
672
+ message: res === null || res === void 0 ? void 0 : res.errorMessage
673
+ });
674
+ }
675
+ resolve(res);
668
676
  }).catch(function (err) {
677
+ if (ComponentSignEnum.CASHIER_PAYMENT_CARD === _this5._componentSign) {
678
+ // 通用操作:抛CREATECOMPONENT_ERROR错误码给商户,商户升级到新版本需要处理CREATECOMPONENT_ERROR逻辑
679
+ _this5.dispatchToSDK(EVENT.error.name, ERRORMESSAGE.CREATECOMPONENT_ERROR.NETWORK_REQUEST_ERROR);
680
+ }
669
681
  if ([ComponentSignEnum.CASHIER_PAYMENT_CARD, ComponentSignEnum.VAULTING_CARD, ComponentSignEnum.CASHIER_PAYMENT_APM].includes(_this5._componentSign)) {
670
682
  return resolve({
671
683
  success: false
@@ -806,7 +818,7 @@ var ComponentApp = /*#__PURE__*/function () {
806
818
  paymentSessionConfig: JSON.stringify(params.paymentSessionConfig)
807
819
  }).send();
808
820
  resolve(res);
809
- }).catch(function () {
821
+ }).catch(function (err) {
810
822
  _this6.AMSSDK.logger.logError({
811
823
  title: 'sdk_event_submitPay_failed'
812
824
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alipay/ams-checkout",
3
- "version": "0.0.1756796178-dev.0",
3
+ "version": "0.0.1756796178-dev.2",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "main": "esm/index.js",