@alipay/ams-checkout 0.0.1701850681-dev.6 → 0.0.1702608619-dev.0

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.
@@ -12,8 +12,8 @@ var _queryParse = queryParse(),
12
12
  groupId = _queryParse.groupId,
13
13
  host = _queryParse.requestHost;
14
14
  export var requestHost = {
15
- local: 'http://imgs-6517.sggz00b.dev.alipay.net/mgw.htm',
16
- dev: host || 'http://imgs-6517.sggz00b.dev.alipay.net/mgw.htm',
15
+ local: 'http://imgs-1529.gz00b.dev.alipay.net/mgw.htm',
16
+ dev: host || 'http://imgs-1529.gz00b.dev.alipay.net/mgw.htm',
17
17
  sit: host || 'http://imgs-9.sggz00a.test.alipay.net/mgw.htm',
18
18
  pre: 'https://imgs-sea-pre.alipay.com/mgw.htm',
19
19
  prod: 'https://imgs-sea-global.alipay.com/mgw.htm',
@@ -22,7 +22,7 @@ export var requestHost = {
22
22
  export var clientId = '5J5Y8X4E2Y25GR00690';
23
23
  export var tntInstId = 'ALIPW3SG';
24
24
  export var appId = 'ANTOM_PAYMENT_WEB';
25
- export var sofaId = groupId || 'GROUP_20230913102142';
25
+ export var sofaId = groupId || 'GROUP_20231218150235';
26
26
  export var hostSignMap = function hostSignMap(hostSign, env) {
27
27
  var map = {
28
28
  SG: 'https://imgs-sea-global.alipay.com/mgw.htm',
@@ -1,5 +1,5 @@
1
1
  import type AMSCheckout from '../../core/instance';
2
- import type { eventPayload, eventPayloadContext, IappendIframeNodesParams, Iselector } from '../../types';
2
+ import type { eventPayload, eventPayloadContext, IappendIframeNodesParams, IMerchantAppointParam, Iselector } from '../../types';
3
3
  import { componentSignEnum, platformEnum, renderDisplayTypeEnum } from '../../types';
4
4
  type IrenderFuncParams = (context: ComponentApp, selector: Iselector, renderDisplayType: renderDisplayTypeEnum) => Promise<void>;
5
5
  export default class ComponentApp {
@@ -23,6 +23,7 @@ export default class ComponentApp {
23
23
  private _appLocationSearch;
24
24
  private _renderDisplayType;
25
25
  private _multipleCallbackEvents;
26
+ _merchantAppointParam: IMerchantAppointParam;
26
27
  constructor();
27
28
  /**
28
29
  * @description Cancel listening and destroy the dom
@@ -48,6 +48,7 @@ var ComponentApp = /*#__PURE__*/function () {
48
48
  _defineProperty(this, "_appLocationSearch", void 0);
49
49
  _defineProperty(this, "_renderDisplayType", renderDisplayTypeEnum.popup);
50
50
  _defineProperty(this, "_multipleCallbackEvents", void 0);
51
+ _defineProperty(this, "_merchantAppointParam", void 0);
51
52
  this._appVersion = '1.7.0';
52
53
  this._isInitComponent = false;
53
54
  this._selector = "#".concat(COMPONENT_SECTION_ID);
@@ -240,6 +241,7 @@ var ComponentApp = /*#__PURE__*/function () {
240
241
  this._componentSign = componentSign;
241
242
  if ((_renderParams = renderParams) !== null && _renderParams !== void 0 && _renderParams.selector) this._selector = renderParams.selector;
242
243
  this._renderDisplayType = renderParams.renderDisplayType;
244
+ this._merchantAppointParam = renderParams.merchantAppointParam;
243
245
  var insertedNode = this._renderDisplayType === renderDisplayTypeEnum.inline ? "#".concat(COMPONENT_CONTAINER_ID) : this._selector;
244
246
  this.initLoggerMeta();
245
247
  this.AMSSDK.logger.logInfo({
@@ -349,7 +351,8 @@ var ComponentApp = /*#__PURE__*/function () {
349
351
  params = {
350
352
  paymentSessionData: _this5._renderParams && ((_this5$_renderParams = _this5._renderParams) === null || _this5$_renderParams === void 0 ? void 0 : _this5$_renderParams.sessionData) || '',
351
353
  paymentSessionConfig: (_this5$_renderParams2 = _this5._renderParams) === null || _this5$_renderParams2 === void 0 || (_this5$_renderParams2 = _this5$_renderParams2.paymentSessionMetaData) === null || _this5$_renderParams2 === void 0 ? void 0 : _this5$_renderParams2.paymentSessionConfig,
352
- notRedirectAfterComplete: ((_this5$_renderParams3 = _this5._renderParams) === null || _this5$_renderParams3 === void 0 ? void 0 : _this5$_renderParams3.notRedirectAfterComplete) === true
354
+ notRedirectAfterComplete: ((_this5$_renderParams3 = _this5._renderParams) === null || _this5$_renderParams3 === void 0 ? void 0 : _this5$_renderParams3.notRedirectAfterComplete) === true,
355
+ merchantAppointParam: _this5._merchantAppointParam
353
356
  };
354
357
  /**
355
358
  * @description Simulated or unnecessary scenarios
@@ -726,7 +729,7 @@ var ComponentApp = /*#__PURE__*/function () {
726
729
  event: 'appEventCallback',
727
730
  eventCallbackId: eventContext === null || eventContext === void 0 ? void 0 : eventContext.eventCallbackId,
728
731
  data: {
729
- userAgent: window.navigator.userAgent + window.location.search // TODO location.search用于模拟配置ua,测试完成后,删除
732
+ userAgent: window.navigator.userAgent
730
733
  }
731
734
  }
732
735
  });
@@ -1160,6 +1163,7 @@ var ComponentApp = /*#__PURE__*/function () {
1160
1163
  renderDisplayType: (_this$_renderParams8 = this._renderParams) === null || _this$_renderParams8 === void 0 ? void 0 : _this$_renderParams8.renderDisplayType,
1161
1164
  appearance: (_this$_renderParams9 = this._renderParams) === null || _this$_renderParams9 === void 0 ? void 0 : _this$_renderParams9.appearance,
1162
1165
  notRedirectAfterComplete: ((_this$_renderParams10 = this._renderParams) === null || _this$_renderParams10 === void 0 ? void 0 : _this$_renderParams10.notRedirectAfterComplete) === true,
1166
+ merchantAppointParam: this._merchantAppointParam,
1163
1167
  envInfo: {
1164
1168
  screenHeight: screen.height,
1165
1169
  screenWidth: screen.width
@@ -68,14 +68,21 @@ export interface DeviceIdParameter {
68
68
  export interface IcreateComponent {
69
69
  sessionData: string;
70
70
  paymentSessionData?: string;
71
- appearance?: Record<string, any>;
72
71
  notRedirectAfterComplete?: boolean;
72
+ appearance?: Record<string, any>;
73
+ merchantAppointParam?: IMerchantAppointParam;
73
74
  }
74
75
  export interface IappendIframeNodesParams extends IcreateComponent {
75
76
  paymentSessionMetaData: IpaymentSessionMetaData;
76
77
  renderDisplayType: renderDisplayTypeEnum;
77
78
  selector?: Iselector;
78
79
  }
80
+ export interface IMerchantAppointParam {
81
+ storedCard?: IStoredCard;
82
+ }
83
+ export interface IStoredCard {
84
+ needCVV?: boolean;
85
+ }
79
86
  export interface IbillingAddress {
80
87
  region?: string;
81
88
  address1?: string;
@@ -281,6 +288,7 @@ export interface CashierSdkActionQueryRequest {
281
288
  paymentSessionConfig?: IpaymentSessionConfig;
282
289
  paymentMethodType?: string;
283
290
  notRedirectAfterComplete?: boolean;
291
+ merchantAppointParam?: IMerchantAppointParam;
284
292
  extParams?: any;
285
293
  }
286
294
  export interface CashierSubmitPayRequest {
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@alipay/ams-checkout","version":"0.0.1701850681-dev.6","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":"0.0.1702608619-dev.0","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"}}