@alipay/ams-checkout 0.0.1757298389-dev.1 → 0.0.1757298389-dev.3
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/core/component/element/elementContainerService/containerService.js +3 -2
- package/esm/core/component/element/elementController/index.js +1 -3
- package/esm/core/component/element/elementProcessor/paymentProcessor.js +7 -6
- package/package.json +1 -1
@@ -19,7 +19,7 @@ export var IContainerStatus = /*#__PURE__*/function (IContainerStatus) {
|
|
19
19
|
}({});
|
20
20
|
export var ContainerController = /*#__PURE__*/function () {
|
21
21
|
function ContainerController(_ref) {
|
22
|
-
var _options$debugProps;
|
22
|
+
var _options$debugProps, _options$debugProps2;
|
23
23
|
var type = _ref.type,
|
24
24
|
instanceId = _ref.instanceId,
|
25
25
|
selector = _ref.selector,
|
@@ -41,6 +41,7 @@ export var ContainerController = /*#__PURE__*/function () {
|
|
41
41
|
sdkVersion: '',
|
42
42
|
webAppVersion: ''
|
43
43
|
});
|
44
|
+
var iframesSrcLink = options !== null && options !== void 0 && (_options$debugProps = options.debugProps) !== null && _options$debugProps !== void 0 && _options$debugProps.isDebug ? (options === null || options === void 0 || (_options$debugProps2 = options.debugProps) === null || _options$debugProps2 === void 0 ? void 0 : _options$debugProps2.localLink) || '' : '';
|
44
45
|
this.containerElement = this.containerService.load({
|
45
46
|
type: DisplayTypeEnum.inline,
|
46
47
|
platform: isElementPad() ? PlatformEnum.desktop : isElementPC() ? PlatformEnum.desktop : PlatformEnum.mobile,
|
@@ -51,7 +52,7 @@ export var ContainerController = /*#__PURE__*/function () {
|
|
51
52
|
display: 'block'
|
52
53
|
}
|
53
54
|
}, processor.generateIframeSrc({
|
54
|
-
link:
|
55
|
+
link: iframesSrcLink,
|
55
56
|
instanceId: this.instanceId
|
56
57
|
}));
|
57
58
|
this.eventService = ServiceProvider.getInstance(this.instanceId).getService('EventCenter');
|
@@ -226,9 +226,7 @@ var ElementController = /*#__PURE__*/function () {
|
|
226
226
|
return _this3.onValidateFunc((_this3$elementProcess2 = _this3.elementProcessors[ElementType.payment]) === null || _this3$elementProcess2 === void 0 ? void 0 : _this3$elementProcess2.eventCenter, ElementPaymentMethod.PAYMENT_ELEMENT);
|
227
227
|
case 4:
|
228
228
|
validateResult = _context.sent;
|
229
|
-
return _context.abrupt("return", resolve(
|
230
|
-
isValid: validateResult.data.success
|
231
|
-
}));
|
229
|
+
return _context.abrupt("return", resolve(validateResult.data));
|
232
230
|
case 8:
|
233
231
|
_context.prev = 8;
|
234
232
|
_context.t0 = _context["catch"](1);
|
@@ -242,18 +242,19 @@ var PaymentProcessor = /*#__PURE__*/function (_BaseElementProcessor) {
|
|
242
242
|
value: function () {
|
243
243
|
var _obtainData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
244
244
|
var _paymentSessionObj$co;
|
245
|
-
var requestService, _this$elementContaine8, paymentSession, paymentSessionObj, displayInfo,
|
245
|
+
var requestService, _this$elementContaine8, paymentSession, paymentSessionObj, displayInfo, _displayInfo, debugProps, _this$options2, environment, locale, _ref4, paymentSessionConfig, hostSign, isConnect, LOCAL_MOCK, _queryParse, appType, terminalType, generateActionQueryPromise, generateOneAccountQueryPromise, _yield$Promise$all, _yield$Promise$all2, originActionQueryResult, originOneAccountQueryResult;
|
246
246
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
247
247
|
while (1) switch (_context2.prev = _context2.next) {
|
248
248
|
case 0:
|
249
249
|
requestService = ServiceProvider.getInstance(this.instanceId).getService('Requester');
|
250
250
|
_this$elementContaine8 = this.elementContainer.getPaymentContext(), paymentSession = _this$elementContaine8.paymentSession, paymentSessionObj = _this$elementContaine8.paymentSessionObj, displayInfo = _this$elementContaine8.displayInfo;
|
251
|
-
|
251
|
+
_displayInfo = displayInfo;
|
252
|
+
debugProps = _displayInfo.debugProps;
|
252
253
|
_this$options2 = this.options, environment = _this$options2.env.environment, locale = _this$options2.locale;
|
253
254
|
_ref4 = paymentSessionObj || {}, paymentSessionConfig = _ref4.paymentSessionConfig;
|
254
255
|
hostSign = paymentSession.split('&&')[1] || '';
|
255
256
|
isConnect = paymentSessionObj === null || paymentSessionObj === void 0 || (_paymentSessionObj$co = paymentSessionObj.connectFactor) === null || _paymentSessionObj$co === void 0 ? void 0 : _paymentSessionObj$co.enableConnect;
|
256
|
-
LOCAL_MOCK =
|
257
|
+
LOCAL_MOCK = (debugProps === null || debugProps === void 0 ? void 0 : debugProps.isDebug) && (debugProps === null || debugProps === void 0 ? void 0 : debugProps.local_mock);
|
257
258
|
_queryParse = queryParse(this.getElementUrl()), appType = _queryParse.appType;
|
258
259
|
terminalType = isElementPad() ? 'WEB' : appType ? 'APP' : isElementPC() ? 'WEB' : 'WAP';
|
259
260
|
generateActionQueryPromise = function generateActionQueryPromise() {
|
@@ -322,9 +323,9 @@ var PaymentProcessor = /*#__PURE__*/function (_BaseElementProcessor) {
|
|
322
323
|
});
|
323
324
|
});
|
324
325
|
};
|
325
|
-
_context2.next =
|
326
|
+
_context2.next = 15;
|
326
327
|
return Promise.all(isConnect ? [generateActionQueryPromise(), generateOneAccountQueryPromise()] : [generateActionQueryPromise()]);
|
327
|
-
case
|
328
|
+
case 15:
|
328
329
|
_yield$Promise$all = _context2.sent;
|
329
330
|
_yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 2);
|
330
331
|
originActionQueryResult = _yield$Promise$all2[0];
|
@@ -337,7 +338,7 @@ var PaymentProcessor = /*#__PURE__*/function (_BaseElementProcessor) {
|
|
337
338
|
originActionQueryResult: originActionQueryResult,
|
338
339
|
originOneAccountQueryResult: originOneAccountQueryResult
|
339
340
|
});
|
340
|
-
case
|
341
|
+
case 21:
|
341
342
|
case "end":
|
342
343
|
return _context2.stop();
|
343
344
|
}
|