@alipay/ams-checkout 0.0.1726734012-dev.1 → 0.0.1726734012-dev.10

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 (145) hide show
  1. package/dist/umd/ams-checkout.min.js +1 -1
  2. package/esm/component/channel.d.ts +19 -0
  3. package/esm/component/channel.js +87 -0
  4. package/esm/component/component.inline.style.d.ts +10 -0
  5. package/esm/component/component.inline.style.js +121 -0
  6. package/esm/component/component.popup.style.d.ts +25 -0
  7. package/esm/component/component.popup.style.js +203 -0
  8. package/esm/component/popupWindow.style.d.ts +11 -0
  9. package/esm/component/popupWindow.style.js +121 -0
  10. package/esm/config/index.d.ts +11 -0
  11. package/esm/config/index.js +20 -1
  12. package/esm/constant/index.d.ts +25 -0
  13. package/esm/constant/index.js +28 -0
  14. package/esm/core/bus/index.d.ts +3 -3
  15. package/esm/core/bus/index.js +14 -14
  16. package/esm/core/component/address.d.ts +8 -0
  17. package/esm/core/component/address.js +72 -0
  18. package/esm/core/component/appPreloadProcessing.js +2 -2
  19. package/esm/core/component/ckp/index.js +12 -8
  20. package/esm/core/component/element/components/address.d.ts +19 -0
  21. package/esm/core/component/element/components/address.js +68 -0
  22. package/esm/core/component/element/components/auth.d.ts +17 -0
  23. package/esm/core/component/element/components/auth.js +60 -0
  24. package/esm/core/component/element/components/payment.d.ts +19 -0
  25. package/esm/core/component/element/components/payment.js +74 -0
  26. package/esm/core/component/element/index.d.ts +47 -0
  27. package/esm/core/component/element/index.js +817 -0
  28. package/esm/core/component/element/mock.d.ts +4 -0
  29. package/esm/core/component/element/mock.js +491 -0
  30. package/esm/core/component/element/type.d.ts +191 -0
  31. package/esm/core/component/element/type.js +36 -0
  32. package/esm/core/component/element/utils.d.ts +13 -0
  33. package/esm/core/component/element/utils.js +6 -0
  34. package/esm/core/component/index.d.ts +14 -7
  35. package/esm/core/component/index.js +137 -78
  36. package/esm/core/drop-in/index.js +2 -2
  37. package/esm/core/instance/index.d.ts +2 -1
  38. package/esm/core/instance/index.js +27 -12
  39. package/esm/foundation/core/index.d.ts +28 -0
  40. package/esm/foundation/core/index.js +396 -0
  41. package/esm/foundation/index.d.ts +75 -0
  42. package/esm/foundation/index.js +42 -0
  43. package/esm/foundation/product-processor/easysafepay/deps.d.ts +18 -0
  44. package/esm/foundation/product-processor/easysafepay/deps.js +12 -0
  45. package/esm/foundation/product-processor/easysafepay/index.d.ts +26 -0
  46. package/esm/foundation/product-processor/easysafepay/index.js +464 -0
  47. package/esm/foundation/service/api-bus/ability/callback.d.ts +9 -0
  48. package/esm/foundation/service/api-bus/ability/callback.js +55 -0
  49. package/esm/foundation/service/api-bus/ability/globalData.d.ts +10 -0
  50. package/esm/foundation/service/api-bus/ability/globalData.js +89 -0
  51. package/esm/foundation/service/api-bus/ability/request.d.ts +10 -0
  52. package/esm/foundation/service/api-bus/ability/request.js +151 -0
  53. package/esm/foundation/service/api-bus/ability/security.d.ts +12 -0
  54. package/esm/foundation/service/api-bus/ability/security.js +161 -0
  55. package/esm/foundation/service/api-bus/ability/tracker.d.ts +9 -0
  56. package/esm/foundation/service/api-bus/ability/tracker.js +80 -0
  57. package/esm/foundation/service/api-bus/busManager.d.ts +127 -0
  58. package/esm/foundation/service/api-bus/busManager.js +398 -0
  59. package/esm/foundation/service/api-bus/index.d.ts +20 -0
  60. package/esm/foundation/service/api-bus/index.js +88 -0
  61. package/esm/foundation/service/api-bus/interface.d.ts +48 -0
  62. package/esm/foundation/service/api-bus/interface.js +54 -0
  63. package/esm/foundation/service/container/index.d.ts +32 -0
  64. package/esm/foundation/service/container/index.js +332 -0
  65. package/esm/foundation/service/container/popup.d.ts +17 -0
  66. package/esm/foundation/service/container/popup.js +103 -0
  67. package/esm/foundation/service/container/utils.d.ts +7 -0
  68. package/esm/foundation/service/container/utils.js +48 -0
  69. package/esm/foundation/service/event-center.d.ts +82 -0
  70. package/esm/foundation/service/event-center.js +274 -0
  71. package/esm/foundation/service/global-data/index.d.ts +11 -0
  72. package/esm/foundation/service/global-data/index.js +68 -0
  73. package/esm/foundation/service/index.d.ts +19 -0
  74. package/esm/foundation/service/index.js +82 -0
  75. package/esm/foundation/service/log/index.d.ts +43 -0
  76. package/esm/foundation/service/log/index.js +250 -0
  77. package/esm/foundation/service/log/keys.d.ts +13 -0
  78. package/esm/foundation/service/log/keys.js +103 -0
  79. package/esm/foundation/service/log/processor.d.ts +9 -0
  80. package/esm/foundation/service/log/processor.js +148 -0
  81. package/esm/foundation/service/log/types.d.ts +32 -0
  82. package/esm/foundation/service/log/types.js +1 -0
  83. package/esm/foundation/service/requester/deps.d.ts +17 -0
  84. package/esm/foundation/service/requester/deps.js +11 -0
  85. package/esm/foundation/service/requester/requester.d.ts +22 -0
  86. package/esm/foundation/service/requester/requester.js +217 -0
  87. package/esm/foundation/service/security/index.d.ts +28 -0
  88. package/esm/foundation/service/security/index.js +284 -0
  89. package/esm/foundation/service/security/security.d.ts +33 -0
  90. package/esm/foundation/service/security/security.js +182 -0
  91. package/esm/foundation/utils/gray_scale_utils.d.ts +7 -0
  92. package/esm/foundation/utils/gray_scale_utils.js +40 -0
  93. package/esm/foundation/utils/payment_context_utils.d.ts +13 -0
  94. package/esm/foundation/utils/payment_context_utils.js +57 -0
  95. package/esm/foundation/utils/payment_product_utils.d.ts +13 -0
  96. package/esm/foundation/utils/payment_product_utils.js +38 -0
  97. package/esm/foundation/utils/redirect_utils.d.ts +11 -0
  98. package/esm/foundation/utils/redirect_utils.js +262 -0
  99. package/esm/foundation/utils/system_events.d.ts +4 -0
  100. package/esm/foundation/utils/system_events.js +66 -0
  101. package/esm/foundation/utils/web_app_url_utils.d.ts +46 -0
  102. package/esm/foundation/utils/web_app_url_utils.js +112 -0
  103. package/esm/index.d.ts +21 -12
  104. package/esm/index.js +116 -56
  105. package/esm/plugin/applepay/component.js +13 -11
  106. package/esm/plugin/applepay/index.js +10 -6
  107. package/esm/plugin/applepay/service.d.ts +2 -2
  108. package/esm/plugin/applepay/service.js +26 -18
  109. package/esm/plugin/component/cashierApp.d.ts +10 -8
  110. package/esm/plugin/component/cashierApp.js +48 -11
  111. package/esm/plugin/component/channel.d.ts +4 -3
  112. package/esm/plugin/component/channel.js +39 -2
  113. package/esm/plugin/component/component.inline.style.d.ts +9 -10
  114. package/esm/plugin/component/component.inline.style.js +93 -10
  115. package/esm/plugin/component/component.popup.style.d.ts +15 -6
  116. package/esm/plugin/component/component.popup.style.js +30 -7
  117. package/esm/plugin/component/index.d.ts +14 -8
  118. package/esm/plugin/component/index.js +384 -187
  119. package/esm/plugin/component/popupWindow.style.d.ts +5 -2
  120. package/esm/plugin/component/popupWindow.style.js +70 -14
  121. package/esm/plugin/const.js +5 -5
  122. package/esm/plugin/drop-in/index.d.ts +5 -5
  123. package/esm/plugin/drop-in/index.js +7 -7
  124. package/esm/plugin/payment-element/utils.d.ts +2 -0
  125. package/esm/plugin/payment-element/utils.js +6 -0
  126. package/esm/plugin/paypal/index.js +2 -1
  127. package/esm/plugin/type.d.ts +4 -3
  128. package/esm/service/element.d.ts +4 -0
  129. package/esm/service/element.js +51 -0
  130. package/esm/service/index.d.ts +1 -0
  131. package/esm/service/index.js +6 -2
  132. package/esm/types/index.d.ts +339 -40
  133. package/esm/types/index.js +119 -55
  134. package/esm/util/createIframeNode.d.ts +2 -2
  135. package/esm/util/createIframeNode.js +3 -3
  136. package/esm/util/getBackScheme.d.ts +5 -0
  137. package/esm/util/getBackScheme.js +133 -0
  138. package/esm/util/index.js +4 -8
  139. package/esm/util/logger.d.ts +3 -3
  140. package/esm/util/logger.js +49 -13
  141. package/esm/util/security.d.ts +3 -2
  142. package/esm/util/security.js +2 -2
  143. package/esm/util/spm-map.d.ts +172 -0
  144. package/esm/util/spm-map.js +172 -0
  145. package/package.json +3 -1
package/esm/index.js CHANGED
@@ -1,4 +1,7 @@
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 ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ 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; }
2
5
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3
6
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
4
7
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
@@ -18,13 +21,18 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
18
21
  * 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
19
22
  * 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.
20
23
  */
24
+ import { ADDRESSElementAppVersion, AMSAutoDebitAppVersion, AMSCashierPaymentAppVersion, AMSCheckoutAppVersion, AMSPaymentElementAppVersion, AMSVaultingAppVersion } from "./config/index";
25
+ import { AddressComponent } from "./core/component/address";
26
+ import { ElementComponent } from "./core/component/element";
21
27
  import { AMSComponent } from "./core/component/index";
22
- import { componentSignEnum } from "./types";
23
- import { productSceneEnum } from "./types/index";
28
+ import { ComponentSignEnum, DisplayTypeEnum } from "./types";
29
+ import { ProductSceneEnum } from "./types/index";
24
30
  import { LogConfig, Logger } from "./util/logger";
25
31
  var logger = new Logger(LogConfig, true);
26
32
  export { AMSCheckoutPage } from "./core/component/ckp";
27
33
  export * from "./types";
34
+ import { AntomSDKCore } from "./foundation/core";
35
+ import { EasySafePayProcessor } from "./foundation/product-processor/easysafepay";
28
36
  export var AMSCheckout = /*#__PURE__*/function (_AMSComponent) {
29
37
  _inherits(AMSCheckout, _AMSComponent);
30
38
  var _super = _createSuper(AMSCheckout);
@@ -32,8 +40,12 @@ export var AMSCheckout = /*#__PURE__*/function (_AMSComponent) {
32
40
  var _this;
33
41
  var productSceneVersion = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '1.0';
34
42
  _classCallCheck(this, AMSCheckout);
35
- _this = _super.call(this, _options);
36
- _this.preloadComponent(channelType, productSceneVersion);
43
+ _this = _super.call(this, _objectSpread({
44
+ appVersion: AMSCheckoutAppVersion
45
+ }, _options));
46
+ // this.preloadComponent(channelType, productSceneVersion);
47
+ _this.channelType = channelType;
48
+ _this.productSceneVersion = productSceneVersion;
37
49
  return _this;
38
50
  }
39
51
  return _createClass(AMSCheckout);
@@ -44,9 +56,10 @@ export var AMSAutoDebit = /*#__PURE__*/function (_AMSCheckout) {
44
56
  function AMSAutoDebit(options) {
45
57
  _classCallCheck(this, AMSAutoDebit);
46
58
  var _options = Object.assign({}, options, {
47
- product: productSceneEnum.AUTO_DEBIT
59
+ product: ProductSceneEnum.AUTO_DEBIT,
60
+ appVersion: AMSAutoDebitAppVersion
48
61
  });
49
- return _super2.call(this, _options, [componentSignEnum.AUTO_DEBIT_WALLET]);
62
+ return _super2.call(this, _options, [ComponentSignEnum.AUTO_DEBIT_WALLET]);
50
63
  }
51
64
  return _createClass(AMSAutoDebit);
52
65
  }(AMSCheckout);
@@ -56,84 +69,131 @@ export var AMSAutoDebitPay = /*#__PURE__*/function (_AMSCheckout2) {
56
69
  function AMSAutoDebitPay(options) {
57
70
  _classCallCheck(this, AMSAutoDebitPay);
58
71
  var _options = Object.assign({}, options, {
59
- product: productSceneEnum.AUTO_DEBIT_PAY
72
+ product: ProductSceneEnum.AUTO_DEBIT_PAY
60
73
  });
61
- return _super3.call(this, _options, [componentSignEnum.AUTO_DEBIT_PAY_WALLET]);
74
+ return _super3.call(this, _options, [ComponentSignEnum.AUTO_DEBIT_PAY_WALLET]);
62
75
  }
63
76
  return _createClass(AMSAutoDebitPay);
64
77
  }(AMSCheckout);
65
- export var AMSEasyPay = /*#__PURE__*/function (_AMSCheckout3) {
66
- _inherits(AMSEasyPay, _AMSCheckout3);
67
- var _super4 = _createSuper(AMSEasyPay);
68
- function AMSEasyPay(options) {
69
- _classCallCheck(this, AMSEasyPay);
70
- var _options = Object.assign({}, options, {
71
- product: productSceneEnum.EASY_PAY
72
- });
73
- var currentProductSceneVersion = '1.0';
74
- try {
75
- var previousChannelStr = localStorage.getItem('antom_checkout_previousChannel');
76
- var previousChannel = JSON.parse(previousChannelStr) || {};
77
- var _ref = previousChannel || {},
78
- _ref$channelType = _ref.channelType,
79
- channelType = _ref$channelType === void 0 ? '' : _ref$channelType,
80
- _ref$productSceneVers = _ref.productSceneVersion,
81
- productSceneVersion = _ref$productSceneVers === void 0 ? '1.0' : _ref$productSceneVers;
82
- if (channelType === componentSignEnum.EASY_PAY_WALLET) {
83
- currentProductSceneVersion = productSceneVersion;
84
- }
85
- } catch (error) {
86
- logger.logError({
87
- title: 'performance_optimization_get_previousChannel_error'
88
- }, {
89
- error: error
90
- });
91
- }
92
- return _super4.call(this, _options, [componentSignEnum.EASY_PAY_WALLET], currentProductSceneVersion);
93
- }
94
- return _createClass(AMSEasyPay);
95
- }(AMSCheckout);
96
- export var AMSCashierPayment = /*#__PURE__*/function (_AMSCheckout4) {
97
- _inherits(AMSCashierPayment, _AMSCheckout4);
98
- var _super5 = _createSuper(AMSCashierPayment);
78
+ export var AMSCashierPayment = /*#__PURE__*/function (_AMSCheckout3) {
79
+ _inherits(AMSCashierPayment, _AMSCheckout3);
80
+ var _super4 = _createSuper(AMSCashierPayment);
99
81
  function AMSCashierPayment(options) {
100
82
  _classCallCheck(this, AMSCashierPayment);
101
83
  var _options = Object.assign({}, options, {
102
- product: productSceneEnum.CASHIER_PAYMENT
84
+ product: ProductSceneEnum.CASHIER_PAYMENT,
85
+ appVersion: AMSCashierPaymentAppVersion
103
86
  });
104
87
  var currentChannelType;
105
88
  try {
106
89
  var previousChannelStr = localStorage.getItem('antom_checkout_previousChannel');
107
90
  var previousChannel = JSON.parse(previousChannelStr) || {};
108
- var _ref2 = previousChannel || {},
109
- _ref2$channelType = _ref2.channelType,
110
- channelType = _ref2$channelType === void 0 ? '' : _ref2$channelType;
111
- if ([componentSignEnum.CASHIER_PAYMENT_CARD, componentSignEnum.CASHIER_PAYMENT_APM, componentSignEnum.CASHIER_PAYMENT_BANK].includes(channelType)) {
91
+ var _ref = previousChannel || {},
92
+ _ref$channelType = _ref.channelType,
93
+ channelType = _ref$channelType === void 0 ? '' : _ref$channelType;
94
+ if ([ComponentSignEnum.CASHIER_PAYMENT_CARD, ComponentSignEnum.CASHIER_PAYMENT_APM, ComponentSignEnum.CASHIER_PAYMENT_BANK].includes(channelType)) {
112
95
  currentChannelType = [channelType];
113
96
  } else {
114
- currentChannelType = [componentSignEnum.CASHIER_PAYMENT_CARD, componentSignEnum.CASHIER_PAYMENT_APM];
97
+ currentChannelType = [ComponentSignEnum.CASHIER_PAYMENT_CARD, ComponentSignEnum.CASHIER_PAYMENT_APM];
115
98
  }
116
99
  } catch (error) {
117
100
  logger.logError({
118
101
  title: 'performance_optimization_get_previousChannel_error'
119
102
  }, {
120
- error: error
103
+ errorMessage: error
121
104
  });
122
105
  }
123
- return _super5.call(this, _options, currentChannelType);
106
+ return _super4.call(this, _options, currentChannelType);
124
107
  }
125
108
  return _createClass(AMSCashierPayment);
126
109
  }(AMSCheckout);
127
- export var AMSVaulting = /*#__PURE__*/function (_AMSCheckout5) {
128
- _inherits(AMSVaulting, _AMSCheckout5);
129
- var _super6 = _createSuper(AMSVaulting);
110
+ export var AMSVaulting = /*#__PURE__*/function (_AMSCheckout4) {
111
+ _inherits(AMSVaulting, _AMSCheckout4);
112
+ var _super5 = _createSuper(AMSVaulting);
130
113
  function AMSVaulting(options) {
131
114
  _classCallCheck(this, AMSVaulting);
132
115
  var _options = Object.assign({}, options, {
133
- product: productSceneEnum.VAULTING
116
+ product: ProductSceneEnum.VAULTING,
117
+ appVersion: AMSVaultingAppVersion
134
118
  });
135
- return _super6.call(this, _options, [componentSignEnum.CASHIER_PAYMENT_CARD]);
119
+ return _super5.call(this, _options, [ComponentSignEnum.CASHIER_PAYMENT_CARD]);
136
120
  }
137
121
  return _createClass(AMSVaulting);
138
122
  }(AMSCheckout);
139
- export default AMSCheckout;
123
+ export var AntomElement = /*#__PURE__*/function (_AMSCheckout5) {
124
+ _inherits(AntomElement, _AMSCheckout5);
125
+ var _super6 = _createSuper(AntomElement);
126
+ function AntomElement(options) {
127
+ _classCallCheck(this, AntomElement);
128
+ var _options = Object.assign({}, options, {
129
+ product: ProductSceneEnum.ELEMENT_PAYMENT,
130
+ appVersion: AMSPaymentElementAppVersion
131
+ });
132
+ return _super6.call(this, _options, [ComponentSignEnum.ELEMENT_PAYMENT]);
133
+ }
134
+ return _createClass(AntomElement);
135
+ }(AMSCheckout);
136
+ export var AddressElement = /*#__PURE__*/function (_AddressComponent) {
137
+ _inherits(AddressElement, _AddressComponent);
138
+ var _super7 = _createSuper(AddressElement);
139
+ function AddressElement(options) {
140
+ _classCallCheck(this, AddressElement);
141
+ var _options = Object.assign({}, options, {
142
+ product: ProductSceneEnum.ELEMENT_ADDRESS,
143
+ appVersion: ADDRESSElementAppVersion
144
+ });
145
+ return _super7.call(this, _options);
146
+ }
147
+ return _createClass(AddressElement);
148
+ }(AddressComponent);
149
+ export var Element = /*#__PURE__*/function (_ElementComponent) {
150
+ _inherits(Element, _ElementComponent);
151
+ var _super8 = _createSuper(Element);
152
+ function Element(options) {
153
+ _classCallCheck(this, Element);
154
+ var _options = Object.assign({}, options, {
155
+ product: ProductSceneEnum.ELEMENT_PAYMENT,
156
+ environment: options.environment
157
+ });
158
+ return _super8.call(this, _options);
159
+ }
160
+ return _createClass(Element);
161
+ }(ElementComponent);
162
+ export default AMSCheckout;
163
+ export var AMSEasyPay = /*#__PURE__*/function () {
164
+ function AMSEasyPay(options) {
165
+ _classCallCheck(this, AMSEasyPay);
166
+ _defineProperty(this, "core", void 0);
167
+ _defineProperty(this, "easySafePayProcessor", void 0);
168
+ this.core = new AntomSDKCore();
169
+ this.core.registerProcessor(ProductSceneEnum.EASY_PAY, '', new EasySafePayProcessor());
170
+ this.core.init(options, ProductSceneEnum.EASY_PAY);
171
+ }
172
+ _createClass(AMSEasyPay, [{
173
+ key: "createComponent",
174
+ value: function createComponent(params) {
175
+ this.core.startBizFlow({
176
+ submitPayRequestExtra: {
177
+ notRedirectAfterComplete: params.notRedirectAfterComplete,
178
+ merchantAppointParam: params.merchantAppointParam
179
+ },
180
+ paymentSession: params.sessionData || params.paymentSessionData,
181
+ displayInfo: {
182
+ type: DisplayTypeEnum.popup
183
+ },
184
+ isAppWebview: params.isAppWebview
185
+ });
186
+ }
187
+ }, {
188
+ key: "preload",
189
+ value: function preload() {
190
+ this.core.init({}, ProductSceneEnum.EASY_PAY);
191
+ }
192
+ }, {
193
+ key: "unmount",
194
+ value: function unmount() {
195
+ this.core.destroy();
196
+ }
197
+ }]);
198
+ return AMSEasyPay;
199
+ }();
@@ -15,7 +15,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
15
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
16
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.
17
17
  */
18
- import { environmentEnum, eventCodeEnum, productSceneEnum } from "../../types";
18
+ import { EnvironmentEnum, eventCodeEnum, ProductSceneEnum } from "../../types";
19
19
  import ApplePayService from "./service";
20
20
  import { getApplePayPaymentSession, submitPayInfo } from "../../service";
21
21
  import { BusManager, BusMessage } from "../../core/bus";
@@ -46,9 +46,9 @@ var ApplePayComponent = /*#__PURE__*/function () {
46
46
  _defineProperty(this, "isRecurring", false);
47
47
  this.logger = logger;
48
48
  this._options = Object.assign({
49
- environment: environmentEnum.prod
49
+ environment: EnvironmentEnum.prod
50
50
  }, options, {
51
- product: productSceneEnum.CARD_APPLE_PAY
51
+ product: ProductSceneEnum.CARD_APPLE_PAY
52
52
  });
53
53
  this._applePayService = new ApplePayService(logger);
54
54
  }
@@ -82,13 +82,15 @@ var ApplePayComponent = /*#__PURE__*/function () {
82
82
  name: 'APPLE_PAY',
83
83
  title: ApplePayComponentEvent.sdk_event_applePaymentResult
84
84
  }, {
85
- biz: 'sdk',
86
- type: 'funnel',
87
- success: eventCodeEnum.SDK_PAYMENT_FAIL === (state === null || state === void 0 ? void 0 : state.code),
85
+ eventSource: 'sdk',
86
+ processResult: eventCodeEnum.SDK_PAYMENT_SUCCESSFUL === (state === null || state === void 0 ? void 0 : state.code),
88
87
  code: state === null || state === void 0 ? void 0 : state.code,
89
- errorCode: state === null || state === void 0 || (_state$result = state.result) === null || _state$result === void 0 ? void 0 : _state$result.errorCode,
88
+ extSdkError: state === null || state === void 0 || (_state$result = state.result) === null || _state$result === void 0 ? void 0 : _state$result.errorCode,
90
89
  errorMessage: state === null || state === void 0 || (_state$result2 = state.result) === null || _state$result2 === void 0 ? void 0 : _state$result2.errorMessage,
91
- recurring: this.isRecurring
90
+ eventMessage: JSON.stringify({
91
+ type: 'funnel',
92
+ recurring: this.isRecurring
93
+ })
92
94
  }).send();
93
95
  (_this$_options = this._options) === null || _this$_options === void 0 || _this$_options.onEventCallback(state);
94
96
  }
@@ -118,7 +120,7 @@ var ApplePayComponent = /*#__PURE__*/function () {
118
120
  msg: 'Abnormal paymentSessionData'
119
121
  }, {
120
122
  type: 'error',
121
- biz: 'sdk'
123
+ eventSource: 'sdk'
122
124
  }).send();
123
125
  return;
124
126
  }
@@ -259,7 +261,7 @@ var ApplePayComponent = /*#__PURE__*/function () {
259
261
  title: 'submitPayStatus',
260
262
  msg: res === null || res === void 0 ? void 0 : res.errorStatus
261
263
  }, {
262
- biz: 'sdk'
264
+ eventSource: 'sdk'
263
265
  }).send();
264
266
  if (res !== null && res !== void 0 && res.success || (res === null || res === void 0 ? void 0 : res.errorStatus) === 'U') {
265
267
  return Promise.resolve(res);
@@ -302,7 +304,7 @@ var ApplePayComponent = /*#__PURE__*/function () {
302
304
  msg: error
303
305
  }, {
304
306
  type: 'error',
305
- biz: 'sdk'
307
+ eventSource: 'sdk'
306
308
  }).send();
307
309
  if (_this._isFinish) {
308
310
  return;
@@ -57,10 +57,12 @@ export var ApplePayBusSubscriber = /*#__PURE__*/function (_BusSubscriber) {
57
57
  name: 'APPLE_PAY',
58
58
  title: ApplePayComponentEvent.sdk_event_appleAvailable
59
59
  }, {
60
- biz: 'sdk',
61
- type: 'funnel',
62
- success: canMakePayments,
63
- recurring: subPaymentMethod === 'ApplePayRecurringPayment'
60
+ eventSource: 'sdk',
61
+ processResult: canMakePayments,
62
+ eventMessage: JSON.stringify({
63
+ type: 'funnel',
64
+ recurring: subPaymentMethod === 'ApplePayRecurringPayment'
65
+ })
64
66
  }).send();
65
67
  }
66
68
  }, {
@@ -88,8 +90,10 @@ export var ApplePayBusSubscriber = /*#__PURE__*/function (_BusSubscriber) {
88
90
  name: 'APPLE_PAY',
89
91
  title: ApplePayComponentEvent.sdk_event_appleDestroyComponent
90
92
  }, {
91
- biz: 'sdk',
92
- type: 'funnel'
93
+ eventSource: 'sdk',
94
+ eventMessage: JSON.stringify({
95
+ type: 'funnel'
96
+ })
93
97
  }).send();
94
98
  }
95
99
  }, {
@@ -6,7 +6,7 @@
6
6
  * 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.
7
7
  */
8
8
  import { IGetMerchantSession, ICompletePaymentAuthorized, ICompleteApplePay, ILogError } from './interface';
9
- import { ApplePaySubTypeEnum, IpaymentSessionMetaData } from '../../types';
9
+ import { ApplePaySubTypeEnum, IPaymentSessionMetaData } from '../../types';
10
10
  import type { Logger } from '../../util/logger';
11
11
  /**
12
12
  * Apple Pay Service
@@ -49,6 +49,6 @@ declare class ApplePayService {
49
49
  /**
50
50
  * Start Pay
51
51
  */
52
- startPay: (param: IpaymentSessionMetaData) => void;
52
+ startPay: (param: IPaymentSessionMetaData) => void;
53
53
  }
54
54
  export default ApplePayService;
@@ -62,10 +62,12 @@ var ApplePayService = /*#__PURE__*/function () {
62
62
  name: 'APPLE_PAY',
63
63
  title: ApplePayComponentEvent.sdk_event_appleCreateComponent
64
64
  }, {
65
- biz: 'sdk',
66
- type: 'funnel',
67
- success: success,
68
- recurring: _this.isRecurring
65
+ eventSource: 'sdk',
66
+ processResult: success,
67
+ eventMessage: JSON.stringify({
68
+ type: 'funnel',
69
+ recurring: _this.isRecurring
70
+ })
69
71
  }).send();
70
72
  });
71
73
  _defineProperty(this, "onpaymentauthorized", function (event) {
@@ -98,10 +100,12 @@ var ApplePayService = /*#__PURE__*/function () {
98
100
  name: 'APPLE_PAY',
99
101
  title: ApplePayComponentEvent.sdk_event_appleSubmitToken
100
102
  }, {
101
- biz: 'sdk',
102
- type: 'funnel',
103
- success: success,
104
- recurring: _this.isRecurring
103
+ eventSource: 'sdk',
104
+ processResult: success,
105
+ eventMessage: JSON.stringify({
106
+ type: 'funnel',
107
+ recurring: _this.isRecurring
108
+ })
105
109
  }).send();
106
110
  });
107
111
  /**
@@ -122,10 +126,12 @@ var ApplePayService = /*#__PURE__*/function () {
122
126
  name: 'APPLE_PAY',
123
127
  title: ApplePayComponentEvent.sdk_event_appleCreateComponent
124
128
  }, {
125
- biz: 'sdk',
126
- type: 'funnel',
127
- success: ApplePaySession !== null,
128
- recurring: _this.isRecurring
129
+ eventSource: 'sdk',
130
+ processResult: ApplePaySession !== null,
131
+ eventMessage: JSON.stringify({
132
+ type: 'funnel',
133
+ recurring: _this.isRecurring
134
+ })
129
135
  }).send();
130
136
  if (!ApplePaySession) {
131
137
  _this.logError(eventCodeEnum.SDK_PAYMENT_ERROR, "ApplePaySession is only support in Safari");
@@ -200,10 +206,12 @@ var ApplePayService = /*#__PURE__*/function () {
200
206
  name: 'APPLE_PAY',
201
207
  title: ApplePayComponentEvent.sdk_event_appleShowPaymentSheet
202
208
  }, {
203
- biz: 'sdk',
204
- type: 'funnel',
205
- success: true,
206
- recurring: recurringInfo !== null
209
+ eventSource: 'sdk',
210
+ processResult: true,
211
+ eventMessage: JSON.stringify({
212
+ type: 'funnel',
213
+ recurring: recurringInfo !== null
214
+ })
207
215
  }).send();
208
216
  });
209
217
  this.logger = logger;
@@ -229,8 +237,8 @@ var ApplePayService = /*#__PURE__*/function () {
229
237
 
230
238
  /**
231
239
  * Is Apple Pay Enabled
232
- * @param subTypeEnum
233
- * @returns
240
+ * @param subTypeEnum
241
+ * @returns
234
242
  */
235
243
  }, {
236
244
  key: "hasActiveCard",
@@ -1,28 +1,30 @@
1
- import { componentSignEnum, Ianalytics, renderDisplayTypeEnum } from '../../types';
2
- export declare const getAppPath: (environment: string, appVersion: string, componentSign: componentSignEnum, productScene: string, productSceneVersion: string, extendInfo: string, mid: string, sendLog?: boolean) => any;
1
+ import { ComponentSignEnum, Ianalytics, DisplayTypeEnum } from '../../types';
2
+ export declare const getAppPath: (environment: string, appVersion: string, componentSign: ComponentSignEnum, productScene: string, productSceneVersion: string, extendInfo: string, mid: string, sendLog?: boolean, elementLink?: string) => any;
3
3
  export declare const getAppDomain: (domainParams: {
4
4
  environment: string;
5
5
  appVersion: string;
6
- componentSign: componentSignEnum;
6
+ componentSign: ComponentSignEnum;
7
7
  productScene: string;
8
8
  productSceneVersion: string;
9
9
  extendInfo: string;
10
10
  mid: string;
11
+ elementLink: string;
11
12
  }) => string;
12
13
  export declare const getIframeUrl: (iframeParams: {
13
- componentSign: componentSignEnum;
14
+ componentSign: ComponentSignEnum;
14
15
  analytics?: Ianalytics;
15
16
  productScene: string;
16
17
  productSceneVersion: string;
17
18
  environment: string;
18
19
  appVersion: string;
19
- extendInfo: string;
20
- locale: string;
20
+ extendInfo?: string;
21
+ locale?: string;
21
22
  instanceId: string;
22
- renderDisplayType: renderDisplayTypeEnum;
23
+ renderDisplayType: DisplayTypeEnum;
23
24
  isPreload?: string;
24
25
  hostSign?: string;
25
- mid: string;
26
+ elementLink?: string;
27
+ mid?: string;
26
28
  }) => {
27
29
  path: string;
28
30
  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 { elementAppMarmotMap, marmotMap, sdkVersion } 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";
@@ -29,11 +35,11 @@ var getAppVersion = function getAppVersion(_extendInfo, productScene, mid) {
29
35
  title: 'sdk_event_appUpgradeInfo'
30
36
  }, {
31
37
  appUpgradeVersion: appVersion,
32
- appUpgraded: appVersion ? true : false,
38
+ processResult: appVersion ? true : false,
33
39
  isPreload: _extendInfo ? false : true,
34
- extendInfo: _extendInfo,
40
+ config: _extendInfo,
35
41
  productScene: productScene,
36
- mid: mid
42
+ merchantId: mid
37
43
  });
38
44
  }
39
45
 
@@ -52,8 +58,9 @@ 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(_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']), componentSignEnum.CHECKOUT_PAYMENT, ['1.0.0']);
56
- var supportProductSceneVersion = signSupportMap[componentSign];
61
+ var _signSupportMap;
62
+ var signSupportMap = (_signSupportMap = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_signSupportMap, 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']), ComponentSignEnum.ELEMENT_PAYMENT, ['1.0']), _defineProperty(_defineProperty(_signSupportMap, ComponentSignEnum.ELEMENT_ADDRESS, ['1.0']), ComponentSignEnum.CHECKOUT_PAYMENT, ['1.0.0']));
63
+ var supportProductSceneVersion = signSupportMap[componentSign] || [];
57
64
  // 从左到右,从旧到新
58
65
  var isSupport = supportProductSceneVersion.find(function (it) {
59
66
  return it === productSceneVersion;
@@ -70,6 +77,7 @@ export var getAppPath = function getAppPath() {
70
77
  var extendInfo = arguments.length > 5 ? arguments[5] : undefined;
71
78
  var mid = arguments.length > 6 ? arguments[6] : undefined;
72
79
  var sendLog = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : false;
80
+ var elementLink = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : '';
73
81
  var _ref = queryParse() || {},
74
82
  urlTestHost = _ref.host;
75
83
  var upgradeAppVersion = getAppVersion(extendInfo, productScene, mid, sendLog);
@@ -87,9 +95,33 @@ export var getAppPath = function getAppPath() {
87
95
  }
88
96
  var finalProductSceneVersion = getFinalProductSceneVersion(componentSign, productSceneVersion);
89
97
  // only for test while testurl?host=https://xxxxx.test.html
98
+ if (elementLink) {
99
+ return elementLink;
100
+ }
90
101
  if (urlTestHost && !['sandbox', 'light_sandbox', 'prod'].includes(environment)) {
91
102
  return urlTestHost;
92
103
  }
104
+ // 地址应用特殊处理
105
+ if (componentSign === ComponentSignEnum.ELEMENT_ADDRESS) {
106
+ return "".concat(elementAppMarmotMap[environment], "/element-address/").concat(finalAppVersion, "/pages/address/index.html");
107
+ }
108
+ // element应用特殊处理
109
+ if (_toConsumableArray(Object.values(ComponentSignEnumV2)).includes(componentSign)) {
110
+ // element又分为express_checkout模式和普通模式, express_checkout 模式在扩展参数是返回expressCheckout=true
111
+ var isExpressCheckout = false;
112
+ try {
113
+ // expressCheckout可能出现string(false) JSON.parse再转一次
114
+ isExpressCheckout = JSON.parse(JSON.parse(extendInfo).expressCheckout);
115
+ } catch (error) {
116
+ // 遇到JSON解析错误,默认false
117
+ }
118
+ if (isExpressCheckout) {
119
+ // express_checkout模式走单独映射
120
+ return "".concat(elementAppMarmotMap[environment], "/elements/").concat(finalAppVersion, "/pages/express_checkout/index.html");
121
+ } else {
122
+ return "".concat(elementAppMarmotMap[environment], "/elements/").concat(finalAppVersion, "/pages/").concat(productScene.toLowerCase(), "/index.html");
123
+ }
124
+ }
93
125
  return "".concat(marmotMap[environment], "/").concat(componentSign, "/").concat(finalProductSceneVersion, "/index.").concat(finalAppVersion, ".html");
94
126
  };
95
127
  export var getAppDomain = function getAppDomain(domainParams) {
@@ -99,9 +131,10 @@ export var getAppDomain = function getAppDomain(domainParams) {
99
131
  productScene = domainParams.productScene,
100
132
  productSceneVersion = domainParams.productSceneVersion,
101
133
  extendInfo = domainParams.extendInfo,
102
- mid = domainParams.mid;
134
+ mid = domainParams.mid,
135
+ elementLink = domainParams.elementLink;
103
136
  var reg = /^https?:\/\/([^/<>\s]+\.?)*/;
104
- var macth = reg.exec(getAppPath(environment, appVersion, componentSign, productScene, productSceneVersion, extendInfo, mid));
137
+ var macth = reg.exec(getAppPath(environment, appVersion, componentSign, productScene, productSceneVersion, extendInfo, mid, false, elementLink));
105
138
  return macth && macth[0] || '';
106
139
  };
107
140
  export var getIframeUrl = function getIframeUrl(iframeParams) {
@@ -123,8 +156,10 @@ export var getIframeUrl = function getIframeUrl(iframeParams) {
123
156
  _iframeParams$hostSig = iframeParams.hostSign,
124
157
  hostSign = _iframeParams$hostSig === void 0 ? '' : _iframeParams$hostSig,
125
158
  _iframeParams$mid = iframeParams.mid,
126
- mid = _iframeParams$mid === void 0 ? '' : _iframeParams$mid;
127
- var path = getAppPath(environment, appVersion, componentSign, productScene, productSceneVersion, extendInfo || '', mid, true);
159
+ mid = _iframeParams$mid === void 0 ? '' : _iframeParams$mid,
160
+ _iframeParams$element = iframeParams.elementLink,
161
+ elementLink = _iframeParams$element === void 0 ? '' : _iframeParams$element;
162
+ var path = getAppPath(environment, appVersion, componentSign, productScene, productSceneVersion, extendInfo || '', mid, true, elementLink);
128
163
  var appMatched = getMatchAppVersion(extendInfo, {
129
164
  sdkVersion: sdkVersion,
130
165
  productScene: productScene,
@@ -189,6 +224,8 @@ export var createIframe = function createIframe(mode, platform) {
189
224
  iframe.style.border = none;
190
225
  iframe.style.opacity = none;
191
226
  iframe.style.overflow = 'hidden';
227
+ // iframe设置支持第三方支付
228
+ iframe.allow = 'payment';
192
229
  return iframe;
193
230
  };
194
231
  export var createPreloadIframe = function createPreloadIframe(channelType, version) {
@@ -1,5 +1,5 @@
1
- import type { IpaymentSessionMetaData } from "src/types";
2
- type IChannelBehavior = {
1
+ import type { EventPayload, IPaymentSessionMetaData } from '../../types';
2
+ export type IChannelBehavior = {
3
3
  usePaymentSessionAsQueryResult: boolean;
4
4
  submitPayInSdk: boolean;
5
5
  createIframeNode: boolean;
@@ -15,6 +15,7 @@ type GetDoubleFaParams = {
15
15
  env: string;
16
16
  sdkVersion: string;
17
17
  };
18
- export declare function getChannelBehavior(paymentSessionMetaData?: IpaymentSessionMetaData): IChannelBehavior | undefined;
18
+ export declare function getChannelBehavior(paymentSessionMetaData?: IPaymentSessionMetaData): IChannelBehavior | undefined;
19
19
  export declare function getDoubleFaUrl(params: GetDoubleFaParams): string;
20
+ export declare const handleGooglePay: (data: EventPayload) => Promise<unknown>;
20
21
  export {};