@alipay/ams-checkout 0.0.1708315090-dev.6 → 0.0.1708315090-dev.8

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.
@@ -222,7 +222,7 @@ export var AMSComponent = /*#__PURE__*/function (_CoreInstance) {
222
222
  var _this3 = this;
223
223
  this.channelType = channelType;
224
224
  this.productSceneVersion = productSceneVersion;
225
- var MAX_CLEAR_TIME = 90000;
225
+ var MAX_CLEAR_TIME = 10000;
226
226
  if (Array.isArray(channelType)) {
227
227
  for (var i = 0; i < channelType.length; i++) {
228
228
  this._componentApp.appendPreloadIframeNodes(channelType[i], productSceneVersion);
@@ -364,7 +364,7 @@ var ComponentApp = /*#__PURE__*/function () {
364
364
  this._actionQueryPromise = new Promise( /*#__PURE__*/function () {
365
365
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(resolve, reject) {
366
366
  var _this5$_renderParams, _this5$_renderParams2, _this5$_renderParams3, _this5$_renderParams4, _this5$_renderParams5;
367
- var envInfo, params, _this5$_renderParams$, extendInfo, enableVaultingApiOptimize, extendInfoData, _this5$_renderParams6, _ref3, _ref3$productSceneVer, productSceneVersion, _ref3$productScene, productScene, _ref4, _ref4$action, _ref4$action2, _ref4$action2$autoDeb, autoDebitWithToken, _this5$_renderParams7, _action$web, _action$wap, action, signType;
367
+ var envInfo, params, _this5$_renderParams$, extendInfo, enableVaultingApiOptimize, enableEasypayApiOptimize, extendInfoData, _this5$_renderParams6, _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;
368
368
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
369
369
  while (1) switch (_context2.prev = _context2.next) {
370
370
  case 0:
@@ -382,93 +382,104 @@ var ComponentApp = /*#__PURE__*/function () {
382
382
  */
383
383
  _this5$_renderParams$ = (_this5$_renderParams4 = _this5._renderParams) === null || _this5$_renderParams4 === void 0 ? void 0 : _this5$_renderParams4.paymentSessionMetaData, extendInfo = _this5$_renderParams$.extendInfo;
384
384
  enableVaultingApiOptimize = false;
385
+ enableEasypayApiOptimize = false;
385
386
  try {
386
387
  extendInfoData = JSON.parse(extendInfo);
387
388
  enableVaultingApiOptimize = extendInfoData.enableVaultingApiOptimize || false;
389
+ enableEasypayApiOptimize = extendInfoData.enableEasypayApiOptimize || false;
388
390
  } catch (error) {
389
391
  console.log(error);
390
392
  }
391
393
  if (!isLocalMock()) {
392
- _context2.next = 7;
394
+ _context2.next = 8;
393
395
  break;
394
396
  }
395
397
  return _context2.abrupt("return", resolve({
396
398
  message: 'sdk no need to make query request',
397
399
  success: true
398
400
  }));
399
- case 7:
401
+ case 8:
400
402
  if (!(componentSignEnum.VAULTING_CARD === _this5._componentSign && (_this5$_renderParams5 = _this5._renderParams) !== null && _this5$_renderParams5 !== void 0 && (_this5$_renderParams5 = _this5$_renderParams5.paymentSessionMetaData) !== null && _this5$_renderParams5 !== void 0 && (_this5$_renderParams5 = _this5$_renderParams5.action) !== null && _this5$_renderParams5 !== void 0 && _this5$_renderParams5.skipSdkQuery && enableVaultingApiOptimize)) {
401
- _context2.next = 9;
403
+ _context2.next = 10;
402
404
  break;
403
405
  }
404
406
  return _context2.abrupt("return", resolve({
405
407
  message: 'sdk no need to make query request',
406
408
  success: true
407
409
  }));
408
- case 9:
410
+ case 10:
409
411
  if (!(componentSignEnum.CASHIER_PAYMENT_CARD === _this5._componentSign || componentSignEnum.VAULTING_CARD === _this5._componentSign)) {
410
- _context2.next = 15;
412
+ _context2.next = 16;
411
413
  break;
412
414
  }
413
415
  params.paymentMethodType = 'CARD';
414
- _context2.next = 13;
416
+ _context2.next = 14;
415
417
  return _this5.getDeviceIdAndLog();
416
- case 13:
418
+ case 14:
417
419
  envInfo.deviceId = _context2.sent;
418
420
  if (window.navigator.userAgent.indexOf('miniProgram') > -1) {
419
421
  envInfo.extendInfo = {
420
422
  WAP_SUB_TYPE: 'WECHAT_MINI_PROGRAM'
421
423
  };
422
424
  }
423
- case 15:
425
+ case 16:
424
426
  if (!(componentSignEnum.EASY_PAY_WALLET === _this5._componentSign)) {
425
- _context2.next = 23;
427
+ _context2.next = 26;
426
428
  break;
427
429
  }
428
430
  _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;
429
431
  _ref4 = ((_this5$_renderParams6 = _this5._renderParams) === null || _this5$_renderParams6 === void 0 ? void 0 : _this5$_renderParams6.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;
432
+ 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)) {
433
+ _context2.next = 21;
434
+ break;
435
+ }
436
+ return _context2.abrupt("return", resolve({
437
+ message: 'sdk no need to make query request',
438
+ success: true
439
+ }));
440
+ case 21:
430
441
  if (!(productScene === productSceneEnum.EASY_PAY && productSceneVersion === '2.0' && !autoDebitWithToken)) {
431
- _context2.next = 20;
442
+ _context2.next = 23;
432
443
  break;
433
444
  }
434
445
  return _context2.abrupt("return", resolve({
435
446
  message: 'sdk no need to make query request',
436
447
  success: true
437
448
  }));
438
- case 20:
439
- _context2.next = 22;
449
+ case 23:
450
+ _context2.next = 25;
440
451
  return _this5.getDeviceIdAndLog();
441
- case 22:
452
+ case 25:
442
453
  envInfo.deviceId = _context2.sent;
443
- case 23:
454
+ case 26:
444
455
  if (!(componentSignEnum.AUTO_DEBIT_WALLET === _this5._componentSign)) {
445
- _context2.next = 33;
456
+ _context2.next = 36;
446
457
  break;
447
458
  }
448
- action = ((_this5$_renderParams7 = _this5._renderParams) === null || _this5$_renderParams7 === void 0 || (_this5$_renderParams7 = _this5$_renderParams7.paymentSessionMetaData) === null || _this5$_renderParams7 === void 0 ? void 0 : _this5$_renderParams7.action) || {};
459
+ 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) || {};
449
460
  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;
450
461
  if (!(signType === 'SMS')) {
451
- _context2.next = 28;
462
+ _context2.next = 31;
452
463
  break;
453
464
  }
454
465
  return _context2.abrupt("return", resolve({
455
466
  message: 'sdk no need to make query request',
456
467
  success: true
457
468
  }));
458
- case 28:
469
+ case 31:
459
470
  if (!(!signType || signType !== 'REDIRECT')) {
460
- _context2.next = 30;
471
+ _context2.next = 33;
461
472
  break;
462
473
  }
463
474
  return _context2.abrupt("return", resolve({
464
475
  success: false
465
476
  }));
466
- case 30:
467
- _context2.next = 32;
477
+ case 33:
478
+ _context2.next = 35;
468
479
  return _this5.getDeviceIdAndLog();
469
- case 32:
480
+ case 35:
470
481
  envInfo.deviceId = _context2.sent;
471
- case 33:
482
+ case 36:
472
483
  _this5.AMSSDK.logger.logInfo({
473
484
  title: 'sdk_event_sdkQuery'
474
485
  }, {
@@ -500,7 +511,7 @@ var ComponentApp = /*#__PURE__*/function () {
500
511
  paymentSessionConfig: JSON.stringify(params.paymentSessionConfig)
501
512
  }).send();
502
513
  });
503
- case 35:
514
+ case 38:
504
515
  case "end":
505
516
  return _context2.stop();
506
517
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alipay/ams-checkout",
3
- "version": "0.0.1708315090-dev.6",
3
+ "version": "0.0.1708315090-dev.8",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "main": "esm/index.js",