@alipay/ams-checkout 1.7.1 → 1.7.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.
@@ -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, 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;
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;
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 = 11;
367
+ _context2.next = 10;
368
368
  break;
369
369
  }
370
370
  params.paymentMethodType = 'CARD';
@@ -372,62 +372,60 @@ var ComponentApp = /*#__PURE__*/function () {
372
372
  return _this5.getDeviceIdAndLog();
373
373
  case 8:
374
374
  envInfo.deviceId = _context2.sent;
375
- // TODO 加一个后门 判断是否为小程序环境
376
- search = window.location.search;
377
- if (window.navigator.userAgent.indexOf('miniProgram') > -1 || search.indexOf('miniProgram') > -1) {
375
+ if (window.navigator.userAgent.indexOf('miniProgram') > -1) {
378
376
  envInfo.extendInfo = {
379
377
  WAP_SUB_TYPE: 'WECHAT_MINI_PROGRAM'
380
378
  };
381
379
  }
382
- case 11:
380
+ case 10:
383
381
  if (!(componentSignEnum.EASY_PAY_WALLET === _this5._componentSign)) {
384
- _context2.next = 19;
382
+ _context2.next = 18;
385
383
  break;
386
384
  }
387
385
  _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;
388
386
  _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;
389
387
  if (!(productScene === productSceneEnum.EASY_PAY && productSceneVersion === '2.0' && !autoDebitWithToken)) {
390
- _context2.next = 16;
388
+ _context2.next = 15;
391
389
  break;
392
390
  }
393
391
  return _context2.abrupt("return", resolve({
394
392
  message: 'sdk no need to make query request',
395
393
  success: true
396
394
  }));
397
- case 16:
398
- _context2.next = 18;
395
+ case 15:
396
+ _context2.next = 17;
399
397
  return _this5.getDeviceIdAndLog();
400
- case 18:
398
+ case 17:
401
399
  envInfo.deviceId = _context2.sent;
402
- case 19:
400
+ case 18:
403
401
  if (!(componentSignEnum.AUTO_DEBIT_WALLET === _this5._componentSign)) {
404
- _context2.next = 29;
402
+ _context2.next = 28;
405
403
  break;
406
404
  }
407
405
  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) || {};
408
406
  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;
409
407
  if (!(signType === 'SMS')) {
410
- _context2.next = 24;
408
+ _context2.next = 23;
411
409
  break;
412
410
  }
413
411
  return _context2.abrupt("return", resolve({
414
412
  message: 'sdk no need to make query request',
415
413
  success: true
416
414
  }));
417
- case 24:
415
+ case 23:
418
416
  if (!(!signType || signType !== 'REDIRECT')) {
419
- _context2.next = 26;
417
+ _context2.next = 25;
420
418
  break;
421
419
  }
422
420
  return _context2.abrupt("return", resolve({
423
421
  success: false
424
422
  }));
425
- case 26:
426
- _context2.next = 28;
423
+ case 25:
424
+ _context2.next = 27;
427
425
  return _this5.getDeviceIdAndLog();
428
- case 28:
426
+ case 27:
429
427
  envInfo.deviceId = _context2.sent;
430
- case 29:
428
+ case 28:
431
429
  _this5.AMSSDK.logger.logInfo({
432
430
  title: 'sdk_event_sdkQuery'
433
431
  }, {
@@ -463,7 +461,7 @@ var ComponentApp = /*#__PURE__*/function () {
463
461
  paymentSessionConfig: JSON.stringify(params.paymentSessionConfig)
464
462
  }).send();
465
463
  });
466
- case 31:
464
+ case 30:
467
465
  case "end":
468
466
  return _context2.stop();
469
467
  }
@@ -785,8 +783,7 @@ var ComponentApp = /*#__PURE__*/function () {
785
783
  event: 'appEventCallback',
786
784
  eventCallbackId: eventContext === null || eventContext === void 0 ? void 0 : eventContext.eventCallbackId,
787
785
  data: {
788
- // TODO 预发前删除window.location.search,这个是用于调试配置的后门
789
- userAgent: window.navigator.userAgent + window.location.search
786
+ userAgent: window.navigator.userAgent
790
787
  }
791
788
  }
792
789
  });
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@alipay/ams-checkout","version":"1.7.1","description":"","author":"","main":"esm/index.js","module":"esm/index.js","typings":"esm/index.d.ts","files":["dist","esm","LEGAL.md","LICENSE","README.md"],"scripts":{"build":"father build","ci":"npm run lint","cov":"jest --coverage","format":"prettier --write --no-error-on-unmatched-pattern \"**/*.{js,jsx,ts,tsx,md,json,css,less}\"","lint":"eslint ./src","test":"jest"},"dependencies":{"axios":"^1.3.4","uuid":"^9.0.0"},"devDependencies":{"@babel/core":"^7.20.7","@babel/preset-env":"^7.20.2","@testing-library/jest-dom":"^5.1.1","@testing-library/react":"^9.5.0","@types/jest":"^29.2.4","@types/uuid":"^9.0.0","@typescript-eslint/eslint-plugin":"latest","@typescript-eslint/parser":"^5.60.0","babel-jest":"^29.3.1","babel-loader":"^9.1.0","babel-plugin-import":"^1.13.0","eslint":"^8.36.0","eslint-plugin-prettier":"latest","father":"^4.2.3","jest":"^29.5.0","jest-environment-jsdom":"^29.3.1","prettier":"^2.8.4","prettier-plugin-organize-imports":"^3.2.3","prettier-plugin-packagejson":"^2.4.5","ts-jest":"^29.0.3","ts-node":"^10.9.1","typescript":"^4.9.5"},"engines":{},"publishConfig":{"access":"public"}}
1
+ {"name":"@alipay/ams-checkout","version":"1.7.2","description":"","author":"","main":"esm/index.js","module":"esm/index.js","typings":"esm/index.d.ts","files":["dist","esm","LEGAL.md","LICENSE","README.md"],"scripts":{"build":"father build","ci":"npm run lint","cov":"jest --coverage","format":"prettier --write --no-error-on-unmatched-pattern \"**/*.{js,jsx,ts,tsx,md,json,css,less}\"","lint":"eslint ./src","test":"jest"},"dependencies":{"axios":"^1.3.4","uuid":"^9.0.0"},"devDependencies":{"@babel/core":"^7.20.7","@babel/preset-env":"^7.20.2","@testing-library/jest-dom":"^5.1.1","@testing-library/react":"^9.5.0","@types/jest":"^29.2.4","@types/uuid":"^9.0.0","@typescript-eslint/eslint-plugin":"latest","@typescript-eslint/parser":"^5.60.0","babel-jest":"^29.3.1","babel-loader":"^9.1.0","babel-plugin-import":"^1.13.0","eslint":"^8.36.0","eslint-plugin-prettier":"latest","father":"^4.2.3","jest":"^29.5.0","jest-environment-jsdom":"^29.3.1","prettier":"^2.8.4","prettier-plugin-organize-imports":"^3.2.3","prettier-plugin-packagejson":"^2.4.5","ts-jest":"^29.0.3","ts-node":"^10.9.1","typescript":"^4.9.5"},"engines":{},"publishConfig":{"access":"public"}}