@alipay/ams-checkout 0.0.1761220900-dev.1 → 0.0.1762138227-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.
- package/dist/umd/ams-checkout.min.js +1 -1
- package/esm/config/index.d.ts +8 -8
- package/esm/config/index.js +8 -8
- package/esm/constant/index.d.ts +1 -1
- package/esm/constant/index.js +5 -5
- package/esm/core/component/element/elementController/index.js +2 -2
- package/esm/foundation/core/index.js +16 -6
- package/esm/foundation/index.d.ts +1 -0
- package/esm/foundation/product-processor/easysafepay/index.js +4 -2
- package/package.json +1 -1
package/esm/config/index.d.ts
CHANGED
|
@@ -6,11 +6,11 @@ export declare const sdkVersion: string;
|
|
|
6
6
|
* @description: 目前应用层分为v1和v2,会存在两个应用版本号不是同步发布的情况。所以需要把默认的应用版本号配置抽离出来。
|
|
7
7
|
* TODO 这里考虑直接换成packagejson.version
|
|
8
8
|
*/
|
|
9
|
-
export declare const AMSCheckoutAppVersion = "1.
|
|
10
|
-
export declare const AMSAutoDebitAppVersion = "1.
|
|
11
|
-
export declare const AMSEasyPayAppVersion = "1.
|
|
12
|
-
export declare const AMSCashierPaymentAppVersion = "1.
|
|
13
|
-
export declare const AMSVaultingAppVersion = "1.
|
|
14
|
-
export declare const AMSPaymentElementAppVersion = "1.
|
|
15
|
-
export declare const ADDRESSElementAppVersion = "1.
|
|
16
|
-
export declare const AUTHElementAppVersion = "1.
|
|
9
|
+
export declare const AMSCheckoutAppVersion = "1.46.0";
|
|
10
|
+
export declare const AMSAutoDebitAppVersion = "1.46.0";
|
|
11
|
+
export declare const AMSEasyPayAppVersion = "1.46.0";
|
|
12
|
+
export declare const AMSCashierPaymentAppVersion = "1.46.0";
|
|
13
|
+
export declare const AMSVaultingAppVersion = "1.46.0";
|
|
14
|
+
export declare const AMSPaymentElementAppVersion = "1.46.0";
|
|
15
|
+
export declare const ADDRESSElementAppVersion = "1.46.0";
|
|
16
|
+
export declare const AUTHElementAppVersion = "1.46.0";
|
package/esm/config/index.js
CHANGED
|
@@ -36,11 +36,11 @@ export var sdkVersion = json.version;
|
|
|
36
36
|
* @description: 目前应用层分为v1和v2,会存在两个应用版本号不是同步发布的情况。所以需要把默认的应用版本号配置抽离出来。
|
|
37
37
|
* TODO 这里考虑直接换成packagejson.version
|
|
38
38
|
*/
|
|
39
|
-
export var AMSCheckoutAppVersion = '1.
|
|
40
|
-
export var AMSAutoDebitAppVersion = '1.
|
|
41
|
-
export var AMSEasyPayAppVersion = '1.
|
|
42
|
-
export var AMSCashierPaymentAppVersion = '1.
|
|
43
|
-
export var AMSVaultingAppVersion = '1.
|
|
44
|
-
export var AMSPaymentElementAppVersion = '1.
|
|
45
|
-
export var ADDRESSElementAppVersion = '1.
|
|
46
|
-
export var AUTHElementAppVersion = '1.
|
|
39
|
+
export var AMSCheckoutAppVersion = '1.46.0'; // 兜底版本号
|
|
40
|
+
export var AMSAutoDebitAppVersion = '1.46.0'; // 代扣
|
|
41
|
+
export var AMSEasyPayAppVersion = '1.46.0'; // easypay
|
|
42
|
+
export var AMSCashierPaymentAppVersion = '1.46.0'; // 收银台(卡、apm)
|
|
43
|
+
export var AMSVaultingAppVersion = '1.46.0'; // 绑卡
|
|
44
|
+
export var AMSPaymentElementAppVersion = '1.46.0'; // payment element
|
|
45
|
+
export var ADDRESSElementAppVersion = '1.46.0'; // address element
|
|
46
|
+
export var AUTHElementAppVersion = '1.46.0'; // auth element
|
package/esm/constant/index.d.ts
CHANGED
package/esm/constant/index.js
CHANGED
|
@@ -98,14 +98,14 @@ export var ERRORMESSAGE = {
|
|
|
98
98
|
code: 'UI_STATE_ERROR',
|
|
99
99
|
message: 'An error occurred. The transaction cannot be initiated.'
|
|
100
100
|
},
|
|
101
|
-
|
|
102
|
-
code: '
|
|
101
|
+
INITIALIZE_TIMEOUT: {
|
|
102
|
+
code: 'INITIALIZE_TIMEOUT',
|
|
103
103
|
API: {
|
|
104
|
-
code: '
|
|
104
|
+
code: 'INITIALIZE_API_TIMEOUT',
|
|
105
105
|
message: 'An error occurred. The transaction cannot be initiated.'
|
|
106
106
|
},
|
|
107
107
|
WEB: {
|
|
108
|
-
code: '
|
|
108
|
+
code: 'INITIALIZE_WEB_TIMEOUT',
|
|
109
109
|
message: 'An error occurred; the transaction cannot be initiated.'
|
|
110
110
|
}
|
|
111
111
|
},
|
|
@@ -287,7 +287,7 @@ export var EVENT = {
|
|
|
287
287
|
},
|
|
288
288
|
// Element支付完成后事件
|
|
289
289
|
submitPromiseCallback: {
|
|
290
|
-
name: '
|
|
290
|
+
name: 'onSubmitPayCallback'
|
|
291
291
|
},
|
|
292
292
|
validateFieldsResult: {
|
|
293
293
|
name: 'validateFieldsResult',
|
|
@@ -195,7 +195,7 @@ var ElementController = /*#__PURE__*/function () {
|
|
|
195
195
|
title: 'sdk_event_web_app_timeout'
|
|
196
196
|
});
|
|
197
197
|
resolve({
|
|
198
|
-
error: ERRORMESSAGE.
|
|
198
|
+
error: ERRORMESSAGE.INITIALIZE_TIMEOUT.WEB
|
|
199
199
|
});
|
|
200
200
|
}, TIMEOUT_DURATION);
|
|
201
201
|
}
|
|
@@ -642,7 +642,7 @@ var ElementController = /*#__PURE__*/function () {
|
|
|
642
642
|
_context5.t0 = _context5["catch"](1);
|
|
643
643
|
this.handleInitializationError();
|
|
644
644
|
readyCallback({
|
|
645
|
-
error: _objectSpread(_objectSpread({}, ERRORMESSAGE.
|
|
645
|
+
error: _objectSpread(_objectSpread({}, ERRORMESSAGE.INITIALIZE_TIMEOUT.API), {}, {
|
|
646
646
|
traceId: _context5.t0 === null || _context5.t0 === void 0 ? void 0 : _context5.t0.traceId
|
|
647
647
|
})
|
|
648
648
|
});
|
|
@@ -269,7 +269,7 @@ export var AntomSDKCore = /*#__PURE__*/function () {
|
|
|
269
269
|
value: function () {
|
|
270
270
|
var _startBizFlow = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(options) {
|
|
271
271
|
var _this$paymentContext$, _this$paymentContext$2, _this$paymentContext$3;
|
|
272
|
-
var paymentSession, displayInfo, _convertPaymentSessio2, paymentSessionId, paymentSessionMetaData, mid, webAppMatchConfig, webAppVersion, productScene, paymentMethod, _this$bizFlowStartBeh, payload, eventCenter, data;
|
|
272
|
+
var paymentSession, displayInfo, _convertPaymentSessio2, paymentSessionId, paymentSessionMetaData, mid, webAppMatchConfig, webAppVersion, productScene, paymentMethod, _this$bizFlowStartBeh, payload, eventCenter, data, normalUrl;
|
|
273
273
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
274
274
|
while (1) switch (_context4.prev = _context4.next) {
|
|
275
275
|
case 0:
|
|
@@ -350,14 +350,18 @@ export var AntomSDKCore = /*#__PURE__*/function () {
|
|
|
350
350
|
return _context4.abrupt("return");
|
|
351
351
|
case 36:
|
|
352
352
|
if (!(this.bizFlowStartBehavior.behaviorType === 'REDIRECT')) {
|
|
353
|
-
_context4.next =
|
|
353
|
+
_context4.next = 49;
|
|
354
354
|
break;
|
|
355
355
|
}
|
|
356
356
|
payload = (_this$bizFlowStartBeh = this.bizFlowStartBehavior) === null || _this$bizFlowStartBeh === void 0 ? void 0 : _this$bizFlowStartBeh.payload;
|
|
357
|
-
|
|
358
|
-
|
|
357
|
+
console.log('sdk 打印', payload);
|
|
358
|
+
console.log('sdk 触发', options);
|
|
359
|
+
//Sessiondata中authUrlInfo的openInApp为true,说明端内打开,不需要处理isNativeAppWebview的外跳事件逻辑
|
|
360
|
+
if (!(options.isNativeAppWebview && !!!payload.openInApp)) {
|
|
361
|
+
_context4.next = 46;
|
|
359
362
|
break;
|
|
360
363
|
}
|
|
364
|
+
console.log('sdk 打印跳转', options);
|
|
361
365
|
eventCenter = ServiceProvider.getInstance(this.instanceId).getService('EventCenter');
|
|
362
366
|
data = {
|
|
363
367
|
normalUrl: (payload === null || payload === void 0 ? void 0 : payload.url) || '',
|
|
@@ -371,10 +375,16 @@ export var AntomSDKCore = /*#__PURE__*/function () {
|
|
|
371
375
|
}
|
|
372
376
|
});
|
|
373
377
|
return _context4.abrupt("return");
|
|
374
|
-
case
|
|
378
|
+
case 46:
|
|
379
|
+
if (payload.url && payload.openInApp && options.isNativeAppWebview) {
|
|
380
|
+
//Sessiondata中authUrlInfo的openInApp为true,normalUrl存在,isNativeAppWebview为true,拼接source=embedded
|
|
381
|
+
normalUrl = new URL(payload.url);
|
|
382
|
+
normalUrl.searchParams.set('source', 'embedded');
|
|
383
|
+
payload.url = normalUrl.toString();
|
|
384
|
+
}
|
|
375
385
|
redirect(payload, this.instanceId);
|
|
376
386
|
return _context4.abrupt("return");
|
|
377
|
-
case
|
|
387
|
+
case 49:
|
|
378
388
|
case "end":
|
|
379
389
|
return _context4.stop();
|
|
380
390
|
}
|
|
@@ -62,6 +62,7 @@ export interface RedirectBehaviorPayload {
|
|
|
62
62
|
browserLinkTarget?: TargetEnum;
|
|
63
63
|
isCallApp?: boolean;
|
|
64
64
|
callAppDetectSuccessDelay?: number;
|
|
65
|
+
openInApp?: boolean;
|
|
65
66
|
}
|
|
66
67
|
/**
|
|
67
68
|
* Provide some capability, such as MonitorService, EventBusService, SecurityService
|
|
@@ -153,13 +153,15 @@ export var EasySafePayProcessor = /*#__PURE__*/function () {
|
|
|
153
153
|
data = {
|
|
154
154
|
url: authUrlInfo === null || authUrlInfo === void 0 ? void 0 : authUrlInfo.authUrl,
|
|
155
155
|
schemeUrl: authUrlInfo === null || authUrlInfo === void 0 ? void 0 : authUrlInfo.authUrl,
|
|
156
|
-
applinkUrl: authUrlInfo === null || authUrlInfo === void 0 ? void 0 : authUrlInfo.authUrl
|
|
156
|
+
applinkUrl: authUrlInfo === null || authUrlInfo === void 0 ? void 0 : authUrlInfo.authUrl,
|
|
157
|
+
openInApp: (authUrlInfo === null || authUrlInfo === void 0 ? void 0 : authUrlInfo.openInApp) || false
|
|
157
158
|
};
|
|
158
159
|
} else {
|
|
159
160
|
data = {
|
|
160
161
|
url: authUrlInfo === null || authUrlInfo === void 0 ? void 0 : authUrlInfo.normalUrl,
|
|
161
162
|
schemeUrl: authUrlInfo === null || authUrlInfo === void 0 ? void 0 : authUrlInfo.schemeUrl,
|
|
162
|
-
applinkUrl: authUrlInfo === null || authUrlInfo === void 0 ? void 0 : authUrlInfo.applinkUrl
|
|
163
|
+
applinkUrl: authUrlInfo === null || authUrlInfo === void 0 ? void 0 : authUrlInfo.applinkUrl,
|
|
164
|
+
openInApp: (authUrlInfo === null || authUrlInfo === void 0 ? void 0 : authUrlInfo.openInApp) || false
|
|
163
165
|
};
|
|
164
166
|
}
|
|
165
167
|
var result = {
|