@alipay/ams-checkout 0.0.1720423407-dev.0 → 0.0.1720509876-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.
@@ -1,3 +1,4 @@
1
1
  export declare const marmotMap: Record<string, string>;
2
2
  export declare const marmotConfigMap: Record<string, string>;
3
+ export declare const elementAppMarmotMap: Record<string, string>;
3
4
  export declare const sdkVersion: string;
@@ -22,4 +22,12 @@ export var marmotConfigMap = {
22
22
  light_sandbox: 'https://config.marmot-cloud.com/config/data/antom-sdk-config/en_US.json',
23
23
  prod: 'https://config.marmot-cloud.com/config/data/antom-sdk-config/en_US.json'
24
24
  };
25
+ export var elementAppMarmotMap = {
26
+ dev: 'http://page.alipay.net/page/antom-web-checkout-v2',
27
+ sit: 'http://page.test.alipay.net/page/antom-web-checkout-v2',
28
+ pre: 'https://pre.ac.alipay.com/page/antom-web-checkout-v2',
29
+ sandbox: 'https://ac.alipay.com/page/antom-web-checkout-v2',
30
+ light_sandbox: 'https://ac.alipay.com/page/antom-web-checkout-v2',
31
+ prod: 'https://ac.alipay.com/page/antom-web-checkout-v2'
32
+ };
25
33
  export var sdkVersion = json.version;
@@ -31,7 +31,7 @@ export declare class AMSComponent extends CoreInstance {
31
31
  createComponent(params: IcreateComponent): Promise<void>;
32
32
  private createComponentProcess;
33
33
  preloadComponent(channelType: any, productSceneVersion: any): void;
34
- clearPreloadIframe(isTimeOut?: boolean): void;
34
+ private clearPreloadIframe;
35
35
  /**
36
36
  * @description Create and render components in the specified element area
37
37
  * @param params - The data source created by the component, necessary sessionData, optional appearance configurations, and refer to the documentation for other parameters and detailed information.
@@ -14,6 +14,10 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
14
14
  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; }
15
15
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
16
16
  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); }
17
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
18
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
19
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
20
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
17
21
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
18
22
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
19
23
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -33,7 +37,7 @@ import { ApplePayBusSubscriber } from "../../plugin/applepay";
33
37
  import ComponentApp from "../../plugin/component";
34
38
  import { ExtendPlugin } from "../../plugin/const";
35
39
  import { PaypalBusSubscriber } from "../../plugin/paypal";
36
- import { componentSignEnum, environmentEnum, modeEnum, networkModeEnum, productSceneEnum, renderDisplayTypeEnum } from "../../types";
40
+ import { componentSignEnum, ComponentSignEnumV2, environmentEnum, modeEnum, networkModeEnum, productSceneEnum, renderDisplayTypeEnum } from "../../types";
37
41
  import { getOrSetStorageId, isPC, parseBase64ToString } from "../../util";
38
42
  import { createIframeNode, createPreloadIframeNode } from "../../util/createIframeNode";
39
43
  import { getSecurityConfigStorageKey } from "../../util/security";
@@ -49,7 +53,9 @@ export var getComponentSign = function getComponentSign(params) {
49
53
  productScene = _params$paymentSessio3 === void 0 ? '' : _params$paymentSessio3,
50
54
  _params$paymentSessio4 = _params$paymentSessio2.paymentMethodCategoryType,
51
55
  paymentMethodCategoryType = _params$paymentSessio4 === void 0 ? '' : _params$paymentSessio4;
52
- return productScene && paymentMethodCategoryType ? "".concat(productScene, "_").concat(paymentMethodCategoryType) : componentSignEnum.NONE;
56
+ if (productScene && paymentMethodCategoryType) return "".concat(productScene, "_").concat(paymentMethodCategoryType);
57
+ if (productScene) return "".concat(productScene);
58
+ return componentSignEnum.NONE;
53
59
  };
54
60
  export var parseSessionData = function parseSessionData(sessionData) {
55
61
  try {
@@ -91,6 +97,12 @@ var handleParams = function handleParams(params) {
91
97
  parseData = _handleSessionData2[0],
92
98
  sessionData = _handleSessionData2[1];
93
99
  var componentSign = getComponentSign(parseData);
100
+ if (_toConsumableArray(Object.values(ComponentSignEnumV2)).includes(componentSign) && _params.renderDisplayType === renderDisplayTypeEnum.popup) {
101
+ return Promise.reject({
102
+ code: ERRORMESSAGE.CREATEPAYMENT_PARAMETER_ERROR.code,
103
+ message: "unsupported payment method"
104
+ });
105
+ }
94
106
  if (componentSign === componentSignEnum.NONE) {
95
107
  // eslint-disable-next-line prefer-promise-reject-errors
96
108
  return Promise.reject({
@@ -200,7 +212,6 @@ export var AMSComponent = /*#__PURE__*/function (_CoreInstance) {
200
212
  localStorage.setItem('antom_checkout_previousChannel', JSON.stringify(previousChannel));
201
213
  }
202
214
  }
203
-
204
215
  /**
205
216
  * 初始化 Bus总线的能力
206
217
  */
@@ -262,7 +273,6 @@ export var AMSComponent = /*#__PURE__*/function (_CoreInstance) {
262
273
  }
263
274
  });
264
275
  }
265
-
266
276
  /**
267
277
  * To determine whether the corresponding payment method is available,
268
278
  * only the channel described in the document will be called, and it will be returned as available by default
@@ -302,7 +312,6 @@ export var AMSComponent = /*#__PURE__*/function (_CoreInstance) {
302
312
  }
303
313
  });
304
314
  }
305
-
306
315
  /**
307
316
  * @description Create component application
308
317
  * @param params - The data source created by the component, necessary sessionData, optional appearance configuration, and refer to the documentation for other parameters and detailed information.
@@ -442,7 +451,6 @@ export var AMSComponent = /*#__PURE__*/function (_CoreInstance) {
442
451
  this.savePreviousChannel(iframeNodesParams);
443
452
  return this.pluginAppendIframe(appendParams);
444
453
  }
445
-
446
454
  /**
447
455
  * @description Execute payment submission process
448
456
  * @description - When using your own payment button, you can execute the submit payment process by actively calling this function.
package/esm/index.d.ts CHANGED
@@ -14,9 +14,6 @@ export declare class AMSCheckout extends AMSComponent {
14
14
  export declare class AMSAutoDebit extends AMSCheckout {
15
15
  constructor(options: IoptionsParams);
16
16
  }
17
- export declare class AMSAutoDebitPay extends AMSCheckout {
18
- constructor(options: IoptionsParams);
19
- }
20
17
  export declare class AMSEasyPay extends AMSCheckout {
21
18
  constructor(options: IoptionsParams);
22
19
  }
@@ -26,4 +23,7 @@ export declare class AMSCashierPayment extends AMSCheckout {
26
23
  export declare class AMSVaulting extends AMSCheckout {
27
24
  constructor(options: IoptionsParams);
28
25
  }
26
+ export declare class AMSPaymentElement extends AMSCheckout {
27
+ constructor(options: IoptionsParams);
28
+ }
29
29
  export default AMSCheckout;
package/esm/index.js CHANGED
@@ -49,21 +49,9 @@ export var AMSAutoDebit = /*#__PURE__*/function (_AMSCheckout) {
49
49
  }
50
50
  return _createClass(AMSAutoDebit);
51
51
  }(AMSCheckout);
52
- export var AMSAutoDebitPay = /*#__PURE__*/function (_AMSCheckout2) {
53
- _inherits(AMSAutoDebitPay, _AMSCheckout2);
54
- var _super3 = _createSuper(AMSAutoDebitPay);
55
- function AMSAutoDebitPay(options) {
56
- _classCallCheck(this, AMSAutoDebitPay);
57
- var _options = Object.assign({}, options, {
58
- product: productSceneEnum.AUTO_DEBIT_PAY
59
- });
60
- return _super3.call(this, _options, [componentSignEnum.AUTO_DEBIT_PAY_WALLET]);
61
- }
62
- return _createClass(AMSAutoDebitPay);
63
- }(AMSCheckout);
64
- export var AMSEasyPay = /*#__PURE__*/function (_AMSCheckout3) {
65
- _inherits(AMSEasyPay, _AMSCheckout3);
66
- var _super4 = _createSuper(AMSEasyPay);
52
+ export var AMSEasyPay = /*#__PURE__*/function (_AMSCheckout2) {
53
+ _inherits(AMSEasyPay, _AMSCheckout2);
54
+ var _super3 = _createSuper(AMSEasyPay);
67
55
  function AMSEasyPay(options) {
68
56
  _classCallCheck(this, AMSEasyPay);
69
57
  var _options = Object.assign({}, options, {
@@ -88,13 +76,13 @@ export var AMSEasyPay = /*#__PURE__*/function (_AMSCheckout3) {
88
76
  error: error
89
77
  });
90
78
  }
91
- return _super4.call(this, _options, [componentSignEnum.EASY_PAY_WALLET], currentProductSceneVersion);
79
+ return _super3.call(this, _options, [componentSignEnum.EASY_PAY_WALLET], currentProductSceneVersion);
92
80
  }
93
81
  return _createClass(AMSEasyPay);
94
82
  }(AMSCheckout);
95
- export var AMSCashierPayment = /*#__PURE__*/function (_AMSCheckout4) {
96
- _inherits(AMSCashierPayment, _AMSCheckout4);
97
- var _super5 = _createSuper(AMSCashierPayment);
83
+ export var AMSCashierPayment = /*#__PURE__*/function (_AMSCheckout3) {
84
+ _inherits(AMSCashierPayment, _AMSCheckout3);
85
+ var _super4 = _createSuper(AMSCashierPayment);
98
86
  function AMSCashierPayment(options) {
99
87
  _classCallCheck(this, AMSCashierPayment);
100
88
  var _options = Object.assign({}, options, {
@@ -119,20 +107,32 @@ export var AMSCashierPayment = /*#__PURE__*/function (_AMSCheckout4) {
119
107
  error: error
120
108
  });
121
109
  }
122
- return _super5.call(this, _options, currentChannelType);
110
+ return _super4.call(this, _options, currentChannelType);
123
111
  }
124
112
  return _createClass(AMSCashierPayment);
125
113
  }(AMSCheckout);
126
- export var AMSVaulting = /*#__PURE__*/function (_AMSCheckout5) {
127
- _inherits(AMSVaulting, _AMSCheckout5);
128
- var _super6 = _createSuper(AMSVaulting);
114
+ export var AMSVaulting = /*#__PURE__*/function (_AMSCheckout4) {
115
+ _inherits(AMSVaulting, _AMSCheckout4);
116
+ var _super5 = _createSuper(AMSVaulting);
129
117
  function AMSVaulting(options) {
130
118
  _classCallCheck(this, AMSVaulting);
131
119
  var _options = Object.assign({}, options, {
132
120
  product: productSceneEnum.VAULTING
133
121
  });
134
- return _super6.call(this, _options, [componentSignEnum.CASHIER_PAYMENT_CARD]);
122
+ return _super5.call(this, _options, [componentSignEnum.CASHIER_PAYMENT_CARD]);
135
123
  }
136
124
  return _createClass(AMSVaulting);
137
125
  }(AMSCheckout);
126
+ export var AMSPaymentElement = /*#__PURE__*/function (_AMSCheckout5) {
127
+ _inherits(AMSPaymentElement, _AMSCheckout5);
128
+ var _super6 = _createSuper(AMSPaymentElement);
129
+ function AMSPaymentElement(options) {
130
+ _classCallCheck(this, AMSPaymentElement);
131
+ var _options = Object.assign({}, options, {
132
+ product: productSceneEnum.ELEMENT_PAYMENT
133
+ });
134
+ return _super6.call(this, _options, [componentSignEnum.ELEMENT_PAYMENT]);
135
+ }
136
+ return _createClass(AMSPaymentElement);
137
+ }(AMSCheckout);
138
138
  export default AMSCheckout;
@@ -16,13 +16,13 @@ export declare const getIframeUrl: (iframeParams: {
16
16
  productSceneVersion: string;
17
17
  environment: string;
18
18
  appVersion: string;
19
- extendInfo: string;
20
- locale: string;
19
+ extendInfo?: string;
20
+ locale?: string;
21
21
  instanceId: string;
22
22
  renderDisplayType: renderDisplayTypeEnum;
23
23
  isPreload?: string;
24
24
  hostSign?: string;
25
- mid: string;
25
+ mid?: string;
26
26
  }) => {
27
27
  path: string;
28
28
  locationSearch: string;
@@ -1,4 +1,10 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
3
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
5
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
6
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
7
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
2
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; }
3
9
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
4
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); }
@@ -9,8 +15,8 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
9
15
  * 1. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE; and
10
16
  * 2. If applicable, the use of the Software is also subject to the terms and conditions of any non-disclosure agreement signed by you and the relevant Ant Group entity.
11
17
  */
12
- import { marmotMap, sdkVersion } from "../../config/index";
13
- import { componentSignEnum } from "../../types";
18
+ import { marmotMap, sdkVersion, elementAppMarmotMap } from "../../config/index";
19
+ import { componentSignEnum, ComponentSignEnumV2 } from "../../types";
14
20
  import { isDebugLog } from "../../util/debug";
15
21
  import { queryParse, serialize } from "../../util/index";
16
22
  import { Logger } from "../../util/logger";
@@ -52,7 +58,7 @@ var getAppVersion = function getAppVersion(_extendInfo, productScene, mid) {
52
58
  }
53
59
  };
54
60
  var getFinalProductSceneVersion = function getFinalProductSceneVersion(componentSign, productSceneVersion) {
55
- var signSupportMap = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, componentSignEnum.NONE, ['']), componentSignEnum.AUTO_DEBIT_WALLET, ['1.0']), componentSignEnum.AUTO_DEBIT_PAY_WALLET, ['']), componentSignEnum.CASHIER_PAYMENT_BANK, ['1.0']), componentSignEnum.CASHIER_PAYMENT_CARD, ['1.0']), componentSignEnum.CASHIER_PAYMENT_APM, ['1.0']), componentSignEnum.EASY_PAY_WALLET, ['1.0', '2.0']), componentSignEnum.EASY_PAY_APM, ['2.0']), componentSignEnum.VAULTING_CARD, ['1.0']);
61
+ var signSupportMap = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, componentSignEnum.NONE, ['']), componentSignEnum.AUTO_DEBIT_WALLET, ['1.0']), componentSignEnum.CASHIER_PAYMENT_BANK, ['1.0']), componentSignEnum.CASHIER_PAYMENT_CARD, ['1.0']), componentSignEnum.CASHIER_PAYMENT_APM, ['1.0']), componentSignEnum.EASY_PAY_WALLET, ['1.0', '2.0']), componentSignEnum.EASY_PAY_APM, ['2.0']), componentSignEnum.VAULTING_CARD, ['1.0']), componentSignEnum.ELEMENT_PAYMENT, ['1.0']);
56
62
  var supportProductSceneVersion = signSupportMap[componentSign];
57
63
  // 从左到右,从旧到新
58
64
  var isSupport = supportProductSceneVersion.find(function (it) {
@@ -90,6 +96,10 @@ export var getAppPath = function getAppPath() {
90
96
  if (urlTestHost && !['sandbox', 'light_sandbox', 'prod'].includes(environment)) {
91
97
  return urlTestHost;
92
98
  }
99
+ // element应用特殊处理
100
+ if (_toConsumableArray(Object.values(ComponentSignEnumV2)).includes(componentSign)) {
101
+ return "".concat(elementAppMarmotMap[environment], "/elements/").concat(finalAppVersion, "/pages/").concat(productScene, "/index.html");
102
+ }
93
103
  return "".concat(marmotMap[environment], "/").concat(componentSign, "/").concat(finalProductSceneVersion, "/index.").concat(finalAppVersion, ".html");
94
104
  };
95
105
  export var getAppDomain = function getAppDomain(domainParams) {
@@ -13,3 +13,4 @@ export declare const addPopupLoading: () => void;
13
13
  export declare const handleDeclareInfo: ({ closeDialogData }: {
14
14
  closeDialogData: any;
15
15
  }) => void;
16
+ export declare const slideInAndOutKeyframes: (id: any, height: any) => string;
@@ -168,4 +168,7 @@ export var handleDeclareInfo = function handleDeclareInfo(_ref) {
168
168
  } catch (error) {
169
169
  console.error(error);
170
170
  }
171
+ };
172
+ export var slideInAndOutKeyframes = function slideInAndOutKeyframes(id, height) {
173
+ return "@keyframes ".concat(id, "-slide-in {\n 0% {\n height: 1px;\n }\n 100% {\n height: ").concat(height, "px;\n }\n }\n @keyframes ").concat(id, "-slide-out {\n 0% {\n height: ").concat(height, "px;\n opacity: 1;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n height: 1px;\n opacity: 0;\n }\n }");
171
174
  };
@@ -27,7 +27,8 @@ import { matchVersion } from "../../util/versionCompare";
27
27
  import { createIframe, createPreloadIframe, getAppDomain, getIframeUrl } from "./cashierApp";
28
28
  import { getChannelBehavior } from "./channel";
29
29
  import { addInlineLoading, createInlineBaseElement } from "./component.inline.style";
30
- import { addPopupLoading, createBaseElement, createMockup, createRetentionPopup, handleDeclareInfo as _handleDeclareInfo, hideRetentionPopup, removeRetentionPopup as _removeRetentionPopup } from "./component.popup.style";
30
+ import { addPopupLoading, createBaseElement, createMockup, createRetentionPopup, handleDeclareInfo as _handleDeclareInfo, hideRetentionPopup, removeRetentionPopup as _removeRetentionPopup, slideInAndOutKeyframes } from "./component.popup.style";
31
+ import { handlePaymentSessionConfig } from "../payment-element/utils";
31
32
  import { createModal, destroyModal, insertStyleSheet } from "./popupWindow.style";
32
33
  window.changingPageHeight = window.innerHeight;
33
34
  var ComponentApp = /*#__PURE__*/function () {
@@ -57,7 +58,7 @@ var ComponentApp = /*#__PURE__*/function () {
57
58
  _defineProperty(this, "_multipleCallbackEvents", void 0);
58
59
  _defineProperty(this, "_merchantAppointParam", void 0);
59
60
  _defineProperty(this, "_webAppHeartBeatTimeoutFn", void 0);
60
- this._appVersion = '1.18.0';
61
+ this._appVersion = '1.20.0';
61
62
  this._isInitComponent = false;
62
63
  this._selector = "#".concat(COMPONENT_SECTION_ID);
63
64
  this.createIframeNode = function () {
@@ -314,18 +315,6 @@ var ComponentApp = /*#__PURE__*/function () {
314
315
  return;
315
316
  }
316
317
  }
317
- if (componentSignEnum.AUTO_DEBIT_PAY_WALLET === this._componentSign) {
318
- if (requireFastSdk === true && productSceneVersion === '1.0') {
319
- // REDIRECT,requireFastSdk为true,不需要接口请求
320
- this.handleAuthUrlInfo(authUrlInfo);
321
- return;
322
- } else {
323
- return Promise.reject({
324
- code: ERRORMESSAGE.CREATEPAYMENT_PARAMETER_ERROR.code,
325
- message: "Abnormal response data, interface failure, or unsupported payment method."
326
- });
327
- }
328
- }
329
318
  this.dispatchToSDK(EVENT.eventCallback.name, {
330
319
  code: eventCodeEnum.SDK_START_OF_LOADING
331
320
  });
@@ -426,9 +415,7 @@ var ComponentApp = /*#__PURE__*/function () {
426
415
  }, {
427
416
  key: "createActionQueryPromise",
428
417
  value: function createActionQueryPromise() {
429
- var _this$_renderParams11,
430
- _this5 = this;
431
- var paymentMethodType = (_this$_renderParams11 = this._renderParams) === null || _this$_renderParams11 === void 0 || (_this$_renderParams11 = _this$_renderParams11.paymentSessionMetaData) === null || _this$_renderParams11 === void 0 || (_this$_renderParams11 = _this$_renderParams11.paymentMethodInfoView) === null || _this$_renderParams11 === void 0 ? void 0 : _this$_renderParams11.paymentMethodType;
418
+ var _this5 = this;
432
419
  this._performanceData.push({
433
420
  key: 'sdk_action_query_start',
434
421
  value: Date.now()
@@ -438,7 +425,7 @@ var ComponentApp = /*#__PURE__*/function () {
438
425
  this._actionQueryPromise = new Promise( /*#__PURE__*/function () {
439
426
  var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(resolve, reject) {
440
427
  var _this5$_renderParams, _this5$_renderParams2, _this5$_renderParams3, _this5$_renderParams4, _this5$_renderParams5, _this5$_renderParams6;
441
- var envInfo, params, _ref6, _ref6$extendInfo, extendInfo, actionData, enableVaultingApiOptimize, enableEasypayApiOptimize, _ref7, skipSdkQuery, skipSdkQueryForm, extendInfoData, ifSkip, channelBehavior, _this5$_renderParams7, _this5$_renderParams8, _ref8, _ref8$productSceneVer, productSceneVersion, _ref8$productScene, productScene, _ref9, _ref9$action, _ref9$action2, _ref9$action2$autoDeb, autoDebitWithToken, _this5$_renderParams9, _action$web2, _action$wap2, action, signType;
428
+ var envInfo, params, _ref6, _ref6$extendInfo, extendInfo, actionData, enableVaultingApiOptimize, enableEasypayApiOptimize, _ref7, skipSdkQuery, skipSdkQueryForm, extendInfoData, ifSkip, channelBehavior, _this5$_renderParams7, _ref8, _ref8$productSceneVer, productSceneVersion, _ref8$productScene, productScene, _this5$_renderParams8, _action$web2, _action$wap2, action, signType;
442
429
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
443
430
  while (1) switch (_context2.prev = _context2.next) {
444
431
  case 0:
@@ -474,22 +461,28 @@ var ComponentApp = /*#__PURE__*/function () {
474
461
  success: true
475
462
  }));
476
463
  case 9:
464
+ if (componentSignEnum.ELEMENT_PAYMENT === _this5._componentSign) {
465
+ params.paymentSessionConfig = handlePaymentSessionConfig(params.paymentSessionConfig);
466
+ }
467
+
468
+ // 绑卡跳过actionQuery接口
469
+ // 目前只有绑卡加上 skipSdkQueryForm 判断
477
470
  if (!(componentSignEnum.VAULTING_CARD === _this5._componentSign)) {
478
- _context2.next = 21;
471
+ _context2.next = 22;
479
472
  break;
480
473
  }
481
474
  if (!enableVaultingApiOptimize) {
482
- _context2.next = 21;
475
+ _context2.next = 22;
483
476
  break;
484
477
  }
485
478
  if (!skipSdkQueryForm) {
486
- _context2.next = 18;
479
+ _context2.next = 19;
487
480
  break;
488
481
  }
489
482
  // 优先判断 skipSdkQueryForm
490
483
  ifSkip = matchVersion(skipSdkQueryForm, _this5._appVersion);
491
484
  if (!ifSkip) {
492
- _context2.next = 16;
485
+ _context2.next = 17;
493
486
  break;
494
487
  }
495
488
  resolve({
@@ -497,12 +490,12 @@ var ComponentApp = /*#__PURE__*/function () {
497
490
  success: true
498
491
  });
499
492
  return _context2.abrupt("return");
500
- case 16:
501
- _context2.next = 21;
493
+ case 17:
494
+ _context2.next = 22;
502
495
  break;
503
- case 18:
496
+ case 19:
504
497
  if (!skipSdkQuery) {
505
- _context2.next = 21;
498
+ _context2.next = 22;
506
499
  break;
507
500
  }
508
501
  resolve({
@@ -510,10 +503,10 @@ var ComponentApp = /*#__PURE__*/function () {
510
503
  success: true
511
504
  });
512
505
  return _context2.abrupt("return");
513
- case 21:
506
+ case 22:
514
507
  channelBehavior = getChannelBehavior((_this5$_renderParams6 = _this5._renderParams) === null || _this5$_renderParams6 === void 0 ? void 0 : _this5$_renderParams6.paymentSessionMetaData); // Easypay TOSS 渠道无需actionQuery
515
508
  if (!(channelBehavior !== null && channelBehavior !== void 0 && channelBehavior.usePaymentSessionAsQueryResult)) {
516
- _context2.next = 24;
509
+ _context2.next = 25;
517
510
  break;
518
511
  }
519
512
  return _context2.abrupt("return", resolve({
@@ -521,29 +514,28 @@ var ComponentApp = /*#__PURE__*/function () {
521
514
  amountConfirmRequired: actionData === null || actionData === void 0 ? void 0 : actionData.amountConfirmRequired,
522
515
  success: true
523
516
  }));
524
- case 24:
517
+ case 25:
525
518
  if (!(componentSignEnum.CASHIER_PAYMENT_CARD === _this5._componentSign || componentSignEnum.VAULTING_CARD === _this5._componentSign)) {
526
- _context2.next = 30;
519
+ _context2.next = 31;
527
520
  break;
528
521
  }
529
522
  params.paymentMethodType = 'CARD';
530
- _context2.next = 28;
523
+ _context2.next = 29;
531
524
  return _this5.getDeviceIdAndLog();
532
- case 28:
525
+ case 29:
533
526
  envInfo.deviceId = _context2.sent;
534
527
  if (window.navigator.userAgent.indexOf('miniProgram') > -1) {
535
528
  envInfo.extendInfo = {
536
529
  WAP_SUB_TYPE: 'WECHAT_MINI_PROGRAM'
537
530
  };
538
531
  }
539
- case 30:
532
+ case 31:
540
533
  if (!(componentSignEnum.EASY_PAY_WALLET === _this5._componentSign)) {
541
534
  _context2.next = 40;
542
535
  break;
543
536
  }
544
537
  _ref8 = params.paymentSessionConfig || {}, _ref8$productSceneVer = _ref8.productSceneVersion, productSceneVersion = _ref8$productSceneVer === void 0 ? '' : _ref8$productSceneVer, _ref8$productScene = _ref8.productScene, productScene = _ref8$productScene === void 0 ? '' : _ref8$productScene;
545
- _ref9 = ((_this5$_renderParams7 = _this5._renderParams) === null || _this5$_renderParams7 === void 0 ? void 0 : _this5$_renderParams7.paymentSessionMetaData) || {}, _ref9$action = _ref9.action, _ref9$action2 = _ref9$action === void 0 ? {} : _ref9$action, _ref9$action2$autoDeb = _ref9$action2.autoDebitWithToken, autoDebitWithToken = _ref9$action2$autoDeb === void 0 ? false : _ref9$action2$autoDeb;
546
- if (!((_this5$_renderParams8 = _this5._renderParams) !== null && _this5$_renderParams8 !== void 0 && (_this5$_renderParams8 = _this5$_renderParams8.paymentSessionMetaData) !== null && _this5$_renderParams8 !== void 0 && (_this5$_renderParams8 = _this5$_renderParams8.action) !== null && _this5$_renderParams8 !== void 0 && _this5$_renderParams8.skipSdkQuery && enableEasypayApiOptimize)) {
538
+ if (!((_this5$_renderParams7 = _this5._renderParams) !== null && _this5$_renderParams7 !== void 0 && (_this5$_renderParams7 = _this5$_renderParams7.paymentSessionMetaData) !== null && _this5$_renderParams7 !== void 0 && (_this5$_renderParams7 = _this5$_renderParams7.action) !== null && _this5$_renderParams7 !== void 0 && _this5$_renderParams7.skipSdkQuery && enableEasypayApiOptimize)) {
547
539
  _context2.next = 35;
548
540
  break;
549
541
  }
@@ -570,7 +562,7 @@ var ComponentApp = /*#__PURE__*/function () {
570
562
  _context2.next = 50;
571
563
  break;
572
564
  }
573
- action = ((_this5$_renderParams9 = _this5._renderParams) === null || _this5$_renderParams9 === void 0 || (_this5$_renderParams9 = _this5$_renderParams9.paymentSessionMetaData) === null || _this5$_renderParams9 === void 0 ? void 0 : _this5$_renderParams9.action) || {};
565
+ action = ((_this5$_renderParams8 = _this5._renderParams) === null || _this5$_renderParams8 === void 0 || (_this5$_renderParams8 = _this5$_renderParams8.paymentSessionMetaData) === null || _this5$_renderParams8 === void 0 ? void 0 : _this5$_renderParams8.action) || {};
574
566
  signType = isPC() ? action === null || action === void 0 || (_action$web2 = action.web) === null || _action$web2 === void 0 ? void 0 : _action$web2.signType : action === null || action === void 0 || (_action$wap2 = action.wap) === null || _action$wap2 === void 0 ? void 0 : _action$wap2.signType;
575
567
  if (!(signType === 'SMS')) {
576
568
  _context2.next = 45;
@@ -649,24 +641,24 @@ var ComponentApp = /*#__PURE__*/function () {
649
641
  }, {
650
642
  key: "createSubmitPromise",
651
643
  value: function createSubmitPromise() {
652
- var _this$_renderParams12,
644
+ var _this$_renderParams11,
645
+ _this$_renderParams12,
653
646
  _this$_renderParams13,
654
- _this$_renderParams14,
655
647
  _this6 = this;
656
648
  this._performanceData.push({
657
649
  key: 'sdk_submit_start',
658
650
  value: Date.now()
659
651
  });
660
652
  var params = {
661
- paymentSessionData: this._renderParams && ((_this$_renderParams12 = this._renderParams) === null || _this$_renderParams12 === void 0 ? void 0 : _this$_renderParams12.sessionData) || '',
662
- paymentSessionConfig: (_this$_renderParams13 = this._renderParams) === null || _this$_renderParams13 === void 0 || (_this$_renderParams13 = _this$_renderParams13.paymentSessionMetaData) === null || _this$_renderParams13 === void 0 ? void 0 : _this$_renderParams13.paymentSessionConfig
653
+ paymentSessionData: this._renderParams && ((_this$_renderParams11 = this._renderParams) === null || _this$_renderParams11 === void 0 ? void 0 : _this$_renderParams11.sessionData) || '',
654
+ paymentSessionConfig: (_this$_renderParams12 = this._renderParams) === null || _this$_renderParams12 === void 0 || (_this$_renderParams12 = _this$_renderParams12.paymentSessionMetaData) === null || _this$_renderParams12 === void 0 ? void 0 : _this$_renderParams12.paymentSessionConfig
663
655
  };
664
- var channelBehavior = getChannelBehavior((_this$_renderParams14 = this._renderParams) === null || _this$_renderParams14 === void 0 ? void 0 : _this$_renderParams14.paymentSessionMetaData);
656
+ var channelBehavior = getChannelBehavior((_this$_renderParams13 = this._renderParams) === null || _this$_renderParams13 === void 0 ? void 0 : _this$_renderParams13.paymentSessionMetaData);
665
657
  // eslint-disable-next-line no-async-promise-executor
666
658
  this._actionSubmitPromise = new Promise( /*#__PURE__*/function () {
667
- var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(resolve) {
659
+ var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(resolve) {
668
660
  var _channelBehavior$buil, _this6$_renderParams$;
669
- 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;
661
+ var shouldSkipSubmitPayInSDK, _this6$_renderParams, _this6$_renderParams2, _ref10, _ref10$productSceneVe, productSceneVersion, _ref10$productScene, productScene, _ref11, _ref11$action, _ref11$action2, _ref11$action2$enable, enableSignAgreement, _ref11$action2$autoDe, autoDebitWithToken, extParams;
670
662
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
671
663
  while (1) switch (_context3.prev = _context3.next) {
672
664
  case 0:
@@ -678,8 +670,8 @@ var ComponentApp = /*#__PURE__*/function () {
678
670
  shouldSkipSubmitPayInSDK = !((_this6$_renderParams = _this6._renderParams) !== null && _this6$_renderParams !== void 0 && (_this6$_renderParams = _this6$_renderParams.paymentSessionMetaData) !== null && _this6$_renderParams !== void 0 && (_this6$_renderParams = _this6$_renderParams.action) !== null && _this6$_renderParams !== void 0 && _this6$_renderParams.skipSdkQuery) || componentSignEnum.EASY_PAY_WALLET !== _this6._componentSign;
679
671
  }
680
672
  if (componentSignEnum.EASY_PAY_WALLET === _this6._componentSign) {
681
- _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;
682
- _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;
673
+ _ref10 = params.paymentSessionConfig || {}, _ref10$productSceneVe = _ref10.productSceneVersion, productSceneVersion = _ref10$productSceneVe === void 0 ? '' : _ref10$productSceneVe, _ref10$productScene = _ref10.productScene, productScene = _ref10$productScene === void 0 ? '' : _ref10$productScene;
674
+ _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;
683
675
  if (productScene === productSceneEnum.EASY_PAY && productSceneVersion === '2.0' && !autoDebitWithToken) {
684
676
  ///EasyPay 2.0 首次传signAgreement字段
685
677
  params['signAgreement'] = enableSignAgreement;
@@ -757,7 +749,7 @@ var ComponentApp = /*#__PURE__*/function () {
757
749
  }, _callee3);
758
750
  }));
759
751
  return function (_x3) {
760
- return _ref10.apply(this, arguments);
752
+ return _ref9.apply(this, arguments);
761
753
  };
762
754
  }());
763
755
  }
@@ -807,13 +799,9 @@ var ComponentApp = /*#__PURE__*/function () {
807
799
  productScene: componentSign,
808
800
  productSceneVersion: productSceneVersion,
809
801
  environment: this.AMSSDK.options.env.environment,
810
- // TODO 确定一下这个参数是干啥的
811
802
  appVersion: this._appVersion,
812
- extendInfo: '',
813
- locale: '',
814
803
  instanceId: '',
815
- isPreload: 'true',
816
- mid: ''
804
+ isPreload: 'true'
817
805
  }),
818
806
  path = _getIframeUrl.path,
819
807
  locationSearch = _getIframeUrl.locationSearch;
@@ -1256,9 +1244,8 @@ var ComponentApp = /*#__PURE__*/function () {
1256
1244
 
1257
1245
  // 此style用于弹窗出现和高度变化时动画,动画不同,属性不同
1258
1246
  this.app.style.height = parseInt(this.app.style.height) > 0 ? '100%' : "".concat(data.context.data.height, "px");
1259
-
1260
1247
  // 弹出和弹入动画
1261
- var runkeyframes = "@keyframes ".concat(COMPONENT_CONTAINER_ID, "-slide-in {\n 0% {\n height: 1px;\n }\n 100% {\n height: ").concat(data.context.data.height, "px;\n }\n }\n @keyframes ").concat(COMPONENT_CONTAINER_ID, "-slide-out {\n 0% {\n height: ").concat(data.context.data.height, "px;\n opacity: 1;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n height: 1px;\n opacity: 0;\n }\n }");
1248
+ var runkeyframes = slideInAndOutKeyframes(COMPONENT_CONTAINER_ID, data.context.data.height);
1262
1249
  // 创建style标签
1263
1250
  var style = document.createElement('style');
1264
1251
  style.id = animationStyleId;
@@ -1268,7 +1255,6 @@ var ComponentApp = /*#__PURE__*/function () {
1268
1255
  style.innerHTML = runkeyframes;
1269
1256
  // 将style样式存放到head标签
1270
1257
  document.getElementsByTagName('head')[0].appendChild(style);
1271
-
1272
1258
  // size变动时动画
1273
1259
  setTimeout(function () {
1274
1260
  cashier.style.transition = 'height 0.28s ease-in-out';
@@ -1388,9 +1374,9 @@ var ComponentApp = /*#__PURE__*/function () {
1388
1374
  }
1389
1375
  }, {
1390
1376
  key: "handleDeclareInfo",
1391
- value: function handleDeclareInfo(_ref13) {
1392
- var _ref13$closeDialogDat = _ref13.closeDialogData,
1393
- closeDialogData = _ref13$closeDialogDat === void 0 ? {} : _ref13$closeDialogDat;
1377
+ value: function handleDeclareInfo(_ref12) {
1378
+ var _ref12$closeDialogDat = _ref12.closeDialogData,
1379
+ closeDialogData = _ref12$closeDialogDat === void 0 ? {} : _ref12$closeDialogDat;
1394
1380
  _handleDeclareInfo({
1395
1381
  closeDialogData: closeDialogData
1396
1382
  });
@@ -1531,7 +1517,7 @@ var ComponentApp = /*#__PURE__*/function () {
1531
1517
  key: "sendRenderEvent",
1532
1518
  value: (function () {
1533
1519
  var _sendRenderEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
1534
- var _this$_renderParams15, _this$_renderParams16, _this$_renderParams17, _this$_renderParams18, _this$_renderParams19, _this$_renderParams20, _this$AMSSDK$logger, _this$_renderParams21, _this$_renderParams22, _this$_renderParams23, _this$AMSSDK, _this$_renderParams24, res, submitRes;
1520
+ var _this$_renderParams14, _this$_renderParams15, _this$_renderParams16, _this$_renderParams17, _this$_renderParams18, _this$_renderParams19, _this$AMSSDK$logger, _this$_renderParams20, _this$_renderParams21, _this$_renderParams22, _this$AMSSDK, _this$_renderParams23, res, submitRes;
1535
1521
  return _regeneratorRuntime().wrap(function _callee8$(_context8) {
1536
1522
  while (1) switch (_context8.prev = _context8.next) {
1537
1523
  case 0:
@@ -1560,12 +1546,12 @@ var ComponentApp = /*#__PURE__*/function () {
1560
1546
  data: {
1561
1547
  queryResult: res,
1562
1548
  submitResult: submitRes,
1563
- sessionResult: (_this$_renderParams15 = this._renderParams) === null || _this$_renderParams15 === void 0 ? void 0 : _this$_renderParams15.paymentSessionMetaData,
1564
- paymentSessionData: (_this$_renderParams16 = this._renderParams) === null || _this$_renderParams16 === void 0 ? void 0 : _this$_renderParams16.sessionData,
1549
+ sessionResult: (_this$_renderParams14 = this._renderParams) === null || _this$_renderParams14 === void 0 ? void 0 : _this$_renderParams14.paymentSessionMetaData,
1550
+ paymentSessionData: (_this$_renderParams15 = this._renderParams) === null || _this$_renderParams15 === void 0 ? void 0 : _this$_renderParams15.sessionData,
1565
1551
  heightOfVisible: Math.max(window.changingPageHeight, window.innerHeight),
1566
- renderDisplayType: (_this$_renderParams17 = this._renderParams) === null || _this$_renderParams17 === void 0 ? void 0 : _this$_renderParams17.renderDisplayType,
1567
- appearance: (_this$_renderParams18 = this._renderParams) === null || _this$_renderParams18 === void 0 ? void 0 : _this$_renderParams18.appearance,
1568
- notRedirectAfterComplete: ((_this$_renderParams19 = this._renderParams) === null || _this$_renderParams19 === void 0 ? void 0 : _this$_renderParams19.notRedirectAfterComplete) === true,
1552
+ renderDisplayType: (_this$_renderParams16 = this._renderParams) === null || _this$_renderParams16 === void 0 ? void 0 : _this$_renderParams16.renderDisplayType,
1553
+ appearance: (_this$_renderParams17 = this._renderParams) === null || _this$_renderParams17 === void 0 ? void 0 : _this$_renderParams17.appearance,
1554
+ notRedirectAfterComplete: ((_this$_renderParams18 = this._renderParams) === null || _this$_renderParams18 === void 0 ? void 0 : _this$_renderParams18.notRedirectAfterComplete) === true,
1569
1555
  merchantAppointParam: this._merchantAppointParam,
1570
1556
  allowSubmitPayCallAhead: this._allowSubmitPayCallAhead,
1571
1557
  envInfo: {
@@ -1573,16 +1559,16 @@ var ComponentApp = /*#__PURE__*/function () {
1573
1559
  screenWidth: screen.width
1574
1560
  },
1575
1561
  logMetaData: _objectSpread(_objectSpread({
1576
- trackId: (_this$_renderParams20 = this._renderParams) === null || _this$_renderParams20 === void 0 ? void 0 : _this$_renderParams20.sessionData,
1562
+ trackId: (_this$_renderParams19 = this._renderParams) === null || _this$_renderParams19 === void 0 ? void 0 : _this$_renderParams19.sessionData,
1577
1563
  platform: this.platform,
1578
1564
  firstLogTime: (_this$AMSSDK$logger = this.AMSSDK.logger) === null || _this$AMSSDK$logger === void 0 ? void 0 : _this$AMSSDK$logger.getComponentStartTime()
1579
- }, ((_this$_renderParams21 = this._renderParams) === null || _this$_renderParams21 === void 0 || (_this$_renderParams21 = _this$_renderParams21.paymentSessionMetaData) === null || _this$_renderParams21 === void 0 ? void 0 : _this$_renderParams21.paymentSessionConfig) || {}), {}, {
1580
- renderDisplayType: (_this$_renderParams22 = this._renderParams) === null || _this$_renderParams22 === void 0 ? void 0 : _this$_renderParams22.renderDisplayType,
1565
+ }, ((_this$_renderParams20 = this._renderParams) === null || _this$_renderParams20 === void 0 || (_this$_renderParams20 = _this$_renderParams20.paymentSessionMetaData) === null || _this$_renderParams20 === void 0 ? void 0 : _this$_renderParams20.paymentSessionConfig) || {}), {}, {
1566
+ renderDisplayType: (_this$_renderParams21 = this._renderParams) === null || _this$_renderParams21 === void 0 ? void 0 : _this$_renderParams21.renderDisplayType,
1581
1567
  sdkVersion: this._appVersion,
1582
- merchantId: (_this$_renderParams23 = this._renderParams) === null || _this$_renderParams23 === void 0 || (_this$_renderParams23 = _this$_renderParams23.paymentSessionMetaData) === null || _this$_renderParams23 === void 0 ? void 0 : _this$_renderParams23.clientId,
1568
+ merchantId: (_this$_renderParams22 = this._renderParams) === null || _this$_renderParams22 === void 0 || (_this$_renderParams22 = _this$_renderParams22.paymentSessionMetaData) === null || _this$_renderParams22 === void 0 ? void 0 : _this$_renderParams22.clientId,
1583
1569
  instanceId: (_this$AMSSDK = this.AMSSDK) === null || _this$AMSSDK === void 0 ? void 0 : _this$AMSSDK._instanceId,
1584
1570
  performanceData: this._performanceData,
1585
- paymentMethodType: (_this$_renderParams24 = this._renderParams) === null || _this$_renderParams24 === void 0 || (_this$_renderParams24 = _this$_renderParams24.paymentSessionMetaData) === null || _this$_renderParams24 === void 0 || (_this$_renderParams24 = _this$_renderParams24.paymentMethodInfoView) === null || _this$_renderParams24 === void 0 ? void 0 : _this$_renderParams24.paymentMethodType
1571
+ paymentMethodType: (_this$_renderParams23 = this._renderParams) === null || _this$_renderParams23 === void 0 || (_this$_renderParams23 = _this$_renderParams23.paymentSessionMetaData) === null || _this$_renderParams23 === void 0 || (_this$_renderParams23 = _this$_renderParams23.paymentMethodInfoView) === null || _this$_renderParams23 === void 0 ? void 0 : _this$_renderParams23.paymentMethodType
1586
1572
  })
1587
1573
  }
1588
1574
  }
@@ -0,0 +1,2 @@
1
+ import type { IpaymentSessionConfig } from '../../types';
2
+ export declare const handlePaymentSessionConfig: (config: IpaymentSessionConfig) => Pick<IpaymentSessionConfig, 'productScene' | 'productSceneVersion'>;
@@ -0,0 +1,6 @@
1
+ export var handlePaymentSessionConfig = function handlePaymentSessionConfig(config) {
2
+ return {
3
+ productScene: config === null || config === void 0 ? void 0 : config.productScene,
4
+ productSceneVersion: config === null || config === void 0 ? void 0 : config.productSceneVersion
5
+ };
6
+ };
@@ -380,6 +380,7 @@ export var PaypalBusSubscriber = /*#__PURE__*/function (_BusSubscriber) {
380
380
  break;
381
381
  case PaypalActionEnum.destroyComponent:
382
382
  this.destroyComponent(context, message);
383
+ break;
383
384
  default:
384
385
  console.log('Unknown action: ' + message.getAction());
385
386
  }