@alipay/ams-checkout 1.7.0 → 1.7.1
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.
- package/dist/umd/ams-checkout.min.js +1 -1
- package/esm/constant/index.d.ts +2 -4
- package/esm/constant/index.js +3 -5
- package/esm/core/component/index.js +15 -2
- package/esm/core/instance/index.js +3 -3
- package/esm/index.js +2 -2
- package/esm/plugin/component/cashierApp.js +3 -4
- package/esm/plugin/component/index.js +134 -71
- package/esm/plugin/component/popupWindow.style.d.ts +1 -1
- package/esm/plugin/component/popupWindow.style.js +32 -23
- package/esm/plugin/drop-in/index.js +2 -2
- package/esm/request/index.js +5 -5
- package/esm/service/index.js +2 -2
- package/esm/util/index.js +2 -2
- package/esm/util/logger.js +5 -2
- package/esm/util/security.js +4 -5
- package/package.json +1 -1
package/esm/constant/index.d.ts
CHANGED
@@ -55,9 +55,6 @@ export declare const ERRORMESSAGE: {
|
|
55
55
|
CREATEPAYMENT_PARAMETER_ERROR: {
|
56
56
|
code: eventCodeEnum;
|
57
57
|
};
|
58
|
-
CONFIRMPAYMENT_PARAMETER_ERROR: {
|
59
|
-
code: string;
|
60
|
-
};
|
61
58
|
CREATECOMPONENT_ERROR: {
|
62
59
|
code: eventCodeEnum;
|
63
60
|
message: string;
|
@@ -140,7 +137,7 @@ export declare const EVENT: {
|
|
140
137
|
dismissLoading: {
|
141
138
|
name: string;
|
142
139
|
};
|
143
|
-
|
140
|
+
popupWindow: {
|
144
141
|
name: string;
|
145
142
|
};
|
146
143
|
popWindow: {
|
@@ -180,6 +177,7 @@ export declare const INLINE_BASE_STYLE_ID = "ams-inline-component-style";
|
|
180
177
|
export declare const INLINE_IMG_CLASSNAME = "inline-loading";
|
181
178
|
export declare const AMSPOPUP_PREFIX = "ams-popup";
|
182
179
|
export declare const LOADTIME_LIMIT = 15000;
|
180
|
+
export declare const POPUP_LOADTIME_LOG_LIMIT = 3000;
|
183
181
|
export declare const ANIMATION_TIME = 300;
|
184
182
|
export declare const closeImg = "https://cdn.marmot-cloud.com/storage/2023/5/18/1692a487-99b5-4314-9d6f-e9814bc1ca41.svg";
|
185
183
|
export declare const LOADINGIMG = "data:image/png;base64,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";
|
package/esm/constant/index.js
CHANGED
@@ -55,9 +55,6 @@ export var ERRORMESSAGE = {
|
|
55
55
|
CREATEPAYMENT_PARAMETER_ERROR: {
|
56
56
|
code: eventCodeEnum.SDK_CREATEPAYMENT_PARAMETER_ERROR
|
57
57
|
},
|
58
|
-
CONFIRMPAYMENT_PARAMETER_ERROR: {
|
59
|
-
code: 'SDK_CONFIRMPAYMENT_PARAMETER_ERROR'
|
60
|
-
},
|
61
58
|
CREATECOMPONENT_ERROR: {
|
62
59
|
code: eventCodeEnum.SDK_CREATECOMPONENT_ERROR,
|
63
60
|
message: 'Failed to create component',
|
@@ -140,8 +137,8 @@ export var EVENT = {
|
|
140
137
|
dismissLoading: {
|
141
138
|
name: 'dismissLoading'
|
142
139
|
},
|
143
|
-
|
144
|
-
name: '
|
140
|
+
popupWindow: {
|
141
|
+
name: 'popupWindow'
|
145
142
|
},
|
146
143
|
popWindow: {
|
147
144
|
name: 'popWindow'
|
@@ -180,6 +177,7 @@ export var INLINE_BASE_STYLE_ID = 'ams-inline-component-style';
|
|
180
177
|
export var INLINE_IMG_CLASSNAME = 'inline-loading';
|
181
178
|
export var AMSPOPUP_PREFIX = 'ams-popup';
|
182
179
|
export var LOADTIME_LIMIT = 15000;
|
180
|
+
export var POPUP_LOADTIME_LOG_LIMIT = 3000;
|
183
181
|
export var ANIMATION_TIME = 300;
|
184
182
|
export var closeImg = 'https://cdn.marmot-cloud.com/storage/2023/5/18/1692a487-99b5-4314-9d6f-e9814bc1ca41.svg';
|
185
183
|
export var LOADINGIMG = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIQAAACEBAMAAACjap6UAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAJcEhZcwAAITgAACE4AUWWMWAAAAAqUExURUdwTKe3zKGxyK27z7K/05ytxLbD1bvH2Jaowb/K28DL3JCjvYueucDL2xLcxpgAAAAOdFJOUwCKoHRft0w5zCgY4fYKKSYvdQAABvtJREFUaN6lmt+LG1UUx6fddbcZHOgkpWutBTPbVBEfNp1xS6uF2oQURUGnBBbqw7YdsooV2ipZ06c+uBBZCistDRMUqgV1gnnwJ4HMg2jBh+Qh1bW1A/lfPOfcO9lkNz/m3j3dh2XT+eznfM+dmTvTKsroUovpeGotbyetlXuKTH17vFxeKq9R5fOJG8KAR6+Uy2vlJag8ALDmxSDa2TLWEhos5UPKnEA7sy8yALNYyod1/mpUwiYpQB9MYy1sJZWybwgRgLGGDLRAhg1ftn0qIqHBkijzefBO7HwKRN6cTJguNxoho38gjGHb7y5PTHJpvdyLgsaap3UBSdjISKWMCZlqzzTBosGj4CMJC+LEmh8/20+b62jRM+EGjIAQsLDnxhH+IQduUS7P50p1RQk85zgRwCIPhJTx9pjz6gIev84k1o59tfVJ7HIKw0iRRio5upX3GaGBjPMbg5/FjnOAYRvGC6MIU83mOkGAcHLnx7cxC8O2ETNqsofhcIgT2xja7WOmYRsp4+hwwt9NKErz1xG/ZJYRsE4PXRIX0GAdwxi5AGfjNrYCiGRnyMf/kgRgGmNm9ihl8DoyVAKOxzxfGrdy7vOZGPM7NfaiBDI+G38KXDK4yMKOj16lNiDKCVc3Nc47OTpkTRCjeWTi9SRMY3voHzZZ/TL5inKJAPHtS1TlhMZyhIszk4hvm+t/HPF5lEvjNyRhxAd7PuwziY0oCJV3cqz/hzPNph9ZQlG+hi6SRjze/wu/9/3oEnywycEVerhFFr9FvVldT5LFgb4Lvw8EEFmIipihiSSNLet9PjKaP0a/656Nx0FD37+1uFvNVstv3oqOeGgksZeDvXTWW8BoNgXu/VocS++trj1tHzppPRDZgVzHOON6uJh/gDag3hFBTCWpwrE+1/aB4AttyTRsIxnnYag+9uH/LLYZu5hM6nFdZ2HMYBdt/5YY4iEMBDxYGPvaGGd7WQwxCwpJna+MK+DQ9hui20pQgK9n6fuX29jJA1HENYxCpyuo2m7Bn/ZNUcQeGAnPcxpGCoxlUcSMToXbpqfaUH5beKOuoURcP4Nrkxr5SXyff5EscH2+hRbtv8QRXxBijgYilSbkSQhc4j5ZPC+O4HnCHooI7aviCJUhOjBTrJbMc1M41b2E+EMG8TohlvEkg/pTBnGNEAvK07IzhZsaIfYrXxLidxnEQ11P6OkjyhVC3JRBTOlpsDikvCa7LNjCSCfm4NqLtV8GMQsAPX1QeY8QZ2QQMR07sTjiqhQiARLpA/wU2ZBBqBiFbnKE1JsBDS0SCYWdZR0pBMWZ5gip1xNKGiuxK4RODGU3ZSagdocgC1NRMEmpNBWNLHQ4utORIygqKCS4hSRDJYKpaFCKJocAQjptYRCdrhwiZoJDelHROh30kDrZgZBIAAIY3a4UYgYApnlIUbpaFzAyiGkTLU5CI8CQs5iCRkzzFDTSBYaUxX2QMBMLChCgpBAfo4QJ18wOMWQQlwkBO6yuNIII5sYuECpD3OOIoCOzLKgUhghk8pwmwiKe9d16HRhSM4XC90ZavYsQ2YGcDi3qdYlrVjhTRQu6AVRH/FTPWGymkGe9XpdAQJoZQNBxQYAQ4U5uZzLgsagwi1oQ1ITzzJAFexes1RBSE+wkZlkQRYZtTDS0qIsiNqELgPBdBRxfr9UEw7idNSEMi//igDHEVoVFFovhKQfHQwltU2aylgUTCV84ajViCHVyxwSGZfWe6ALGEOkjQwSrs4UQ7WSTEU5sXX8YQkDjE7DIZDJ921UCeNGXRgwBINK312SdeJEDvWNlrWwme6L/SgqAarVWjaihZYEAUfS/4dVIwouqsZkFBjQysGcOPA/DiKahZqky5wZ/ShIRNUACB5IdfFOtQRSIiKIRy/La9ncDzLPqetUI4+B9vLG9P48sXG/iEp1lgGx2xzMMt3DdSQN1eBvndsbMCJ47oZW7WSdHiCGvXTBMtHDHtvI4yy1yQ4IHDbfquuMZMcfJMYmPhn3sIQE13JGTVaEJsHCGS6CGy6o0ykN1CrkcWjjDJVDDIwm34g69McUKSIDjnSHj4PNiEpWKWyoNWelewXEoCuhj5EPpEzeEVFa3L3X1bgHaKOQcjOOD0YFXqYtSCRkDEPW7ApbjMJExZ5LasyCIW8M9mBZ4FQLkHB7G2MfzJ3Q8eKyGtVIsFlcKvBwayfh/ldW8Ck4Va7USEorFAkEoi1zu3KQrEu+Ca6wwi54GpFmYeC6ruLRAgffCLVgv2EchwkuGgGVZWe15bElAL5FeUwSUBR1f5AQUESCQR2mVh1FkjfAkohJgLj1GEVtZIRFACP0fCm/AgmdREnzYqIRhFHkvq+J77MBFQpEPpCQOYPcntwIWeK6Mu0P9D9pzJq4u5hj+AAAAAElFTkSuQmCC';
|
@@ -10,8 +10,8 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
10
10
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
11
11
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
12
12
|
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; }
|
13
|
-
function _toPropertyKey(
|
14
|
-
function _toPrimitive(
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
14
|
+
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); }
|
15
15
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
16
16
|
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."); }
|
17
17
|
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); }
|
@@ -138,6 +138,9 @@ export var AMSComponent = /*#__PURE__*/function (_CoreInstance) {
|
|
138
138
|
key: "pluginAppendIframe",
|
139
139
|
value: function pluginAppendIframe(appendParams) {
|
140
140
|
try {
|
141
|
+
this.logger.logInfo({
|
142
|
+
title: 'sdk_event_createComponent'
|
143
|
+
}).send();
|
141
144
|
return this._componentApp.appendIframeNodes(appendParams.componentSign, appendParams.iframeNodesParams);
|
142
145
|
} catch (error) {
|
143
146
|
return Promise.reject(error);
|
@@ -157,6 +160,11 @@ export var AMSComponent = /*#__PURE__*/function (_CoreInstance) {
|
|
157
160
|
}).then(function (_params) {
|
158
161
|
return handleParams(_params);
|
159
162
|
}).catch(function (error) {
|
163
|
+
_this2.logger.logError({
|
164
|
+
title: 'sdk_error_parameter'
|
165
|
+
}, {
|
166
|
+
params: JSON.stringify(params)
|
167
|
+
}).send();
|
160
168
|
_this2._eventCenter.emit(EVENT.error.name, error);
|
161
169
|
return Promise.reject(error);
|
162
170
|
}).then(function (appendParams) {
|
@@ -179,6 +187,11 @@ export var AMSComponent = /*#__PURE__*/function (_CoreInstance) {
|
|
179
187
|
}).then(function (_params) {
|
180
188
|
return handleParams(_params);
|
181
189
|
}).catch(function (error) {
|
190
|
+
_this3.logger.logError({
|
191
|
+
title: 'sdk_error_parameter'
|
192
|
+
}, {
|
193
|
+
params: JSON.stringify(params)
|
194
|
+
}).send();
|
182
195
|
_this3._eventCenter.emit(EVENT.error.name, error);
|
183
196
|
return Promise.reject(error);
|
184
197
|
}).then(function (appendParams) {
|
@@ -6,8 +6,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
6
6
|
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); } }
|
7
7
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
8
8
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
9
|
-
function _toPropertyKey(
|
10
|
-
function _toPrimitive(
|
9
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
10
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
11
11
|
/**
|
12
12
|
* Copyright (c) 2022 International Business Group, Ant Group. All rights reserved.
|
13
13
|
*
|
@@ -192,7 +192,7 @@ var AMSSDK = /*#__PURE__*/function () {
|
|
192
192
|
securitySdk.initSecurity(successCallback, failCallback);
|
193
193
|
return securitySdk;
|
194
194
|
} catch (error) {
|
195
|
-
failCallback && failCallback(
|
195
|
+
failCallback && failCallback(error === null || error === void 0 ? void 0 : error.toString());
|
196
196
|
}
|
197
197
|
}
|
198
198
|
/**
|
package/esm/index.js
CHANGED
@@ -1,8 +1,8 @@
|
|
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
2
|
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
3
|
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
|
-
function _toPropertyKey(
|
5
|
-
function _toPrimitive(
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
5
|
+
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); }
|
6
6
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
7
7
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
8
8
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
@@ -1,7 +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
2
|
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
|
-
function _toPropertyKey(
|
4
|
-
function _toPrimitive(
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
4
|
+
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); }
|
5
5
|
/**
|
6
6
|
* Copyright (c) 2022 International Business Group, Ant Group. All rights reserved.
|
7
7
|
*
|
@@ -21,8 +21,7 @@ var getAppVersion = function getAppVersion(_extendInfo) {
|
|
21
21
|
}
|
22
22
|
};
|
23
23
|
var getFinalProductSceneVersion = function getFinalProductSceneVersion(componentSign, productSceneVersion) {
|
24
|
-
var
|
25
|
-
var signSupportMap = (_signSupportMap = {}, _defineProperty(_signSupportMap, componentSignEnum.NONE, ['']), _defineProperty(_signSupportMap, componentSignEnum.AUTO_DEBIT_WALLET, ['1.0']), _defineProperty(_signSupportMap, componentSignEnum.CASHIER_PAYMENT_BANK, ['1.0']), _defineProperty(_signSupportMap, componentSignEnum.CASHIER_PAYMENT_CARD, ['1.0']), _defineProperty(_signSupportMap, componentSignEnum.EASY_PAY_WALLET, ['1.0', '2.0']), _defineProperty(_signSupportMap, componentSignEnum.VAULTING_CARD, ['1.0']), _signSupportMap);
|
24
|
+
var signSupportMap = _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.EASY_PAY_WALLET, ['1.0', '2.0']), componentSignEnum.VAULTING_CARD, ['1.0']);
|
26
25
|
var supportProductSceneVersion = signSupportMap[componentSign];
|
27
26
|
// 从左到右,从旧到新
|
28
27
|
var isSupport = supportProductSceneVersion.find(function (it) {
|
@@ -6,8 +6,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
6
6
|
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); } }
|
7
7
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
8
8
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
9
|
-
function _toPropertyKey(
|
10
|
-
function _toPrimitive(
|
9
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
10
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
11
11
|
/**
|
12
12
|
* Copyright (c) 2022 International Business Group, Ant Group. All rights reserved.
|
13
13
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), the rights to use, copy, modify, merge, and/or distribute the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
@@ -15,7 +15,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
15
15
|
* 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.
|
16
16
|
*/
|
17
17
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
18
|
-
import { COMPONENTPLUGINID, COMPONENT_CLOSE_BLOCK_ID, COMPONENT_CONTAINER_ID, COMPONENT_RETENTION_ID, COMPONENT_SECTION_ID, ERRORMESSAGE, EVENT, LISTENER_PREFIX, LOADING_ID, LOADTIME_LIMIT, MOCKUP_ID } from "../../constant";
|
18
|
+
import { COMPONENTPLUGINID, COMPONENT_CLOSE_BLOCK_ID, COMPONENT_CONTAINER_ID, COMPONENT_RETENTION_ID, COMPONENT_SECTION_ID, ERRORMESSAGE, EVENT, LISTENER_PREFIX, LOADING_ID, LOADTIME_LIMIT, MOCKUP_ID, POPUP_LOADTIME_LOG_LIMIT } from "../../constant";
|
19
19
|
import { queryPaymentInfo, submitPayInfo } from "../../service";
|
20
20
|
import { componentSignEnum, eventCodeEnum, messageName, platformEnum, productSceneEnum, RedirectType, renderDisplayTypeEnum, targetEnum } from "../../types";
|
21
21
|
import { getType, isJsonString, isPC } from "../../util";
|
@@ -48,7 +48,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
48
48
|
_defineProperty(this, "_appLocationSearch", void 0);
|
49
49
|
_defineProperty(this, "_renderDisplayType", renderDisplayTypeEnum.popup);
|
50
50
|
_defineProperty(this, "_multipleCallbackEvents", void 0);
|
51
|
-
this._appVersion = '1.7.
|
51
|
+
this._appVersion = '1.7.1';
|
52
52
|
this._isInitComponent = false;
|
53
53
|
this._selector = "#".concat(COMPONENT_SECTION_ID);
|
54
54
|
this.createIframeNode = function () {
|
@@ -339,7 +339,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
339
339
|
this._actionQueryPromise = new Promise( /*#__PURE__*/function () {
|
340
340
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(resolve, reject) {
|
341
341
|
var _this5$_renderParams, _this5$_renderParams2, _this5$_renderParams3, _this5$_renderParams4;
|
342
|
-
var envInfo, params, _this5$_renderParams5, _ref3, _ref3$productSceneVer, productSceneVersion, _ref3$productScene, productScene, _ref4, _ref4$action, _ref4$action2, _ref4$action2$autoDeb, autoDebitWithToken, _this5$_renderParams6, _action$web, _action$wap, action, signType;
|
342
|
+
var envInfo, params, search, _this5$_renderParams5, _ref3, _ref3$productSceneVer, productSceneVersion, _ref3$productScene, productScene, _ref4, _ref4$action, _ref4$action2, _ref4$action2$autoDeb, autoDebitWithToken, _this5$_renderParams6, _action$web, _action$wap, action, signType;
|
343
343
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
344
344
|
while (1) switch (_context2.prev = _context2.next) {
|
345
345
|
case 0:
|
@@ -364,7 +364,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
364
364
|
}));
|
365
365
|
case 4:
|
366
366
|
if (!(componentSignEnum.CASHIER_PAYMENT_CARD === _this5._componentSign || componentSignEnum.VAULTING_CARD === _this5._componentSign)) {
|
367
|
-
_context2.next =
|
367
|
+
_context2.next = 11;
|
368
368
|
break;
|
369
369
|
}
|
370
370
|
params.paymentMethodType = 'CARD';
|
@@ -372,55 +372,62 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
372
372
|
return _this5.getDeviceIdAndLog();
|
373
373
|
case 8:
|
374
374
|
envInfo.deviceId = _context2.sent;
|
375
|
-
|
375
|
+
// TODO 加一个后门 判断是否为小程序环境
|
376
|
+
search = window.location.search;
|
377
|
+
if (window.navigator.userAgent.indexOf('miniProgram') > -1 || search.indexOf('miniProgram') > -1) {
|
378
|
+
envInfo.extendInfo = {
|
379
|
+
WAP_SUB_TYPE: 'WECHAT_MINI_PROGRAM'
|
380
|
+
};
|
381
|
+
}
|
382
|
+
case 11:
|
376
383
|
if (!(componentSignEnum.EASY_PAY_WALLET === _this5._componentSign)) {
|
377
|
-
_context2.next =
|
384
|
+
_context2.next = 19;
|
378
385
|
break;
|
379
386
|
}
|
380
387
|
_ref3 = params.paymentSessionConfig || {}, _ref3$productSceneVer = _ref3.productSceneVersion, productSceneVersion = _ref3$productSceneVer === void 0 ? '' : _ref3$productSceneVer, _ref3$productScene = _ref3.productScene, productScene = _ref3$productScene === void 0 ? '' : _ref3$productScene;
|
381
388
|
_ref4 = ((_this5$_renderParams5 = _this5._renderParams) === null || _this5$_renderParams5 === void 0 ? void 0 : _this5$_renderParams5.paymentSessionMetaData) || {}, _ref4$action = _ref4.action, _ref4$action2 = _ref4$action === void 0 ? {} : _ref4$action, _ref4$action2$autoDeb = _ref4$action2.autoDebitWithToken, autoDebitWithToken = _ref4$action2$autoDeb === void 0 ? false : _ref4$action2$autoDeb;
|
382
389
|
if (!(productScene === productSceneEnum.EASY_PAY && productSceneVersion === '2.0' && !autoDebitWithToken)) {
|
383
|
-
_context2.next =
|
390
|
+
_context2.next = 16;
|
384
391
|
break;
|
385
392
|
}
|
386
393
|
return _context2.abrupt("return", resolve({
|
387
394
|
message: 'sdk no need to make query request',
|
388
395
|
success: true
|
389
396
|
}));
|
390
|
-
case 14:
|
391
|
-
_context2.next = 16;
|
392
|
-
return _this5.getDeviceIdAndLog();
|
393
397
|
case 16:
|
398
|
+
_context2.next = 18;
|
399
|
+
return _this5.getDeviceIdAndLog();
|
400
|
+
case 18:
|
394
401
|
envInfo.deviceId = _context2.sent;
|
395
|
-
case
|
402
|
+
case 19:
|
396
403
|
if (!(componentSignEnum.AUTO_DEBIT_WALLET === _this5._componentSign)) {
|
397
|
-
_context2.next =
|
404
|
+
_context2.next = 29;
|
398
405
|
break;
|
399
406
|
}
|
400
407
|
action = ((_this5$_renderParams6 = _this5._renderParams) === null || _this5$_renderParams6 === void 0 || (_this5$_renderParams6 = _this5$_renderParams6.paymentSessionMetaData) === null || _this5$_renderParams6 === void 0 ? void 0 : _this5$_renderParams6.action) || {};
|
401
408
|
signType = isPC() ? action === null || action === void 0 || (_action$web = action.web) === null || _action$web === void 0 ? void 0 : _action$web.signType : action === null || action === void 0 || (_action$wap = action.wap) === null || _action$wap === void 0 ? void 0 : _action$wap.signType;
|
402
409
|
if (!(signType === 'SMS')) {
|
403
|
-
_context2.next =
|
410
|
+
_context2.next = 24;
|
404
411
|
break;
|
405
412
|
}
|
406
413
|
return _context2.abrupt("return", resolve({
|
407
414
|
message: 'sdk no need to make query request',
|
408
415
|
success: true
|
409
416
|
}));
|
410
|
-
case
|
417
|
+
case 24:
|
411
418
|
if (!(!signType || signType !== 'REDIRECT')) {
|
412
|
-
_context2.next =
|
419
|
+
_context2.next = 26;
|
413
420
|
break;
|
414
421
|
}
|
415
422
|
return _context2.abrupt("return", resolve({
|
416
423
|
success: false
|
417
424
|
}));
|
418
|
-
case 24:
|
419
|
-
_context2.next = 26;
|
420
|
-
return _this5.getDeviceIdAndLog();
|
421
425
|
case 26:
|
426
|
+
_context2.next = 28;
|
427
|
+
return _this5.getDeviceIdAndLog();
|
428
|
+
case 28:
|
422
429
|
envInfo.deviceId = _context2.sent;
|
423
|
-
case
|
430
|
+
case 29:
|
424
431
|
_this5.AMSSDK.logger.logInfo({
|
425
432
|
title: 'sdk_event_sdkQuery'
|
426
433
|
}, {
|
@@ -456,7 +463,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
456
463
|
paymentSessionConfig: JSON.stringify(params.paymentSessionConfig)
|
457
464
|
}).send();
|
458
465
|
});
|
459
|
-
case
|
466
|
+
case 31:
|
460
467
|
case "end":
|
461
468
|
return _context2.stop();
|
462
469
|
}
|
@@ -630,6 +637,9 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
630
637
|
// Subscribe to messages from iframe
|
631
638
|
this.addEventListener();
|
632
639
|
} catch (error) {
|
640
|
+
this.AMSSDK.logger.logError({
|
641
|
+
title: 'sdk_error_created_app_failed'
|
642
|
+
}).send();
|
633
643
|
this.dispatchToSDK(EVENT.error.name, Object.assign({}, ERRORMESSAGE.SDK_COMPATIBILITY_ISSUES.FAILED_TO_CREATE_IFRAME, {
|
634
644
|
stack: error
|
635
645
|
}));
|
@@ -667,31 +677,80 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
667
677
|
}
|
668
678
|
}, {
|
669
679
|
key: "createDialog",
|
670
|
-
value: function
|
671
|
-
var
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
680
|
+
value: function () {
|
681
|
+
var _createDialog = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(data) {
|
682
|
+
var pageUrl, isLoad, timeout, logTimeout;
|
683
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
684
|
+
while (1) switch (_context4.prev = _context4.next) {
|
685
|
+
case 0:
|
686
|
+
pageUrl = data.url.includes('?') ? "".concat(data.url, "&").concat(this._appLocationSearch) : "".concat(data.url, "?").concat(this._appLocationSearch);
|
687
|
+
_context4.prev = 1;
|
688
|
+
isLoad = false;
|
689
|
+
_context4.next = 5;
|
690
|
+
return createModal({
|
691
|
+
widthPadding: data === null || data === void 0 ? void 0 : data.widthPadding,
|
692
|
+
heightPadding: data === null || data === void 0 ? void 0 : data.heightPadding,
|
693
|
+
device: this.platform,
|
694
|
+
url: pageUrl
|
695
|
+
});
|
696
|
+
case 5:
|
697
|
+
this.popupApp = _context4.sent;
|
698
|
+
timeout = setTimeout(function () {
|
699
|
+
if (isLoad) return;
|
700
|
+
throw {
|
701
|
+
title: 'sdk_error_create_pop_up'
|
702
|
+
};
|
703
|
+
}, LOADTIME_LIMIT);
|
704
|
+
logTimeout = setTimeout(function () {
|
705
|
+
if (isLoad) return;
|
706
|
+
throw {
|
707
|
+
title: 'sdk_error_pop_up_time_out'
|
708
|
+
};
|
709
|
+
}, POPUP_LOADTIME_LOG_LIMIT);
|
710
|
+
this.popupApp.onload = function () {
|
711
|
+
isLoad = true;
|
712
|
+
clearTimeout(timeout);
|
713
|
+
clearTimeout(logTimeout);
|
714
|
+
};
|
715
|
+
_context4.next = 15;
|
716
|
+
break;
|
717
|
+
case 11:
|
718
|
+
_context4.prev = 11;
|
719
|
+
_context4.t0 = _context4["catch"](1);
|
720
|
+
this.AMSSDK.logger.logError({
|
721
|
+
title: (_context4.t0 === null || _context4.t0 === void 0 ? void 0 : _context4.t0.title) || 'sdk_error_create_pop_up'
|
722
|
+
}, {
|
723
|
+
message: _context4.t0 === null || _context4.t0 === void 0 ? void 0 : _context4.t0.message,
|
724
|
+
url: pageUrl
|
725
|
+
});
|
726
|
+
this.dispatchToSDK(EVENT.error.name, ERRORMESSAGE.CREATECOMPONENT_ERROR.LOAD_APP_TIMEOUT);
|
727
|
+
case 15:
|
728
|
+
case "end":
|
729
|
+
return _context4.stop();
|
730
|
+
}
|
731
|
+
}, _callee4, this, [[1, 11]]);
|
732
|
+
}));
|
733
|
+
function createDialog(_x4) {
|
734
|
+
return _createDialog.apply(this, arguments);
|
735
|
+
}
|
736
|
+
return createDialog;
|
737
|
+
}()
|
679
738
|
}, {
|
680
739
|
key: "getDeviceIdAndCallback",
|
681
740
|
value: function () {
|
682
|
-
var _getDeviceIdAndCallback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
741
|
+
var _getDeviceIdAndCallback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(eventContext) {
|
683
742
|
var deviceId;
|
684
|
-
return _regeneratorRuntime().wrap(function
|
685
|
-
while (1) switch (
|
743
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
744
|
+
while (1) switch (_context5.prev = _context5.next) {
|
686
745
|
case 0:
|
687
746
|
if (!(eventContext !== null && eventContext !== void 0 && eventContext.eventCallbackId)) {
|
688
|
-
|
747
|
+
_context5.next = 5;
|
689
748
|
break;
|
690
749
|
}
|
691
|
-
|
750
|
+
_context5.next = 3;
|
692
751
|
return this.getDeviceIdAndLog(eventContext === null || eventContext === void 0 ? void 0 : eventContext.data, true);
|
693
752
|
case 3:
|
694
|
-
deviceId =
|
753
|
+
deviceId = _context5.sent;
|
695
754
|
this.dispatchToApp({
|
696
755
|
context: {
|
697
756
|
event: 'appEventCallback',
|
@@ -703,11 +762,11 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
703
762
|
});
|
704
763
|
case 5:
|
705
764
|
case "end":
|
706
|
-
return
|
765
|
+
return _context5.stop();
|
707
766
|
}
|
708
|
-
},
|
767
|
+
}, _callee5, this);
|
709
768
|
}));
|
710
|
-
function getDeviceIdAndCallback(
|
769
|
+
function getDeviceIdAndCallback(_x5) {
|
711
770
|
return _getDeviceIdAndCallback.apply(this, arguments);
|
712
771
|
}
|
713
772
|
return getDeviceIdAndCallback;
|
@@ -715,9 +774,9 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
715
774
|
}, {
|
716
775
|
key: "getUserAgentAndCallback",
|
717
776
|
value: function () {
|
718
|
-
var _getUserAgentAndCallback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
719
|
-
return _regeneratorRuntime().wrap(function
|
720
|
-
while (1) switch (
|
777
|
+
var _getUserAgentAndCallback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(eventContext) {
|
778
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
779
|
+
while (1) switch (_context6.prev = _context6.next) {
|
721
780
|
case 0:
|
722
781
|
if (eventContext !== null && eventContext !== void 0 && eventContext.eventCallbackId) {
|
723
782
|
try {
|
@@ -726,19 +785,22 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
726
785
|
event: 'appEventCallback',
|
727
786
|
eventCallbackId: eventContext === null || eventContext === void 0 ? void 0 : eventContext.eventCallbackId,
|
728
787
|
data: {
|
729
|
-
|
788
|
+
// TODO 预发前删除window.location.search,这个是用于调试配置的后门
|
789
|
+
userAgent: window.navigator.userAgent + window.location.search
|
730
790
|
}
|
731
791
|
}
|
732
792
|
});
|
733
|
-
} catch (error) {
|
793
|
+
} catch (error) {
|
794
|
+
/* empty */
|
795
|
+
}
|
734
796
|
}
|
735
797
|
case 1:
|
736
798
|
case "end":
|
737
|
-
return
|
799
|
+
return _context6.stop();
|
738
800
|
}
|
739
|
-
},
|
801
|
+
}, _callee6, this);
|
740
802
|
}));
|
741
|
-
function getUserAgentAndCallback(
|
803
|
+
function getUserAgentAndCallback(_x6) {
|
742
804
|
return _getUserAgentAndCallback.apply(this, arguments);
|
743
805
|
}
|
744
806
|
return getUserAgentAndCallback;
|
@@ -746,10 +808,10 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
746
808
|
}, {
|
747
809
|
key: "returnDataAndCallback",
|
748
810
|
value: function () {
|
749
|
-
var _returnDataAndCallback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
811
|
+
var _returnDataAndCallback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(eventContext) {
|
750
812
|
var _eventContext$data, targetData;
|
751
|
-
return _regeneratorRuntime().wrap(function
|
752
|
-
while (1) switch (
|
813
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
814
|
+
while (1) switch (_context7.prev = _context7.next) {
|
753
815
|
case 0:
|
754
816
|
if (eventContext !== null && eventContext !== void 0 && eventContext.eventCallbackId) {
|
755
817
|
targetData = this._globalData.get((_eventContext$data = eventContext.data) === null || _eventContext$data === void 0 ? void 0 : _eventContext$data.dataKey);
|
@@ -763,11 +825,11 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
763
825
|
}
|
764
826
|
case 1:
|
765
827
|
case "end":
|
766
|
-
return
|
828
|
+
return _context7.stop();
|
767
829
|
}
|
768
|
-
},
|
830
|
+
}, _callee7, this);
|
769
831
|
}));
|
770
|
-
function returnDataAndCallback(
|
832
|
+
function returnDataAndCallback(_x7) {
|
771
833
|
return _returnDataAndCallback.apply(this, arguments);
|
772
834
|
}
|
773
835
|
return returnDataAndCallback;
|
@@ -824,7 +886,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
824
886
|
this._globalData.set((_data$context$data = data.context.data) === null || _data$context$data === void 0 ? void 0 : _data$context$data.dataKey, (_data$context$data2 = data.context.data) === null || _data$context$data2 === void 0 ? void 0 : _data$context$data2.data);
|
825
887
|
return;
|
826
888
|
}
|
827
|
-
if (data.context.event === EVENT.
|
889
|
+
if (data.context.event === EVENT.popupWindow.name) {
|
828
890
|
var _data$context;
|
829
891
|
this.createDialog((_data$context = data.context) === null || _data$context === void 0 ? void 0 : _data$context.data);
|
830
892
|
return;
|
@@ -1123,27 +1185,27 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
1123
1185
|
*/
|
1124
1186
|
}, {
|
1125
1187
|
key: "sendRenderEvent",
|
1126
|
-
value: function () {
|
1127
|
-
var _sendRenderEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
1188
|
+
value: (function () {
|
1189
|
+
var _sendRenderEvent = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
|
1128
1190
|
var _this$_renderParams6, _this$_renderParams7, _this$_renderParams8, _this$_renderParams9, _this$_renderParams10, res, submitRes;
|
1129
|
-
return _regeneratorRuntime().wrap(function
|
1130
|
-
while (1) switch (
|
1191
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
1192
|
+
while (1) switch (_context8.prev = _context8.next) {
|
1131
1193
|
case 0:
|
1132
|
-
|
1194
|
+
_context8.prev = 0;
|
1133
1195
|
if (!(!this._actionQueryPromise || !this._actionSubmitPromise)) {
|
1134
|
-
|
1196
|
+
_context8.next = 3;
|
1135
1197
|
break;
|
1136
1198
|
}
|
1137
|
-
return
|
1199
|
+
return _context8.abrupt("return");
|
1138
1200
|
case 3:
|
1139
|
-
|
1201
|
+
_context8.next = 5;
|
1140
1202
|
return this._actionQueryPromise;
|
1141
1203
|
case 5:
|
1142
|
-
res =
|
1143
|
-
|
1204
|
+
res = _context8.sent;
|
1205
|
+
_context8.next = 8;
|
1144
1206
|
return this._actionSubmitPromise;
|
1145
1207
|
case 8:
|
1146
|
-
submitRes =
|
1208
|
+
submitRes = _context8.sent;
|
1147
1209
|
this._performanceData.push({
|
1148
1210
|
key: 'sdk_render_component',
|
1149
1211
|
value: Date.now()
|
@@ -1176,16 +1238,16 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
1176
1238
|
}
|
1177
1239
|
});
|
1178
1240
|
// eslint-disable-next-line no-empty
|
1179
|
-
|
1241
|
+
_context8.next = 16;
|
1180
1242
|
break;
|
1181
1243
|
case 14:
|
1182
|
-
|
1183
|
-
|
1244
|
+
_context8.prev = 14;
|
1245
|
+
_context8.t0 = _context8["catch"](0);
|
1184
1246
|
case 16:
|
1185
1247
|
case "end":
|
1186
|
-
return
|
1248
|
+
return _context8.stop();
|
1187
1249
|
}
|
1188
|
-
},
|
1250
|
+
}, _callee8, this, [[0, 14]]);
|
1189
1251
|
}));
|
1190
1252
|
function sendRenderEvent() {
|
1191
1253
|
return _sendRenderEvent.apply(this, arguments);
|
@@ -1195,6 +1257,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
1195
1257
|
/**
|
1196
1258
|
* @description close cashier
|
1197
1259
|
*/
|
1260
|
+
)
|
1198
1261
|
}, {
|
1199
1262
|
key: "cleanContainer",
|
1200
1263
|
value: function cleanContainer() {
|