@alipay/ams-checkout 0.0.1709536306-dev.0 → 0.0.1709536306-dev.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.
@@ -52,7 +52,7 @@ var AMSSDK = /*#__PURE__*/function () {
|
|
52
52
|
this._storageId = _storageId;
|
53
53
|
|
54
54
|
// TODO Consumption data analysis control parameters
|
55
|
-
this.logger = new Logger(LogConfig, (options === null || options === void 0 ? void 0 : options.environment)
|
55
|
+
this.logger = new Logger(LogConfig, ![environmentEnum.prod, environmentEnum.sandbox].includes(options === null || options === void 0 ? void 0 : options.environment));
|
56
56
|
this.logger.setMedta({
|
57
57
|
instanceId: this._instanceId
|
58
58
|
});
|
@@ -53,7 +53,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
53
53
|
_defineProperty(this, "_multipleCallbackEvents", void 0);
|
54
54
|
_defineProperty(this, "_merchantAppointParam", void 0);
|
55
55
|
_defineProperty(this, "_webAppHeartBeatTimeoutFn", void 0);
|
56
|
-
this._appVersion = '1.
|
56
|
+
this._appVersion = '1.11.0.5';
|
57
57
|
this._isInitComponent = false;
|
58
58
|
this._selector = "#".concat(COMPONENT_SECTION_ID);
|
59
59
|
this.createIframeNode = function () {
|
@@ -363,7 +363,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
363
363
|
this._actionQueryPromise = new Promise( /*#__PURE__*/function () {
|
364
364
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(resolve, reject) {
|
365
365
|
var _this5$_renderParams, _this5$_renderParams2, _this5$_renderParams3, _this5$_renderParams4, _this5$_renderParams5;
|
366
|
-
var envInfo, params,
|
366
|
+
var envInfo, params, _ref3, _ref3$extendInfo, extendInfo, enableVaultingApiOptimize, enableEasypayApiOptimize, extendInfoData, _this5$_renderParams6, _this5$_renderParams7, _ref4, _ref4$productSceneVer, productSceneVersion, _ref4$productScene, productScene, _ref5, _ref5$action, _ref5$action2, _ref5$action2$autoDeb, autoDebitWithToken, _this5$_renderParams8, _action$web, _action$wap, action, signType;
|
367
367
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
368
368
|
while (1) switch (_context2.prev = _context2.next) {
|
369
369
|
case 0:
|
@@ -379,7 +379,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
379
379
|
/**
|
380
380
|
* @description Simulated or unnecessary scenarios
|
381
381
|
*/
|
382
|
-
|
382
|
+
_ref3 = ((_this5$_renderParams4 = _this5._renderParams) === null || _this5$_renderParams4 === void 0 ? void 0 : _this5$_renderParams4.paymentSessionMetaData) || {}, _ref3$extendInfo = _ref3.extendInfo, extendInfo = _ref3$extendInfo === void 0 ? '' : _ref3$extendInfo;
|
383
383
|
enableVaultingApiOptimize = false;
|
384
384
|
enableEasypayApiOptimize = false;
|
385
385
|
try {
|
@@ -426,8 +426,8 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
426
426
|
_context2.next = 26;
|
427
427
|
break;
|
428
428
|
}
|
429
|
-
|
430
|
-
|
429
|
+
_ref4 = params.paymentSessionConfig || {}, _ref4$productSceneVer = _ref4.productSceneVersion, productSceneVersion = _ref4$productSceneVer === void 0 ? '' : _ref4$productSceneVer, _ref4$productScene = _ref4.productScene, productScene = _ref4$productScene === void 0 ? '' : _ref4$productScene;
|
430
|
+
_ref5 = ((_this5$_renderParams6 = _this5._renderParams) === null || _this5$_renderParams6 === void 0 ? void 0 : _this5$_renderParams6.paymentSessionMetaData) || {}, _ref5$action = _ref5.action, _ref5$action2 = _ref5$action === void 0 ? {} : _ref5$action, _ref5$action2$autoDeb = _ref5$action2.autoDebitWithToken, autoDebitWithToken = _ref5$action2$autoDeb === void 0 ? false : _ref5$action2$autoDeb;
|
431
431
|
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)) {
|
432
432
|
_context2.next = 21;
|
433
433
|
break;
|
@@ -541,7 +541,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
541
541
|
|
542
542
|
// eslint-disable-next-line no-async-promise-executor
|
543
543
|
this._actionSubmitPromise = new Promise( /*#__PURE__*/function () {
|
544
|
-
var
|
544
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(resolve) {
|
545
545
|
var _this6$_renderParams;
|
546
546
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
547
547
|
while (1) switch (_context3.prev = _context3.next) {
|
@@ -604,7 +604,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
604
604
|
}, _callee3);
|
605
605
|
}));
|
606
606
|
return function (_x3) {
|
607
|
-
return
|
607
|
+
return _ref6.apply(this, arguments);
|
608
608
|
};
|
609
609
|
}());
|
610
610
|
}
|
@@ -1195,9 +1195,9 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
1195
1195
|
}
|
1196
1196
|
}, {
|
1197
1197
|
key: "handleDeclareInfo",
|
1198
|
-
value: function handleDeclareInfo(
|
1199
|
-
var
|
1200
|
-
closeDialogData =
|
1198
|
+
value: function handleDeclareInfo(_ref7) {
|
1199
|
+
var _ref7$closeDialogData = _ref7.closeDialogData,
|
1200
|
+
closeDialogData = _ref7$closeDialogData === void 0 ? {} : _ref7$closeDialogData;
|
1201
1201
|
_handleDeclareInfo({
|
1202
1202
|
closeDialogData: closeDialogData
|
1203
1203
|
});
|
package/esm/request/index.js
CHANGED
@@ -50,8 +50,6 @@ function requestInstance(options) {
|
|
50
50
|
withCredentials: (_options$withCredenti = options.withCredentials) !== null && _options$withCredenti !== void 0 ? _options$withCredenti : true,
|
51
51
|
method: (options === null || options === void 0 ? void 0 : options.method) || 'POST'
|
52
52
|
});
|
53
|
-
console.log('baseURL', baseURL);
|
54
|
-
console.log('_headers', _headers);
|
55
53
|
return instance.request;
|
56
54
|
}
|
57
55
|
|
@@ -99,25 +97,21 @@ function _request() {
|
|
99
97
|
})];
|
100
98
|
startTime = Date.now();
|
101
99
|
_context.prev = 5;
|
102
|
-
console.log('requestInstance options', options);
|
103
|
-
console.log('requestInstance -data', _data);
|
104
100
|
myRequest = requestInstance(options);
|
105
|
-
_context.next =
|
101
|
+
_context.next = 9;
|
106
102
|
return myRequest({
|
107
103
|
data: _data
|
108
104
|
});
|
109
|
-
case
|
105
|
+
case 9:
|
110
106
|
_yield$myRequest = _context.sent;
|
111
107
|
data = _yield$myRequest.data;
|
112
108
|
headers = _yield$myRequest.headers;
|
113
|
-
console.log('requestInstance data', data);
|
114
|
-
console.log('requestInstance headers', headers);
|
115
109
|
resData = data || {};
|
116
110
|
traceId = get(headers, 'Mgw-TraceId') || get(headers, 'mgw-traceid', '');
|
117
111
|
resData.traceId = traceId || '';
|
118
112
|
handleGetWayError = fomatGetwayError(headers, traceId);
|
119
113
|
if (!(handleGetWayError !== null && handleGetWayError !== void 0 && handleGetWayError.errorCode)) {
|
120
|
-
_context.next =
|
114
|
+
_context.next = 21;
|
121
115
|
break;
|
122
116
|
}
|
123
117
|
errorMessage = (resData === null || resData === void 0 ? void 0 : resData.errorMessage) || (handleGetWayError === null || handleGetWayError === void 0 ? void 0 : handleGetWayError.errorMessage);
|
@@ -136,7 +130,7 @@ function _request() {
|
|
136
130
|
errorCode: errorCode,
|
137
131
|
success: false
|
138
132
|
}));
|
139
|
-
case
|
133
|
+
case 21:
|
140
134
|
logger.reportRPC({
|
141
135
|
name: options === null || options === void 0 ? void 0 : options['Operation-Type'],
|
142
136
|
label: 'request',
|
@@ -147,8 +141,8 @@ function _request() {
|
|
147
141
|
traceId: traceId
|
148
142
|
}).send();
|
149
143
|
return _context.abrupt("return", resData);
|
150
|
-
case
|
151
|
-
_context.prev =
|
144
|
+
case 25:
|
145
|
+
_context.prev = 25;
|
152
146
|
_context.t0 = _context["catch"](5);
|
153
147
|
_error = safeJson(_context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.message, {
|
154
148
|
success: false,
|
@@ -170,11 +164,11 @@ function _request() {
|
|
170
164
|
errorCode: _errorCode,
|
171
165
|
errorMessage: _error === null || _error === void 0 ? void 0 : _error.message
|
172
166
|
}));
|
173
|
-
case
|
167
|
+
case 32:
|
174
168
|
case "end":
|
175
169
|
return _context.stop();
|
176
170
|
}
|
177
|
-
}, _callee, null, [[5,
|
171
|
+
}, _callee, null, [[5, 25]]);
|
178
172
|
}));
|
179
173
|
return _request.apply(this, arguments);
|
180
174
|
}
|