@alipay/ams-checkout 0.0.1708315090-dev.0 → 0.0.1708315090-dev.2
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.
@@ -357,8 +357,8 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
357
357
|
// eslint-disable-next-line no-async-promise-executor
|
358
358
|
this._actionQueryPromise = new Promise( /*#__PURE__*/function () {
|
359
359
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(resolve, reject) {
|
360
|
-
var _this5$_renderParams, _this5$_renderParams2, _this5$_renderParams3, _this5$_renderParams4, _this5$_renderParams5;
|
361
|
-
var envInfo, params, _this5$_renderParams$, extendInfo, enableVaultingApiOptimize, extendInfoData, _this5$
|
360
|
+
var _this5$_renderParams, _this5$_renderParams2, _this5$_renderParams3, _this5$_renderParams4, _this5$_renderParams5, _this5$_renderParams6;
|
361
|
+
var envInfo, params, _this5$_renderParams$, extendInfo, enableVaultingApiOptimize, extendInfoData, _this5$_renderParams$2, _this5$_renderParams$3, paymentSessionFactor, _this5$_renderParams7, _ref3, _ref3$productSceneVer, productSceneVersion, _ref3$productScene, productScene, _ref4, _ref4$action, _ref4$action2, _ref4$action2$autoDeb, autoDebitWithToken, _this5$_renderParams8, _action$web, _action$wap, action, signType;
|
362
362
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
363
363
|
while (1) switch (_context2.prev = _context2.next) {
|
364
364
|
case 0:
|
@@ -391,78 +391,81 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
391
391
|
success: true
|
392
392
|
}));
|
393
393
|
case 7:
|
394
|
-
|
395
|
-
|
394
|
+
// 绑卡跳过actionQuery接口
|
395
|
+
// paymentSessionFactor 该字段没值则走不跳过接口逻辑
|
396
|
+
_this5$_renderParams$2 = (_this5$_renderParams5 = _this5._renderParams) === null || _this5$_renderParams5 === void 0 ? void 0 : _this5$_renderParams5.paymentSessionMetaData, _this5$_renderParams$3 = _this5$_renderParams$2.paymentSessionFactor, paymentSessionFactor = _this5$_renderParams$3 === void 0 ? null : _this5$_renderParams$3;
|
397
|
+
if (!(componentSignEnum.VAULTING_CARD === _this5._componentSign && (_this5$_renderParams6 = _this5._renderParams) !== null && _this5$_renderParams6 !== void 0 && (_this5$_renderParams6 = _this5$_renderParams6.paymentSessionMetaData) !== null && _this5$_renderParams6 !== void 0 && (_this5$_renderParams6 = _this5$_renderParams6.action) !== null && _this5$_renderParams6 !== void 0 && _this5$_renderParams6.skipSdkQuery && enableVaultingApiOptimize && paymentSessionFactor)) {
|
398
|
+
_context2.next = 10;
|
396
399
|
break;
|
397
400
|
}
|
398
401
|
return _context2.abrupt("return", resolve({
|
399
402
|
message: 'sdk no need to make query request',
|
400
403
|
success: true
|
401
404
|
}));
|
402
|
-
case
|
405
|
+
case 10:
|
403
406
|
if (!(componentSignEnum.CASHIER_PAYMENT_CARD === _this5._componentSign || componentSignEnum.VAULTING_CARD === _this5._componentSign)) {
|
404
|
-
_context2.next =
|
407
|
+
_context2.next = 16;
|
405
408
|
break;
|
406
409
|
}
|
407
410
|
params.paymentMethodType = 'CARD';
|
408
|
-
_context2.next =
|
411
|
+
_context2.next = 14;
|
409
412
|
return _this5.getDeviceIdAndLog();
|
410
|
-
case
|
413
|
+
case 14:
|
411
414
|
envInfo.deviceId = _context2.sent;
|
412
415
|
if (window.navigator.userAgent.indexOf('miniProgram') > -1) {
|
413
416
|
envInfo.extendInfo = {
|
414
417
|
WAP_SUB_TYPE: 'WECHAT_MINI_PROGRAM'
|
415
418
|
};
|
416
419
|
}
|
417
|
-
case
|
420
|
+
case 16:
|
418
421
|
if (!(componentSignEnum.EASY_PAY_WALLET === _this5._componentSign)) {
|
419
|
-
_context2.next =
|
422
|
+
_context2.next = 24;
|
420
423
|
break;
|
421
424
|
}
|
422
425
|
_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;
|
423
|
-
_ref4 = ((_this5$
|
426
|
+
_ref4 = ((_this5$_renderParams7 = _this5._renderParams) === null || _this5$_renderParams7 === void 0 ? void 0 : _this5$_renderParams7.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;
|
424
427
|
if (!(productScene === productSceneEnum.EASY_PAY && productSceneVersion === '2.0' && !autoDebitWithToken)) {
|
425
|
-
_context2.next =
|
428
|
+
_context2.next = 21;
|
426
429
|
break;
|
427
430
|
}
|
428
431
|
return _context2.abrupt("return", resolve({
|
429
432
|
message: 'sdk no need to make query request',
|
430
433
|
success: true
|
431
434
|
}));
|
432
|
-
case
|
433
|
-
_context2.next =
|
435
|
+
case 21:
|
436
|
+
_context2.next = 23;
|
434
437
|
return _this5.getDeviceIdAndLog();
|
435
|
-
case 22:
|
436
|
-
envInfo.deviceId = _context2.sent;
|
437
438
|
case 23:
|
439
|
+
envInfo.deviceId = _context2.sent;
|
440
|
+
case 24:
|
438
441
|
if (!(componentSignEnum.AUTO_DEBIT_WALLET === _this5._componentSign)) {
|
439
|
-
_context2.next =
|
442
|
+
_context2.next = 34;
|
440
443
|
break;
|
441
444
|
}
|
442
|
-
action = ((_this5$
|
445
|
+
action = ((_this5$_renderParams8 = _this5._renderParams) === null || _this5$_renderParams8 === void 0 || (_this5$_renderParams8 = _this5$_renderParams8.paymentSessionMetaData) === null || _this5$_renderParams8 === void 0 ? void 0 : _this5$_renderParams8.action) || {};
|
443
446
|
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;
|
444
447
|
if (!(signType === 'SMS')) {
|
445
|
-
_context2.next =
|
448
|
+
_context2.next = 29;
|
446
449
|
break;
|
447
450
|
}
|
448
451
|
return _context2.abrupt("return", resolve({
|
449
452
|
message: 'sdk no need to make query request',
|
450
453
|
success: true
|
451
454
|
}));
|
452
|
-
case
|
455
|
+
case 29:
|
453
456
|
if (!(!signType || signType !== 'REDIRECT')) {
|
454
|
-
_context2.next =
|
457
|
+
_context2.next = 31;
|
455
458
|
break;
|
456
459
|
}
|
457
460
|
return _context2.abrupt("return", resolve({
|
458
461
|
success: false
|
459
462
|
}));
|
460
|
-
case
|
461
|
-
_context2.next =
|
463
|
+
case 31:
|
464
|
+
_context2.next = 33;
|
462
465
|
return _this5.getDeviceIdAndLog();
|
463
|
-
case 32:
|
464
|
-
envInfo.deviceId = _context2.sent;
|
465
466
|
case 33:
|
467
|
+
envInfo.deviceId = _context2.sent;
|
468
|
+
case 34:
|
466
469
|
_this5.AMSSDK.logger.logInfo({
|
467
470
|
title: 'sdk_event_sdkQuery'
|
468
471
|
}, {
|
@@ -494,7 +497,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
494
497
|
paymentSessionConfig: JSON.stringify(params.paymentSessionConfig)
|
495
498
|
}).send();
|
496
499
|
});
|
497
|
-
case
|
500
|
+
case 36:
|
498
501
|
case "end":
|
499
502
|
return _context2.stop();
|
500
503
|
}
|