@alipay/ams-checkout 0.0.1720509876-dev.0 → 0.0.1720509876-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.
@@ -84,7 +84,7 @@ var ApplePayComponent = /*#__PURE__*/function () {
84
84
  }, {
85
85
  biz: 'sdk',
86
86
  type: 'funnel',
87
- success: eventCodeEnum.SDK_PAYMENT_FAIL === (state === null || state === void 0 ? void 0 : state.code),
87
+ success: eventCodeEnum.SDK_PAYMENT_SUCCESSFUL === (state === null || state === void 0 ? void 0 : state.code),
88
88
  code: state === null || state === void 0 ? void 0 : state.code,
89
89
  errorCode: state === null || state === void 0 || (_state$result = state.result) === null || _state$result === void 0 ? void 0 : _state$result.errorCode,
90
90
  errorMessage: state === null || state === void 0 || (_state$result2 = state.result) === null || _state$result2 === void 0 ? void 0 : _state$result2.errorMessage,
@@ -98,7 +98,19 @@ export var getAppPath = function getAppPath() {
98
98
  }
99
99
  // element应用特殊处理
100
100
  if (_toConsumableArray(Object.values(ComponentSignEnumV2)).includes(componentSign)) {
101
- return "".concat(elementAppMarmotMap[environment], "/elements/").concat(finalAppVersion, "/pages/").concat(productScene, "/index.html");
101
+ // element又分为express_checkout模式和普通模式, express_checkout 模式在扩展参数是返回expressCheckout=true
102
+ var isExpressCheckout = false;
103
+ try {
104
+ isExpressCheckout = JSON.parse(extendInfo).expressCheckout;
105
+ } catch (error) {
106
+ // 遇到JSON解析错误,默认false
107
+ }
108
+ if (isExpressCheckout) {
109
+ // express_checkout模式走单独映射
110
+ return "".concat(elementAppMarmotMap[environment], "/elements/").concat(finalAppVersion, "/pages/express_checkout/index.html");
111
+ } else {
112
+ return "".concat(elementAppMarmotMap[environment], "/elements/").concat(finalAppVersion, "/pages/").concat(productScene.toLowerCase(), "/index.html");
113
+ }
102
114
  }
103
115
  return "".concat(marmotMap[environment], "/").concat(componentSign, "/").concat(finalProductSceneVersion, "/index.").concat(finalAppVersion, ".html");
104
116
  };
@@ -1628,8 +1628,9 @@ var ComponentApp = /*#__PURE__*/function () {
1628
1628
  }, {
1629
1629
  key: "hideComponentAnimation",
1630
1630
  value: function hideComponentAnimation() {
1631
+ var _container$style;
1631
1632
  var container = document.getElementById(COMPONENT_CONTAINER_ID);
1632
- if (this.app) this.app.style.height = container.style.height;
1633
+ if (this.app) this.app.style.height = container === null || container === void 0 || (_container$style = container.style) === null || _container$style === void 0 ? void 0 : _container$style.height;
1633
1634
  if (container) {
1634
1635
  // size变化动画取消
1635
1636
  container.style.transition = '';
@@ -18,6 +18,7 @@ export declare const sceneMap: {
18
18
  EASYPAY: string;
19
19
  EASY_PAY: string;
20
20
  FLASH_BUY: string;
21
+ ELEMENT_PAYMENT: string;
21
22
  };
22
23
  export declare const getSecurityHost: (region: string) => string;
23
24
  export declare const getSecurityScene: (product: string) => string;
@@ -24,7 +24,7 @@ export var securityHost = {
24
24
  US: 'https://open-na-global.alipay.com/api/open/risk_client',
25
25
  DE: 'https://open-de-global.alipay.com/api/open/risk_client'
26
26
  };
27
- export var sceneMap = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, productSceneEnum.CASHIER_PAYMENT, 'Acquirer'), productSceneEnum.AUTO_DEBIT, 'Acquirer'), productSceneEnum.VAULTING, 'Acquirer'), productSceneEnum.CARD_APPLE_PAY, 'Acquirer'), "EASYPAY", 'EasyPay'), productSceneEnum.EASY_PAY, 'EasyPay'), productSceneEnum.FLASH_BUY, 'OneAccount');
27
+ export var sceneMap = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, productSceneEnum.CASHIER_PAYMENT, 'Acquirer'), productSceneEnum.AUTO_DEBIT, 'Acquirer'), productSceneEnum.VAULTING, 'Acquirer'), productSceneEnum.CARD_APPLE_PAY, 'Acquirer'), "EASYPAY", 'EasyPay'), productSceneEnum.EASY_PAY, 'EasyPay'), productSceneEnum.FLASH_BUY, 'OneAccount'), productSceneEnum.ELEMENT_PAYMENT, 'Acquirer');
28
28
  export var getSecurityHost = function getSecurityHost(region) {
29
29
  return securityHost[region] || securityHost[SecurityRegionEnum.SG];
30
30
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alipay/ams-checkout",
3
- "version": "0.0.1720509876-dev.0",
3
+ "version": "0.0.1720509876-dev.2",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "main": "esm/index.js",