@alipay/ams-checkout 0.0.1730107332-dev.4 → 0.0.1730706734-dev.0

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.
Files changed (136) hide show
  1. package/dist/umd/ams-checkout.min.js +1 -1
  2. package/esm/config/index.d.ts +7 -7
  3. package/esm/config/index.js +7 -7
  4. package/esm/constant/index.d.ts +6 -1
  5. package/esm/constant/index.js +80 -3
  6. package/esm/core/bus/ability/callback.d.ts +9 -0
  7. package/esm/{foundation/service/api-bus → core/bus}/ability/callback.js +1 -1
  8. package/esm/core/bus/ability/globalData.d.ts +10 -0
  9. package/esm/{foundation/service/api-bus → core/bus}/ability/globalData.js +2 -2
  10. package/esm/{foundation/service/api-bus → core/bus}/ability/request.d.ts +1 -1
  11. package/esm/{foundation/service/api-bus → core/bus}/ability/request.js +2 -2
  12. package/esm/core/bus/ability/security.d.ts +10 -0
  13. package/esm/core/bus/ability/security.js +104 -0
  14. package/esm/core/bus/ability/tracker.d.ts +9 -0
  15. package/esm/core/bus/ability/tracker.js +77 -0
  16. package/esm/core/bus/index.d.ts +125 -0
  17. package/esm/core/bus/index.js +366 -0
  18. package/esm/core/component/address.d.ts +8 -0
  19. package/esm/core/component/address.js +72 -0
  20. package/esm/core/component/appPreloadProcessing.d.ts +1 -0
  21. package/esm/core/component/appPreloadProcessing.js +91 -0
  22. package/esm/core/component/ckp/index.d.ts +27 -0
  23. package/esm/core/component/ckp/index.js +166 -0
  24. package/esm/core/component/element/components/address.d.ts +19 -0
  25. package/esm/core/component/element/components/address.js +68 -0
  26. package/esm/core/component/element/components/auth.d.ts +17 -0
  27. package/esm/core/component/element/components/auth.js +59 -0
  28. package/esm/core/component/element/components/payment.d.ts +19 -0
  29. package/esm/core/component/element/components/payment.js +74 -0
  30. package/esm/core/component/element/element-mock.d.ts +2 -0
  31. package/esm/core/component/element/element-mock.js +263 -0
  32. package/esm/core/component/element/index.d.ts +47 -0
  33. package/esm/core/component/element/index.js +776 -0
  34. package/esm/core/component/element/mock.d.ts +3 -0
  35. package/esm/core/component/element/mock.js +1156 -0
  36. package/esm/core/component/element/type.d.ts +176 -0
  37. package/esm/core/component/element/type.js +34 -0
  38. package/esm/core/component/element/utils.d.ts +13 -0
  39. package/esm/core/component/element/utils.js +6 -0
  40. package/esm/core/component/index.d.ts +51 -0
  41. package/esm/core/component/index.js +535 -0
  42. package/esm/core/drop-in/index.d.ts +22 -0
  43. package/esm/core/drop-in/index.js +104 -0
  44. package/esm/core/instance/index.d.ts +89 -0
  45. package/esm/core/instance/index.js +500 -0
  46. package/esm/foundation/core/index.d.ts +3 -3
  47. package/esm/foundation/core/index.js +51 -114
  48. package/esm/foundation/index.d.ts +3 -5
  49. package/esm/foundation/product-processor/easysafepay/deps.d.ts +4 -7
  50. package/esm/foundation/product-processor/easysafepay/deps.js +2 -5
  51. package/esm/foundation/product-processor/easysafepay/index.d.ts +4 -5
  52. package/esm/foundation/product-processor/easysafepay/index.js +114 -174
  53. package/esm/foundation/service/container/index.js +5 -5
  54. package/esm/foundation/service/container/popup.js +1 -1
  55. package/esm/foundation/service/event-bus/ability/callback.js +55 -0
  56. package/esm/foundation/service/{api-bus → event-bus}/ability/globalData.d.ts +1 -1
  57. package/esm/foundation/service/event-bus/ability/globalData.js +89 -0
  58. package/esm/foundation/service/event-bus/ability/request.d.ts +10 -0
  59. package/esm/foundation/service/event-bus/ability/request.js +151 -0
  60. package/esm/foundation/service/{api-bus → event-bus}/ability/security.js +19 -29
  61. package/esm/foundation/service/{api-bus → event-bus}/ability/tracker.js +1 -1
  62. package/esm/foundation/service/{api-bus → event-bus}/busManager.js +1 -1
  63. package/esm/foundation/service/event-center.d.ts +5 -4
  64. package/esm/foundation/service/event-center.js +39 -8
  65. package/esm/foundation/service/global-data/index.js +5 -4
  66. package/esm/foundation/service/index.js +1 -1
  67. package/esm/foundation/service/requester/requester.js +11 -14
  68. package/esm/foundation/service/security/index.d.ts +7 -9
  69. package/esm/foundation/service/security/index.js +44 -113
  70. package/esm/foundation/utils/redirect_utils.js +8 -24
  71. package/esm/foundation/utils/web_app_url_utils.d.ts +2 -11
  72. package/esm/foundation/utils/web_app_url_utils.js +2 -17
  73. package/esm/index.d.ts +30 -1
  74. package/esm/index.js +147 -7
  75. package/esm/plugin/applepay/component.d.ts +50 -0
  76. package/esm/plugin/applepay/component.js +339 -0
  77. package/esm/plugin/applepay/index.d.ts +17 -0
  78. package/esm/plugin/applepay/index.js +117 -0
  79. package/esm/plugin/applepay/interface.d.ts +161 -0
  80. package/esm/plugin/applepay/interface.js +69 -0
  81. package/esm/plugin/applepay/service.d.ts +54 -0
  82. package/esm/plugin/applepay/service.js +289 -0
  83. package/esm/plugin/component/cashierApp.d.ts +36 -0
  84. package/esm/plugin/component/cashierApp.js +245 -0
  85. package/esm/{component → plugin/component}/channel.d.ts +2 -1
  86. package/esm/{component → plugin/component}/channel.js +37 -1
  87. package/esm/{component → plugin/component}/component.inline.style.d.ts +2 -2
  88. package/esm/{component → plugin/component}/component.inline.style.js +7 -6
  89. package/esm/{component → plugin/component}/component.popup.style.d.ts +1 -1
  90. package/esm/{component → plugin/component}/component.popup.style.js +4 -4
  91. package/esm/plugin/component/index.d.ts +126 -0
  92. package/esm/plugin/component/index.js +1862 -0
  93. package/esm/{component → plugin/component}/popupWindow.style.js +2 -2
  94. package/esm/plugin/const.d.ts +2 -0
  95. package/esm/plugin/const.js +33 -0
  96. package/esm/plugin/drop-in/index.d.ts +71 -0
  97. package/esm/plugin/drop-in/index.js +324 -0
  98. package/esm/plugin/payment-element/utils.d.ts +2 -0
  99. package/esm/plugin/payment-element/utils.js +7 -0
  100. package/esm/plugin/paypal/index.d.ts +20 -0
  101. package/esm/plugin/paypal/index.js +390 -0
  102. package/esm/plugin/type.d.ts +34 -0
  103. package/esm/plugin/type.js +1 -0
  104. package/esm/plugin/utils.d.ts +6 -0
  105. package/esm/plugin/utils.js +21 -0
  106. package/esm/service/element.d.ts +4 -0
  107. package/esm/service/element.js +51 -0
  108. package/esm/service/index.d.ts +1 -0
  109. package/esm/service/index.js +2 -0
  110. package/esm/types/index.d.ts +218 -22
  111. package/esm/types/index.js +47 -4
  112. package/esm/util/createIframeNode.d.ts +6 -0
  113. package/esm/util/createIframeNode.js +48 -0
  114. package/esm/util/getBackScheme.d.ts +2 -2
  115. package/esm/util/getBackScheme.js +2 -94
  116. package/esm/util/index.d.ts +11 -1
  117. package/esm/util/index.js +84 -4
  118. package/esm/util/intl-callapp/es/index.js +0 -1
  119. package/esm/util/ua/index.d.ts +2 -0
  120. package/esm/util/ua/index.js +2 -0
  121. package/esm/util/ua/isAndroid.d.ts +4 -0
  122. package/esm/util/ua/isAndroid.js +7 -0
  123. package/esm/util/ua/isIOS.d.ts +4 -0
  124. package/esm/util/ua/isIOS.js +7 -0
  125. package/package.json +2 -1
  126. package/esm/foundation/utils/payment_product_utils.d.ts +0 -13
  127. package/esm/foundation/utils/payment_product_utils.js +0 -38
  128. /package/esm/{foundation/service/api-bus → core/bus}/interface.d.ts +0 -0
  129. /package/esm/{foundation/service/api-bus → core/bus}/interface.js +0 -0
  130. /package/esm/foundation/service/{api-bus → event-bus}/ability/callback.d.ts +0 -0
  131. /package/esm/foundation/service/{api-bus → event-bus}/ability/security.d.ts +0 -0
  132. /package/esm/foundation/service/{api-bus → event-bus}/ability/tracker.d.ts +0 -0
  133. /package/esm/foundation/service/{api-bus → event-bus}/busManager.d.ts +0 -0
  134. /package/esm/foundation/service/{api-bus → event-bus}/index.d.ts +0 -0
  135. /package/esm/foundation/service/{api-bus → event-bus}/index.js +0 -0
  136. /package/esm/{component → plugin/component}/popupWindow.style.d.ts +0 -0
@@ -16,21 +16,21 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
16
16
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
17
17
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
18
18
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
19
- import { ChannelCustomize, DisplayTypeEnum, getBackScheme, isLocalMock, isPC, ProductInfoCacheUtil, ProductSceneEnum, ServiceProvider, uuid, WebAppUrlUtil } from "./deps";
19
+ import { ChannelCustomize, DisplayTypeEnum, isLocalMock, isPC, ServiceProvider, WebAppUrlUtil } from "./deps";
20
+
21
+ // 缓存上次产品信息
22
+ var KEY_PREVIOUS_PRODUCT_INFO = 'antom_checkout_previous_ESP_ProductInfo';
20
23
  export var EasySafePayProcessor = /*#__PURE__*/function () {
21
24
  function EasySafePayProcessor() {
22
25
  _classCallCheck(this, EasySafePayProcessor);
23
26
  _defineProperty(this, "paymentContext", void 0);
24
27
  _defineProperty(this, "initConfig", void 0);
25
28
  _defineProperty(this, "logger", void 0);
26
- _defineProperty(this, "securityService", void 0);
27
29
  _defineProperty(this, "instanceId", void 0);
28
- // 服务端接口区域信息,请求时决定API域名
29
30
  _defineProperty(this, "hostSign", void 0);
30
31
  // 是否允许submitPay提前调用,在ESP非首次的性能优化场景使用
31
32
  _defineProperty(this, "allowSubmitPayCallAhead", void 0);
32
33
  _defineProperty(this, "channelBehavior", void 0);
33
- _defineProperty(this, "SECURITY_SDK_INIT_TIMEOUT", 18000);
34
34
  }
35
35
  _createClass(EasySafePayProcessor, [{
36
36
  key: "init",
@@ -38,7 +38,6 @@ export var EasySafePayProcessor = /*#__PURE__*/function () {
38
38
  this.initConfig = config;
39
39
  this.instanceId = instanceId;
40
40
  this.logger = ServiceProvider.getInstance(this.instanceId).getService('Log');
41
- this.securityService = ServiceProvider.getInstance(this.instanceId).getService('Security');
42
41
  this.preloadWebApp(config, this.instanceId, sdkMetaData);
43
42
  }
44
43
  }, {
@@ -74,16 +73,13 @@ export var EasySafePayProcessor = /*#__PURE__*/function () {
74
73
  }
75
74
  return _context.abrupt("return", this.buildRedirectResult(authUrlInfo));
76
75
  case 12:
77
- _context.next = 14;
78
- return this.initSecuritySDK();
79
- case 14:
80
76
  // 下面的场景是需要渲染UI的渠道, 打开WebUrl
81
- webAppUrl = this.buildWebAppUrl(); // const webAppUrl = 'http://svc-9kvjxwjf68cptha8.cloudide.svc.et15-sqa.alipay.net:5173/src/component-app/index.html';
77
+ webAppUrl = this.buildWebAppUrl();
82
78
  resultPayload = {
83
79
  url: webAppUrl,
84
80
  allowClickPopupOutsideClose: (_this$channelBehavior = this.channelBehavior) === null || _this$channelBehavior === void 0 ? void 0 : _this$channelBehavior.allowClickOutsideClose
85
81
  };
86
- ProductInfoCacheUtil.savePreviousProductInfo(ProductSceneEnum.EASY_PAY, {
82
+ this.savePreviousProductInfo({
87
83
  paymentMethodCategoryType: paymentMethodCategoryType,
88
84
  hostSign: this.hostSign,
89
85
  productSceneVersion: productSceneVersion
@@ -95,7 +91,7 @@ export var EasySafePayProcessor = /*#__PURE__*/function () {
95
91
  behaviorType: 'RENDER',
96
92
  payload: resultPayload
97
93
  });
98
- case 19:
94
+ case 17:
99
95
  case "end":
100
96
  return _context.stop();
101
97
  }
@@ -111,46 +107,40 @@ export var EasySafePayProcessor = /*#__PURE__*/function () {
111
107
  value: function preloadWebApp(config, instanceId, sdkMetaData) {
112
108
  // trigger preload
113
109
  var containerService = ServiceProvider.getInstance(this.instanceId).getService('Container');
114
- var _this$buildWebAppPrel = this.buildWebAppPreloadUrl(config, instanceId, sdkMetaData),
115
- taskId = _this$buildWebAppPrel.taskId,
116
- webUrl = _this$buildWebAppPrel.webUrl;
117
- containerService.preload(taskId, webUrl);
110
+ var productScene = this.paymentContext.paymentSessionObj.paymentSessionConfig.productScene;
111
+ var paymentMethodCategoryType = this.paymentContext.paymentSessionObj.paymentSessionConfig.paymentMethodCategoryType;
112
+ var containerId = "ams-checkout-component-".concat(productScene, "_").concat(paymentMethodCategoryType);
113
+ var webAppUrl = this.buildWebAppPreloadUrl(config, instanceId, sdkMetaData);
114
+ containerService.preload(containerId, webAppUrl);
118
115
  }
119
116
  }, {
120
117
  key: "buildWebAppPreloadUrl",
121
118
  value: function buildWebAppPreloadUrl(initConfig, instanceId, sdkMetaData) {
122
- var _this = this;
123
- var previousProductInfo = ProductInfoCacheUtil.getPreviousProductInfo(ProductSceneEnum.EASY_PAY, function (erorrMsg) {
124
- if (erorrMsg) {
125
- _this.logger.logError({
126
- title: 'performance_optimization_get_previousChannel_error'
127
- }, {
128
- error: erorrMsg
129
- });
130
- }
131
- });
119
+ var previousProductInfo = this.getPreviousProductInfo();
132
120
  var paymentMethodCategoryType = previousProductInfo === null || previousProductInfo === void 0 ? void 0 : previousProductInfo.paymentMethodCategoryType;
133
- var productSceneVersion = (previousProductInfo === null || previousProductInfo === void 0 ? void 0 : previousProductInfo.productSceneVersion) || '2.0';
134
- var taskId = "ams-checkout-component-".concat(sdkMetaData.productScene, "_").concat(paymentMethodCategoryType);
121
+ var productSceneVersion = previousProductInfo === null || previousProductInfo === void 0 ? void 0 : previousProductInfo.productSceneVersion;
135
122
  var hostSign = previousProductInfo === null || previousProductInfo === void 0 ? void 0 : previousProductInfo.hostSign;
136
- var webUrl = WebAppUrlUtil.getWebAppUrl({
123
+ var webAppUrlInfo = WebAppUrlUtil.getWebAppUrl({
137
124
  environment: initConfig.environment,
138
125
  paymentMethodCategoryType: paymentMethodCategoryType,
139
126
  sdkMetaData: sdkMetaData,
140
- isPreload: true,
141
127
  productSceneVersion: productSceneVersion,
142
128
  query: {
143
129
  analyticsEnabled: initConfig.analytics.enabled,
144
- displayType: DisplayTypeEnum.popup,
130
+ displayType: DisplayTypeEnum.inline,
145
131
  instanceId: instanceId,
132
+ isPreload: 'true',
146
133
  locale: initConfig.locale,
147
134
  hostSign: hostSign
148
135
  }
149
136
  });
150
- return {
151
- webUrl: webUrl,
152
- taskId: taskId
153
- };
137
+ var webAppUrl;
138
+ if (webAppUrlInfo.path.indexOf('?') !== -1) {
139
+ webAppUrl = "".concat(webAppUrlInfo.path, "&").concat(webAppUrlInfo.locationSearch);
140
+ } else {
141
+ webAppUrl = "".concat(webAppUrlInfo.path, "?").concat(webAppUrlInfo.locationSearch);
142
+ }
143
+ return webAppUrl;
154
144
  }
155
145
  }, {
156
146
  key: "buildWebAppUrl",
@@ -160,20 +150,26 @@ export var EasySafePayProcessor = /*#__PURE__*/function () {
160
150
  var paymentMethodCategoryType = (_paymentContext$payme3 = paymentContext.paymentSessionObj.paymentSessionConfig) === null || _paymentContext$payme3 === void 0 ? void 0 : _paymentContext$payme3.paymentMethodCategoryType;
161
151
  var productSceneVersion = (_paymentContext$payme4 = paymentContext.paymentSessionObj.paymentSessionConfig) === null || _paymentContext$payme4 === void 0 ? void 0 : _paymentContext$payme4.productSceneVersion;
162
152
  var hostSign = this.hostSign;
163
- var webAppUrl = WebAppUrlUtil.getWebAppUrl({
153
+ var webAppUrlInfo = WebAppUrlUtil.getWebAppUrl({
164
154
  environment: this.initConfig.environment,
165
155
  paymentMethodCategoryType: paymentMethodCategoryType,
166
156
  sdkMetaData: paymentContext.sdkMetaData,
167
157
  productSceneVersion: productSceneVersion,
168
- isPreload: false,
169
158
  query: {
170
159
  analyticsEnabled: this.initConfig.analytics.enabled,
171
- displayType: DisplayTypeEnum.popup,
160
+ displayType: DisplayTypeEnum.inline,
172
161
  instanceId: this.instanceId,
162
+ isPreload: 'true',
173
163
  locale: this.initConfig.locale,
174
164
  hostSign: hostSign
175
165
  }
176
166
  });
167
+ var webAppUrl;
168
+ if (webAppUrlInfo.path.indexOf('?') !== -1) {
169
+ webAppUrl = "".concat(webAppUrlInfo.path, "&").concat(webAppUrlInfo.locationSearch);
170
+ } else {
171
+ webAppUrl = "".concat(webAppUrlInfo.path, "?").concat(webAppUrlInfo.locationSearch);
172
+ }
177
173
  return webAppUrl;
178
174
  }
179
175
  }, {
@@ -207,7 +203,7 @@ export var EasySafePayProcessor = /*#__PURE__*/function () {
207
203
  }, {
208
204
  key: "sendRequestAndWaitWebLaunch",
209
205
  value: function sendRequestAndWaitWebLaunch() {
210
- var _this2 = this;
206
+ var _this = this;
211
207
  var eventCenter = ServiceProvider.getInstance(this.instanceId).getService('EventCenter');
212
208
  var requestPromise = Promise.all([this.processPaymentQuery(), this.processSubmitPay()]).then(function (_ref) {
213
209
  var _ref2 = _slicedToArray(_ref, 2),
@@ -218,33 +214,32 @@ export var EasySafePayProcessor = /*#__PURE__*/function () {
218
214
  submitRes: submitRes
219
215
  };
220
216
  });
221
- var webLaunchPromise = new Promise(function (resolve) {
222
- eventCenter.listen('onLaunch', function (res) {
217
+ var webLaunchPromose = new Promise(function (resolve) {
218
+ eventCenter.listen('onlaunch', function (res) {
223
219
  resolve(res);
224
220
  });
225
221
  });
226
222
 
227
223
  // 等请求和 Web启动都Ready之后,发送renderComponent
228
- Promise.all([requestPromise, webLaunchPromise]).then(function (_ref3) {
229
- var _this2$paymentContext, _this2$paymentContext2, _this2$paymentContext3, _this2$paymentContext4, _this2$paymentContext5, _this2$paymentContext6;
224
+ Promise.all([requestPromise, webLaunchPromose]).then(function (_ref3) {
225
+ var _this$paymentContext, _this$paymentContext2, _this$paymentContext$, _this$paymentContext$2, _this$paymentContext$3, _this$paymentContext$4;
230
226
  var _ref4 = _slicedToArray(_ref3, 2),
231
227
  requestResult = _ref4[0],
232
228
  launchRes = _ref4[1];
233
- var logMetaData = _this2.logger.getLogConfig().mdata;
229
+ var logMetaData = _this.logger.getLogConfig().mdata;
234
230
  eventCenter.dispatchToApp({
235
231
  event: 'renderComponent',
236
232
  data: {
237
233
  queryResult: requestResult.queryRes,
238
234
  submitResult: requestResult.submitRes,
239
- sessionResult: (_this2$paymentContext = _this2.paymentContext) === null || _this2$paymentContext === void 0 ? void 0 : _this2$paymentContext.paymentSessionObj,
240
- paymentSessionData: (_this2$paymentContext2 = _this2.paymentContext) === null || _this2$paymentContext2 === void 0 ? void 0 : _this2$paymentContext2.paymentSession,
235
+ sessionResult: (_this$paymentContext = _this.paymentContext) === null || _this$paymentContext === void 0 ? void 0 : _this$paymentContext.paymentSessionObj,
236
+ paymentSessionData: (_this$paymentContext2 = _this.paymentContext) === null || _this$paymentContext2 === void 0 ? void 0 : _this$paymentContext2.paymentSession,
241
237
  heightOfVisible: Math.max(window.changingPageHeight, window.innerHeight),
242
- renderDisplayType: _this2.paymentContext.displayInfo.type,
243
- appearance: (_this2$paymentContext3 = _this2.paymentContext.displayInfo) === null || _this2$paymentContext3 === void 0 ? void 0 : _this2$paymentContext3.appearance,
244
- notRedirectAfterComplete: ((_this2$paymentContext4 = _this2.paymentContext.startBizFlowOptions.submitPayRequestExtra) === null || _this2$paymentContext4 === void 0 ? void 0 : _this2$paymentContext4.notRedirectAfterComplete) === true,
245
- isAppWebview: _this2.paymentContext.startBizFlowOptions.isAppWebview,
246
- merchantAppointParam: (_this2$paymentContext5 = _this2.paymentContext.startBizFlowOptions.submitPayRequestExtra) === null || _this2$paymentContext5 === void 0 ? void 0 : _this2$paymentContext5.merchantAppointParam,
247
- allowSubmitPayCallAhead: _this2.allowSubmitPayCallAhead,
238
+ renderDisplayType: _this.paymentContext.displayInfo.type,
239
+ appearance: (_this$paymentContext$ = _this.paymentContext.displayInfo) === null || _this$paymentContext$ === void 0 ? void 0 : _this$paymentContext$.appearance,
240
+ notRedirectAfterComplete: ((_this$paymentContext$2 = _this.paymentContext.startBizFlowOptions.submitPayRequestExtra) === null || _this$paymentContext$2 === void 0 ? void 0 : _this$paymentContext$2.notRedirectAfterComplete) === true,
241
+ merchantAppointParam: (_this$paymentContext$3 = _this.paymentContext.startBizFlowOptions.submitPayRequestExtra) === null || _this$paymentContext$3 === void 0 ? void 0 : _this$paymentContext$3.merchantAppointParam,
242
+ allowSubmitPayCallAhead: _this.allowSubmitPayCallAhead,
248
243
  envInfo: {
249
244
  screenHeight: screen.height,
250
245
  screenWidth: screen.width
@@ -253,7 +248,7 @@ export var EasySafePayProcessor = /*#__PURE__*/function () {
253
248
  trackId: logMetaData.requestSeq,
254
249
  platform: logMetaData.platform,
255
250
  firstLogTime: logMetaData.firstLogTime
256
- }, ((_this2$paymentContext6 = _this2.paymentContext.paymentSessionObj) === null || _this2$paymentContext6 === void 0 ? void 0 : _this2$paymentContext6.paymentSessionConfig) || {}), {}, {
251
+ }, ((_this$paymentContext$4 = _this.paymentContext.paymentSessionObj) === null || _this$paymentContext$4 === void 0 ? void 0 : _this$paymentContext$4.paymentSessionConfig) || {}), {}, {
257
252
  renderDisplayType: logMetaData.renderDisplayType,
258
253
  sdkVersion: logMetaData.sdkVersion,
259
254
  merchantId: logMetaData.merchantId,
@@ -268,8 +263,8 @@ export var EasySafePayProcessor = /*#__PURE__*/function () {
268
263
  key: "processPaymentQuery",
269
264
  value: function () {
270
265
  var _processPaymentQuery = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
271
- var _this$paymentContext, _this$paymentContext2, _this$paymentContext3, _this$paymentContext4, _this$paymentContext5, _this$channelBehavior2;
272
- var envInfo, requestData, extendInfo, actionData, enableEasypayApiOptimize, extendInfoData, productSceneVersion, requestBizId, requester, res;
266
+ var _this$paymentContext3, _this$paymentContext4, _this$paymentContext5, _this$paymentContext6, _this$paymentContext7, _this$channelBehavior2;
267
+ var envInfo, requestData, extendInfo, actionData, enableEasypayApiOptimize, extendInfoData, productSceneVersion, requester, res;
273
268
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
274
269
  while (1) switch (_context2.prev = _context2.next) {
275
270
  case 0:
@@ -277,13 +272,13 @@ export var EasySafePayProcessor = /*#__PURE__*/function () {
277
272
  locale: this.initConfig.locale
278
273
  }; //
279
274
  requestData = {
280
- paymentSessionData: ((_this$paymentContext = this.paymentContext) === null || _this$paymentContext === void 0 ? void 0 : _this$paymentContext.paymentSession) || '',
281
- paymentSessionConfig: (_this$paymentContext2 = this.paymentContext) === null || _this$paymentContext2 === void 0 || (_this$paymentContext2 = _this$paymentContext2.paymentSessionObj) === null || _this$paymentContext2 === void 0 ? void 0 : _this$paymentContext2.paymentSessionConfig,
282
- notRedirectAfterComplete: ((_this$paymentContext3 = this.paymentContext) === null || _this$paymentContext3 === void 0 ? void 0 : _this$paymentContext3.startBizFlowOptions.submitPayRequestExtra.notRedirectAfterComplete) === true
275
+ paymentSessionData: ((_this$paymentContext3 = this.paymentContext) === null || _this$paymentContext3 === void 0 ? void 0 : _this$paymentContext3.paymentSession) || '',
276
+ paymentSessionConfig: (_this$paymentContext4 = this.paymentContext) === null || _this$paymentContext4 === void 0 || (_this$paymentContext4 = _this$paymentContext4.paymentSessionObj) === null || _this$paymentContext4 === void 0 ? void 0 : _this$paymentContext4.paymentSessionConfig,
277
+ notRedirectAfterComplete: ((_this$paymentContext5 = this.paymentContext) === null || _this$paymentContext5 === void 0 ? void 0 : _this$paymentContext5.startBizFlowOptions.submitPayRequestExtra.notRedirectAfterComplete) === true
283
278
  // merchantAppointParam: this._merchantAppointParam,
284
279
  };
285
- extendInfo = ((_this$paymentContext4 = this.paymentContext) === null || _this$paymentContext4 === void 0 || (_this$paymentContext4 = _this$paymentContext4.paymentSessionObj) === null || _this$paymentContext4 === void 0 ? void 0 : _this$paymentContext4.extendInfo) || '';
286
- actionData = (_this$paymentContext5 = this.paymentContext) === null || _this$paymentContext5 === void 0 || (_this$paymentContext5 = _this$paymentContext5.paymentSessionObj) === null || _this$paymentContext5 === void 0 ? void 0 : _this$paymentContext5.action;
280
+ extendInfo = ((_this$paymentContext6 = this.paymentContext) === null || _this$paymentContext6 === void 0 || (_this$paymentContext6 = _this$paymentContext6.paymentSessionObj) === null || _this$paymentContext6 === void 0 ? void 0 : _this$paymentContext6.extendInfo) || '';
281
+ actionData = (_this$paymentContext7 = this.paymentContext) === null || _this$paymentContext7 === void 0 || (_this$paymentContext7 = _this$paymentContext7.paymentSessionObj) === null || _this$paymentContext7 === void 0 ? void 0 : _this$paymentContext7.action;
287
282
  enableEasypayApiOptimize = false;
288
283
  try {
289
284
  extendInfoData = JSON.parse(extendInfo);
@@ -333,51 +328,51 @@ export var EasySafePayProcessor = /*#__PURE__*/function () {
333
328
  return this.acquireApdidToken();
334
329
  case 17:
335
330
  envInfo.deviceId = _context2.sent;
336
- requestBizId = uuid(); // 打日志
331
+ // 打日志
337
332
  this.logger.logInfo({
338
333
  title: 'sdk_event_sdkQuery'
339
334
  }, {
340
335
  paymentSessionConfig: JSON.stringify(requestData.paymentSessionConfig),
341
- requestBizId: requestBizId
336
+ // TODO: 安全合规考虑
337
+ requestBody: requestData
342
338
  });
343
339
 
344
340
  // 真正发请求
345
341
  requester = ServiceProvider.getInstance(this.instanceId).getService('Requester');
346
- _context2.prev = 21;
347
- _context2.next = 24;
342
+ _context2.prev = 20;
343
+ _context2.next = 23;
348
344
  return requester.request(requestData, {
349
345
  env: this.initConfig.environment,
350
346
  envInfo: envInfo,
351
347
  hostSign: this.hostSign,
352
348
  'Operation-Type': 'com.ipay.iexpcashier.sdkAction.query'
353
349
  });
354
- case 24:
350
+ case 23:
355
351
  res = _context2.sent;
356
352
  this.logger.logInfo({
357
353
  title: 'sdk_event_sdkQueryEnd'
358
354
  }, {
359
355
  paymentSessionConfig: JSON.stringify(requestData.paymentSessionConfig),
360
- requestBizId: requestBizId,
361
- traceId: res.traceId
356
+ // TODO: 安全合规考虑
357
+ responseBody: res
362
358
  });
363
- return _context2.abrupt("return", res);
364
- case 29:
365
- _context2.prev = 29;
366
- _context2.t0 = _context2["catch"](21);
359
+ _context2.next = 31;
360
+ break;
361
+ case 27:
362
+ _context2.prev = 27;
363
+ _context2.t0 = _context2["catch"](20);
367
364
  this.logger.logError({
368
365
  title: 'sdk_event_sdkQuery_failed'
369
366
  }, {
370
367
  paymentSessionConfig: JSON.stringify(requestData.paymentSessionConfig),
371
- errorReason: _context2.t0,
372
- requestBizId: requestBizId,
373
- traceId: _context2.t0 === null || _context2.t0 === void 0 ? void 0 : _context2.t0.traceId
368
+ errorReason: _context2.t0
374
369
  });
375
370
  throw _context2.t0;
376
- case 33:
371
+ case 31:
377
372
  case "end":
378
373
  return _context2.stop();
379
374
  }
380
- }, _callee2, this, [[21, 29]]);
375
+ }, _callee2, this, [[20, 27]]);
381
376
  }));
382
377
  function processPaymentQuery() {
383
378
  return _processPaymentQuery.apply(this, arguments);
@@ -388,14 +383,14 @@ export var EasySafePayProcessor = /*#__PURE__*/function () {
388
383
  key: "processSubmitPay",
389
384
  value: function () {
390
385
  var _processSubmitPay = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
391
- var _this$paymentContext6, _this$paymentContext7, _this$paymentContext9, _this$channelBehavior3, _this$channelBehavior4, _this$paymentContext$2;
392
- var submitParams, shouldSkipSubmitPayInSDK, _this$paymentContext8, _ref5, _ref5$productSceneVer, productSceneVersion, _ref6, _ref6$action, _ref6$action2, _ref6$action2$enableS, enableSignAgreement, _ref6$action2$autoDeb, autoDebitWithToken, _this$paymentContext$, paymentMethodType, isAppWebview, backScheme, requestBizId, extParams, requester, res;
386
+ var _this$paymentContext8, _this$paymentContext9, _this$paymentContext11, _this$channelBehavior3, _this$channelBehavior4, _this$paymentContext$5;
387
+ var submitParams, shouldSkipSubmitPayInSDK, _this$paymentContext10, _ref5, _ref5$productSceneVer, productSceneVersion, _ref5$productScene, productScene, _ref6, _ref6$action, _ref6$action2, _ref6$action2$enableS, enableSignAgreement, _ref6$action2$autoDeb, autoDebitWithToken, extParams, requester, res;
393
388
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
394
389
  while (1) switch (_context3.prev = _context3.next) {
395
390
  case 0:
396
391
  submitParams = {
397
- paymentSessionData: ((_this$paymentContext6 = this.paymentContext) === null || _this$paymentContext6 === void 0 ? void 0 : _this$paymentContext6.paymentSession) || '',
398
- paymentSessionConfig: (_this$paymentContext7 = this.paymentContext) === null || _this$paymentContext7 === void 0 || (_this$paymentContext7 = _this$paymentContext7.paymentSessionObj) === null || _this$paymentContext7 === void 0 ? void 0 : _this$paymentContext7.paymentSessionConfig
392
+ paymentSessionData: ((_this$paymentContext8 = this.paymentContext) === null || _this$paymentContext8 === void 0 ? void 0 : _this$paymentContext8.paymentSession) || '',
393
+ paymentSessionConfig: (_this$paymentContext9 = this.paymentContext) === null || _this$paymentContext9 === void 0 || (_this$paymentContext9 = _this$paymentContext9.paymentSessionObj) === null || _this$paymentContext9 === void 0 ? void 0 : _this$paymentContext9.paymentSessionConfig
399
394
  };
400
395
  shouldSkipSubmitPayInSDK = false;
401
396
  if (this.channelBehavior) {
@@ -404,21 +399,13 @@ export var EasySafePayProcessor = /*#__PURE__*/function () {
404
399
  } else {
405
400
  // TODO: 拉会找栎昂、甘颜一起对下
406
401
  // 老逻辑,只要服务端标记不跳过sdkquery,就需要跳过submitpay
407
- shouldSkipSubmitPayInSDK = !((_this$paymentContext8 = this.paymentContext) !== null && _this$paymentContext8 !== void 0 && (_this$paymentContext8 = _this$paymentContext8.paymentSessionObj) !== null && _this$paymentContext8 !== void 0 && (_this$paymentContext8 = _this$paymentContext8.action) !== null && _this$paymentContext8 !== void 0 && _this$paymentContext8.skipSdkQuery);
402
+ shouldSkipSubmitPayInSDK = !((_this$paymentContext10 = this.paymentContext) !== null && _this$paymentContext10 !== void 0 && (_this$paymentContext10 = _this$paymentContext10.paymentSessionObj) !== null && _this$paymentContext10 !== void 0 && (_this$paymentContext10 = _this$paymentContext10.action) !== null && _this$paymentContext10 !== void 0 && _this$paymentContext10.skipSdkQuery);
408
403
  }
409
- _ref5 = submitParams.paymentSessionConfig || {}, _ref5$productSceneVer = _ref5.productSceneVersion, productSceneVersion = _ref5$productSceneVer === void 0 ? '' : _ref5$productSceneVer;
410
- _ref6 = ((_this$paymentContext9 = this.paymentContext) === null || _this$paymentContext9 === void 0 ? void 0 : _this$paymentContext9.paymentSessionObj) || {}, _ref6$action = _ref6.action, _ref6$action2 = _ref6$action === void 0 ? {} : _ref6$action, _ref6$action2$enableS = _ref6$action2.enableSignAgreement, enableSignAgreement = _ref6$action2$enableS === void 0 ? false : _ref6$action2$enableS, _ref6$action2$autoDeb = _ref6$action2.autoDebitWithToken, autoDebitWithToken = _ref6$action2$autoDeb === void 0 ? false : _ref6$action2$autoDeb;
404
+ _ref5 = submitParams.paymentSessionConfig || {}, _ref5$productSceneVer = _ref5.productSceneVersion, productSceneVersion = _ref5$productSceneVer === void 0 ? '' : _ref5$productSceneVer, _ref5$productScene = _ref5.productScene, productScene = _ref5$productScene === void 0 ? '' : _ref5$productScene;
405
+ _ref6 = ((_this$paymentContext11 = this.paymentContext) === null || _this$paymentContext11 === void 0 ? void 0 : _this$paymentContext11.paymentSessionObj) || {}, _ref6$action = _ref6.action, _ref6$action2 = _ref6$action === void 0 ? {} : _ref6$action, _ref6$action2$enableS = _ref6$action2.enableSignAgreement, enableSignAgreement = _ref6$action2$enableS === void 0 ? false : _ref6$action2$enableS, _ref6$action2$autoDeb = _ref6$action2.autoDebitWithToken, autoDebitWithToken = _ref6$action2$autoDeb === void 0 ? false : _ref6$action2$autoDeb;
411
406
  if (productSceneVersion === '2.0' && !autoDebitWithToken) {
412
407
  ///EasyPay 2.0 首次传signAgreement字段
413
408
  submitParams['signAgreement'] = enableSignAgreement;
414
- paymentMethodType = (_this$paymentContext$ = this.paymentContext.paymentSessionObj) === null || _this$paymentContext$ === void 0 || (_this$paymentContext$ = _this$paymentContext$.paymentMethodInfoView) === null || _this$paymentContext$ === void 0 ? void 0 : _this$paymentContext$.paymentMethodType;
415
- isAppWebview = this.paymentContext.startBizFlowOptions.isAppWebview;
416
- if (paymentMethodType == 'ALIPAY_CN' && !isAppWebview) {
417
- backScheme = getBackScheme(undefined, this.logger);
418
- if (backScheme && backScheme !== 'https') {
419
- submitParams['h5FromApp'] = encodeURIComponent(backScheme);
420
- }
421
- }
422
409
  }
423
410
  // 带上标记告知WebCheckOut SDK已发送submitpay请求
424
411
  this.allowSubmitPayCallAhead = !shouldSkipSubmitPayInSDK;
@@ -431,31 +418,31 @@ export var EasySafePayProcessor = /*#__PURE__*/function () {
431
418
  success: true
432
419
  });
433
420
  case 9:
434
- requestBizId = uuid(); // 下面真实发请求
421
+ // 下面真实发请求
435
422
  this.logger.logInfo({
436
423
  title: 'sdk_event_submitPay'
437
424
  }, {
438
425
  paymentSessionConfig: JSON.stringify(submitParams.paymentSessionConfig),
439
- requestBizId: requestBizId
426
+ // TODO: 安全合规考虑
427
+ responseBody: submitParams
440
428
  });
441
429
  // 由渠道定制点来构建额外参数
442
430
  extParams = ((_this$channelBehavior3 = this.channelBehavior) === null || _this$channelBehavior3 === void 0 || (_this$channelBehavior4 = _this$channelBehavior3.buildSubmitPayExtParams) === null || _this$channelBehavior4 === void 0 ? void 0 : _this$channelBehavior4.call(_this$channelBehavior3, {
443
431
  instanceId: this.instanceId,
444
432
  locale: this.initConfig.locale,
445
- paymentMethodType: (_this$paymentContext$2 = this.paymentContext.paymentSessionObj) === null || _this$paymentContext$2 === void 0 || (_this$paymentContext$2 = _this$paymentContext$2.paymentMethodInfoView) === null || _this$paymentContext$2 === void 0 ? void 0 : _this$paymentContext$2.paymentMethodType,
433
+ paymentMethodType: (_this$paymentContext$5 = this.paymentContext.paymentSessionObj) === null || _this$paymentContext$5 === void 0 || (_this$paymentContext$5 = _this$paymentContext$5.paymentMethodInfoView) === null || _this$paymentContext$5 === void 0 ? void 0 : _this$paymentContext$5.paymentMethodType,
446
434
  paymentSessionData: this.paymentContext.paymentSession,
447
435
  env: this.initConfig.environment,
448
436
  sdkVersion: this.paymentContext.sdkMetaData.sdkVersion
449
437
  })) || {};
450
438
  submitParams.extParams = extParams;
451
439
  requester = ServiceProvider.getInstance(this.instanceId).getService('Requester');
452
- _context3.prev = 14;
453
440
  _context3.t0 = requester;
454
441
  _context3.t1 = submitParams;
455
442
  _context3.t2 = this.initConfig.environment;
456
- _context3.next = 20;
443
+ _context3.next = 18;
457
444
  return this.acquireApdidToken();
458
- case 20:
445
+ case 18:
459
446
  _context3.t3 = _context3.sent;
460
447
  _context3.t4 = {
461
448
  deviceId: _context3.t3
@@ -469,35 +456,22 @@ export var EasySafePayProcessor = /*#__PURE__*/function () {
469
456
  needEnvInfo: true,
470
457
  'Operation-Type': 'com.ipay.iexpcashier.cashier.submitPayByPaymentSession'
471
458
  };
472
- _context3.next = 26;
459
+ _context3.next = 24;
473
460
  return _context3.t0.request.call(_context3.t0, _context3.t1, _context3.t6);
474
- case 26:
461
+ case 24:
475
462
  res = _context3.sent;
476
463
  this.logger.logInfo({
477
464
  title: 'sdk_event_submitPayEnd'
478
465
  }, {
479
466
  paymentSessionConfig: JSON.stringify(submitParams.paymentSessionConfig),
480
- requestBizId: requestBizId,
481
- traceId: res.traceId
467
+ responseBody: res
482
468
  });
483
469
  return _context3.abrupt("return", res);
484
- case 31:
485
- _context3.prev = 31;
486
- _context3.t7 = _context3["catch"](14);
487
- this.logger.logError({
488
- title: 'sdk_event_submitPay_failed'
489
- }, {
490
- paymentSessionConfig: JSON.stringify(submitParams.paymentSessionConfig),
491
- errorReason: _context3.t7,
492
- requestBizId: requestBizId,
493
- traceId: _context3.t7 === null || _context3.t7 === void 0 ? void 0 : _context3.t7.traceId
494
- });
495
- throw _context3.t7;
496
- case 35:
470
+ case 27:
497
471
  case "end":
498
472
  return _context3.stop();
499
473
  }
500
- }, _callee3, this, [[14, 31]]);
474
+ }, _callee3, this);
501
475
  }));
502
476
  function processSubmitPay() {
503
477
  return _processSubmitPay.apply(this, arguments);
@@ -508,13 +482,13 @@ export var EasySafePayProcessor = /*#__PURE__*/function () {
508
482
  key: "acquireApdidToken",
509
483
  value: function () {
510
484
  var _acquireApdidToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
511
- var _this$paymentContext$3;
485
+ var _this$paymentContext$6;
512
486
  var securityService, productScene, deviceId;
513
487
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
514
488
  while (1) switch (_context4.prev = _context4.next) {
515
489
  case 0:
516
490
  securityService = ServiceProvider.getInstance(this.instanceId).getService('Security');
517
- productScene = (_this$paymentContext$3 = this.paymentContext.paymentSessionObj) === null || _this$paymentContext$3 === void 0 || (_this$paymentContext$3 = _this$paymentContext$3.paymentSessionConfig) === null || _this$paymentContext$3 === void 0 ? void 0 : _this$paymentContext$3.productScene;
491
+ productScene = (_this$paymentContext$6 = this.paymentContext.paymentSessionObj) === null || _this$paymentContext$6 === void 0 || (_this$paymentContext$6 = _this$paymentContext$6.paymentSessionConfig) === null || _this$paymentContext$6 === void 0 ? void 0 : _this$paymentContext$6.productScene;
518
492
  deviceId = securityService.getDeviceId({
519
493
  productScene: productScene
520
494
  });
@@ -531,66 +505,32 @@ export var EasySafePayProcessor = /*#__PURE__*/function () {
531
505
  return acquireApdidToken;
532
506
  }()
533
507
  }, {
534
- key: "initSecuritySDK",
535
- value: function () {
536
- var _initSecuritySDK = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
537
- var _this$paymentContext$4, productSceneVersion, nonCompliant, isFirstTimeToPay;
538
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
539
- while (1) switch (_context5.prev = _context5.next) {
540
- case 0:
541
- _context5.prev = 0;
542
- productSceneVersion = this.paymentContext.paymentSessionObj.paymentSessionConfig.productSceneVersion;
543
- nonCompliant = (_this$paymentContext$4 = this.paymentContext.paymentSessionObj.action) === null || _this$paymentContext$4 === void 0 ? void 0 : _this$paymentContext$4.nonCompliant;
544
- isFirstTimeToPay = !this.paymentContext.paymentSessionObj.action.autoDebitWithToken;
545
- if (!(productSceneVersion === '1.0')) {
546
- _context5.next = 9;
547
- break;
548
- }
549
- console.log('[web-sdk][security-sdk] skip init security sdk for easypay 1.0');
550
- // 1.0 不初始化 SecuritySDK
551
- return _context5.abrupt("return");
552
- case 9:
553
- if (!(productSceneVersion === '2.0')) {
554
- _context5.next = 20;
555
- break;
556
- }
557
- if (!(nonCompliant === true)) {
558
- _context5.next = 16;
559
- break;
560
- }
561
- // 未切流「隐私合规」
562
- console.log('[web-sdk][security-sdk] init security sdk for easypay 2.0 and nonCompliant is true');
563
- _context5.next = 14;
564
- return this.securityService.initSecurity(this.SECURITY_SDK_INIT_TIMEOUT);
565
- case 14:
566
- _context5.next = 20;
567
- break;
568
- case 16:
569
- if (isFirstTimeToPay) {
570
- _context5.next = 20;
571
- break;
572
- }
573
- // 切流「隐私合规」且非首次支付
574
- console.log('[web-sdk][security-sdk] init security sdk for easypay 2.0 and when not first time to pay');
575
- _context5.next = 20;
576
- return this.securityService.initSecurity(this.SECURITY_SDK_INIT_TIMEOUT);
577
- case 20:
578
- _context5.next = 24;
579
- break;
580
- case 22:
581
- _context5.prev = 22;
582
- _context5.t0 = _context5["catch"](0);
583
- case 24:
584
- case "end":
585
- return _context5.stop();
586
- }
587
- }, _callee5, this, [[0, 22]]);
508
+ key: "savePreviousProductInfo",
509
+ value: function savePreviousProductInfo(info) {
510
+ localStorage.setItem(KEY_PREVIOUS_PRODUCT_INFO, JSON.stringify({
511
+ productSceneVersion: info.productSceneVersion,
512
+ paymentMethodCategoryType: info.paymentMethodCategoryType,
513
+ hostSign: info.hostSign
588
514
  }));
589
- function initSecuritySDK() {
590
- return _initSecuritySDK.apply(this, arguments);
515
+ }
516
+ }, {
517
+ key: "getPreviousProductInfo",
518
+ value: function getPreviousProductInfo() {
519
+ var previousProductInfo = localStorage.getItem(KEY_PREVIOUS_PRODUCT_INFO);
520
+ if (previousProductInfo) {
521
+ try {
522
+ return JSON.parse(previousProductInfo);
523
+ } catch (error) {
524
+ console.log(error);
525
+ this.logger.logError({
526
+ title: 'performance_optimization_get_previousChannel_error'
527
+ }, {
528
+ error: error
529
+ });
530
+ }
591
531
  }
592
- return initSecuritySDK;
593
- }()
532
+ return null;
533
+ }
594
534
  }]);
595
535
  return EasySafePayProcessor;
596
536
  }();
@@ -9,8 +9,8 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
9
9
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
10
10
  import { DisplayTypeEnum } from "../../../types";
11
11
  import { createIframe, createPreloadIframe, startSizeChangeAnim } from "./utils";
12
- import { addInlineLoading, createInlineBaseElement } from "../../../component/component.inline.style";
13
- import { addPopupLoading, createBaseElement } from "../../../component/component.popup.style";
12
+ import { addInlineLoading, createInlineBaseElement } from "../../../plugin/component/component.inline.style";
13
+ import { addPopupLoading, createBaseElement } from "../../../plugin/component/component.popup.style";
14
14
  import { COMPONENT_CLOSE_BLOCK_ID, COMPONENT_CONTAINER_ID, ERRORMESSAGE, LOADING_ID, MOCKUP_ID } from "../../../constant";
15
15
  import { ServiceProvider } from "../index";
16
16
  import { EVENT } from "../../../constant";
@@ -54,9 +54,8 @@ export var ContainerService = /*#__PURE__*/function () {
54
54
  }, {
55
55
  key: "load",
56
56
  value: function load(displayInfo, url, closeBtnFunc) {
57
- var webApp = createIframe('antom-sdk-web-app' + (displayInfo.appendAliasContainerId ? "-".concat(displayInfo.selector) : ''));
58
- this.webApp = webApp;
59
- this.displayInfo = displayInfo;
57
+ console.log('load');
58
+ var webApp = createIframe('antom-sdk-web-app' + (displayInfo.appendAliasContainerId && "-".concat(displayInfo.selector)));
60
59
  webApp.src = url;
61
60
  this.eventCenter.addIFrame(webApp);
62
61
  if (webApp.src.includes('?')) {
@@ -181,6 +180,7 @@ export var ContainerService = /*#__PURE__*/function () {
181
180
  });
182
181
  this.eventCenter.listen(EVENT.popupWindow.name, function (data) {
183
182
  var _this2$displayInfo;
183
+ if (data.paymentElementOldModel) return;
184
184
  _this2.popupManager.popup(_objectSpread({
185
185
  platform: (_this2$displayInfo = _this2.displayInfo) === null || _this2$displayInfo === void 0 ? void 0 : _this2$displayInfo.platform
186
186
  }, data)).catch(function (error) {
@@ -8,7 +8,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
8
8
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9
9
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
10
10
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
11
- import { createModal, destroyModal } from "../../../component/popupWindow.style";
11
+ import { createModal, destroyModal } from "../../../plugin/component/popupWindow.style";
12
12
  import { LOADTIME_LIMIT, POPUP_LOADTIME_LOG_LIMIT } from "../../../constant";
13
13
  /**
14
14
  * @author 谦彧 <zhangmian.zm@alipay.com>