@alipay/ams-checkout 0.0.1747014711-dev.3 → 0.0.1747300438-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.
@@ -9,7 +9,6 @@ import { v4 as uuid } from 'uuid';
9
9
  import { EnvironmentEnum } from "../../../types";
10
10
  import { queryParse } from "../../../util";
11
11
  import { LogConfig, Logger } from "../../../util/logger";
12
- import { handleRedirect } from "../element/util";
13
12
  var CKP_PAYMENT_PAGE_HOST = {
14
13
  DEV: 'https://dev.page.alipay.net',
15
14
  TEST: 'https://test.page.alipay.net',
@@ -69,14 +68,10 @@ export var AMSCheckoutPage = /*#__PURE__*/function () {
69
68
  return url;
70
69
  });
71
70
  _defineProperty(this, "eventListenerWrapper", function (event) {
72
- var dataObj = JSON.parse(event.data) || {};
73
71
  var _ref = JSON.parse(event.data) || {},
74
72
  code = _ref.code,
75
73
  message = _ref.message,
76
74
  result = _ref.result;
77
- var _dataObj$context = dataObj === null || dataObj === void 0 ? void 0 : dataObj.context,
78
- eventCode = _dataObj$context.event,
79
- data = _dataObj$context.data;
80
75
  if (code && code.startsWith('SDK_PAYMENT')) {
81
76
  var _this$eventListener;
82
77
  console.log('[antom-web-sdk] <antom-checkout-page> eventListenerWrapper', event, message, result);
@@ -86,16 +81,6 @@ export var AMSCheckoutPage = /*#__PURE__*/function () {
86
81
  result: result
87
82
  });
88
83
  }
89
- if (eventCode && eventCode !== null && eventCode !== void 0 && eventCode.startsWith('onRedirect')) {
90
- var _this$eventListener2;
91
- console.log(eventCode, '[antom-web-sdk] <antom-checkout-page> onRedirectCode', data);
92
- (_this$eventListener2 = _this.eventListener) === null || _this$eventListener2 === void 0 || _this$eventListener2.call(_this, {
93
- code: code,
94
- message: message,
95
- result: result
96
- });
97
- handleRedirect(data);
98
- }
99
84
  });
100
85
  _defineProperty(this, "addListener", function () {
101
86
  window.addEventListener('message', _this.eventListenerWrapper);
@@ -144,7 +129,6 @@ export var AMSCheckoutPage = /*#__PURE__*/function () {
144
129
  throw new Error('PARAMS_ERROR_ALREADY_MOUNTED');
145
130
  }
146
131
  this.addListener();
147
- console.log("🚀 ~ AMSCheckoutPage======== ~ event:", event);
148
132
  var ckpPageAddress = this.generateIframeSrc(params.sessionData);
149
133
  var iframe = document.createElement('iframe');
150
134
  iframe.id = this.APP_IFRAME_ID;
@@ -5,7 +5,7 @@
5
5
  * 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
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
- import { ComponentActionNamesType } from 'src/plugin/type';
8
+ import { ComponentActionNamesType } from '../../plugin/type';
9
9
  import ComponentApp from '../../plugin/component';
10
10
  import type { AMSCheckoutOptions, IAppendParams, InitSecurityConfig, IoptionsParams } from '../../types/index';
11
11
  import { EventCenter } from '../../util/index';
@@ -1,4 +1,4 @@
1
- import { BusSubscriber } from 'src/core/bus';
1
+ import { BusSubscriber } from '../core/bus';
2
2
  import { PaymentMethodCategoryTypeEnum, ProductSceneEnum, ProductSceneVersion } from '../types';
3
3
  export type IExtendPlugin = IExtendPluginItem[];
4
4
  export interface ComponentActionNamesType {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alipay/ams-checkout",
3
- "version": "0.0.1747014711-dev.3",
3
+ "version": "0.0.1747300438-dev.0",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "main": "esm/index.js",