@alipay/ams-checkout 0.0.1758783821-dev.12 → 0.0.1758783821-dev.13

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.
@@ -27,12 +27,24 @@ export var hostSignMap = function hostSignMap(hostSign, env) {
27
27
  var map = {
28
28
  SG: 'https://imgs-sea-global.alipay.com/mgw.htm',
29
29
  US: 'https://imgs-na-global.alipay.com/mgw.htm',
30
- DE: 'https://imgs-de-global.alipay.com/mgw.htm'
30
+ DE: 'https://imgs-de-global.alipay.com/mgw.htm',
31
+ // QK 和 ID 机房未经过验证
32
+ QK: 'https://imgs-qk.alipay.com/mgw.htm',
33
+ // https://imgs-qk.alipay.com/mgw.htm
34
+ ID: 'https://imgs-id.alipay.com/mgw.htm',
35
+ // https://imgs-id.alipay.com/mgw.htm
36
+ SA: 'https://imgs-sa.alipay.com/mgw.htm' // https://imgs-sa.alipay.com/mgw.htm
31
37
  };
32
38
  var preMap = {
33
39
  SG: 'https://imgs-sea-pre.alipay.com/mgw.htm',
34
40
  US: 'https://imgs-pre.alipay.com/mgw.htm',
35
- DE: 'https://imgs-de-pre.alipay.com/mgw.htm'
41
+ DE: 'https://imgs-de-pre.alipay.com/mgw.htm',
42
+ // QK 和 ID 机房未经过验证
43
+ QK: 'https://iopengw-qkgz99p.alipay.com/mgw.htm',
44
+ // https://iopengw-qkgz99p.alipay.com/mgw.htm
45
+ ID: 'https://imgs-id-pre.alipay.com/mgw.htm',
46
+ // https://imgs-id-pre.alipay.com/mgw.htm
47
+ SA: 'https://imgs-sa-pre.alipay.com/mgw.htm' // https://imgs-sa-pre.alipay.com/mgw.htm
36
48
  };
37
49
  if (env === 'prod' || env === 'sandbox' || env === 'light_sandbox') {
38
50
  return map[hostSign || 'SG'];
@@ -255,9 +255,7 @@ var ElementController = /*#__PURE__*/function () {
255
255
  _this2.elementEventCenter.endEvent(startEventId, {
256
256
  msg: safeStringify(payload)
257
257
  });
258
- resolve(_objectSpread(_objectSpread({}, payload || {}), {}, {
259
- needChangeSessionForRetry: false
260
- }));
258
+ resolve(_objectSpread({}, payload || {}));
261
259
  };
262
260
  if (!checkMountResult.success) {
263
261
  _this2.handleMountError({
@@ -355,9 +353,10 @@ var ElementController = /*#__PURE__*/function () {
355
353
  break;
356
354
  }
357
355
  res = {
358
- error: ERRORMESSAGE.UI_STATE_ERROR,
359
- status: PaymentStatus.FAIL,
360
- needChangeSessionForRetry: false
356
+ error: _objectSpread(_objectSpread({}, ERRORMESSAGE.UI_STATE_ERROR), {}, {
357
+ needChangeSessionForRetry: false
358
+ }),
359
+ status: PaymentStatus.FAIL
361
360
  };
362
361
  logParams = {
363
362
  eventCode: PaymentStatus.FAIL,
@@ -380,9 +379,11 @@ var ElementController = /*#__PURE__*/function () {
380
379
  case 0:
381
380
  recordResultCallback = function _recordResultCallback(result) {
382
381
  if (result instanceof Object) {
383
- var _that$elementProcesso;
384
- var needChangeSessionForRetry = typeof (result === null || result === void 0 ? void 0 : result.needChangeSessionForRetry) === 'undefined' ? (_that$elementProcesso = that.elementProcessors[ElementType.payment]) === null || _that$elementProcesso === void 0 || (_that$elementProcesso = _that$elementProcesso.obtainDataRes) === null || _that$elementProcesso === void 0 || (_that$elementProcesso = _that$elementProcesso.originActionQueryResult) === null || _that$elementProcesso === void 0 ? void 0 : _that$elementProcesso.notSupportRetryPayForSameSession : result === null || result === void 0 ? void 0 : result.needChangeSessionForRetry;
385
- result.needChangeSessionForRetry = needChangeSessionForRetry || false;
382
+ var _result$error, _that$elementProcesso, _result$error2;
383
+ var needChangeSessionForRetry = typeof (result === null || result === void 0 || (_result$error = result.error) === null || _result$error === void 0 ? void 0 : _result$error.needChangeSessionForRetry) === 'undefined' ? (_that$elementProcesso = that.elementProcessors[ElementType.payment]) === null || _that$elementProcesso === void 0 || (_that$elementProcesso = _that$elementProcesso.obtainDataRes) === null || _that$elementProcesso === void 0 || (_that$elementProcesso = _that$elementProcesso.originActionQueryResult) === null || _that$elementProcesso === void 0 ? void 0 : _that$elementProcesso.notSupportRetryPayForSameSession : result === null || result === void 0 || (_result$error2 = result.error) === null || _result$error2 === void 0 ? void 0 : _result$error2.needChangeSessionForRetry;
384
+ if (result !== null && result !== void 0 && result.error) {
385
+ result.error.needChangeSessionForRetry = needChangeSessionForRetry;
386
+ }
386
387
  }
387
388
  recordResult = result;
388
389
  resolve(recordResult);
@@ -497,7 +498,7 @@ var ElementController = /*#__PURE__*/function () {
497
498
  eventCode: (_recordResult = recordResult) === null || _recordResult === void 0 ? void 0 : _recordResult.status,
498
499
  errorName: (_recordResult2 = recordResult) === null || _recordResult2 === void 0 || (_recordResult2 = _recordResult2.error) === null || _recordResult2 === void 0 ? void 0 : _recordResult2.code,
499
500
  errormessage: (_recordResult3 = recordResult) === null || _recordResult3 === void 0 || (_recordResult3 = _recordResult3.error) === null || _recordResult3 === void 0 ? void 0 : _recordResult3.message,
500
- needChangeSessionForRetry: (_recordResult4 = recordResult) === null || _recordResult4 === void 0 ? void 0 : _recordResult4.needChangeSessionForRetry,
501
+ needChangeSessionForRetry: (_recordResult4 = recordResult) === null || _recordResult4 === void 0 || (_recordResult4 = _recordResult4.error) === null || _recordResult4 === void 0 ? void 0 : _recordResult4.needChangeSessionForRetry,
501
502
  rpcTraceId: (_recordResult5 = recordResult) === null || _recordResult5 === void 0 || (_recordResult5 = _recordResult5.error) === null || _recordResult5 === void 0 ? void 0 : _recordResult5.traceId,
502
503
  msg: safeStringify(recordResult)
503
504
  };
@@ -416,8 +416,8 @@ export interface ICommonApiResponse {
416
416
  message: string;
417
417
  traceId?: string;
418
418
  context?: any;
419
+ needChangeSessionForRetry?: boolean;
419
420
  };
420
- needChangeSessionForRetry?: boolean;
421
421
  }
422
422
  export interface IPaymentApiResponse extends ICommonApiResponse {
423
423
  status: keyof typeof PaymentStatus;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alipay/ams-checkout",
3
- "version": "0.0.1758783821-dev.12",
3
+ "version": "0.0.1758783821-dev.13",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "main": "esm/index.js",