@alipay/ams-checkout 0.0.1757311345-dev.1 → 0.0.1757315170-dev.1
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/esm/component/channel.js
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
import { getDoubleFaUrlFromSession } from "../foundation/utils/web_app_url_utils";
|
2
2
|
import { MODE } from "../constant/easysafepay";
|
3
|
-
import { queryParse } from "../util";
|
4
3
|
export function getChannelBehavior(notRedirectAfterComplete, paymentSessionMetaData) {
|
5
4
|
var _paymentSessionMetaDa;
|
6
5
|
var allowSubmitPayCallAhead = false;
|
@@ -37,8 +36,6 @@ export function getChannelBehavior(notRedirectAfterComplete, paymentSessionMetaD
|
|
37
36
|
};
|
38
37
|
}
|
39
38
|
export function getDoubleFaUrl(params) {
|
40
|
-
var _queryParse = queryParse(),
|
41
|
-
_sandbox = _queryParse._sandbox;
|
42
39
|
var instanceId = params.instanceId,
|
43
40
|
paymentMethodType = params.paymentMethodType,
|
44
41
|
paymentSessionData = params.paymentSessionData,
|
@@ -50,5 +47,5 @@ export function getDoubleFaUrl(params) {
|
|
50
47
|
var isLandscapeOrientation = false; // Web 不含横屏
|
51
48
|
|
52
49
|
var baseDoubleFaUrl = getDoubleFaUrlFromSession(paymentSessionObj, env);
|
53
|
-
return "".concat(baseDoubleFaUrl) + '?' + "scene=cashierResultPage" + '&' + "instanceId=".concat(instanceId) + '&' + "paymentSessionData=".concat(encodeURIComponent(paymentSessionData)) + '&' + "isLandscape=".concat(isLandscapeOrientation ? 'true' : '') + '&' + "pmt=".concat(paymentMethodType) + '&' + "locale=".concat(locale) + '&' + "sdkVersion=".concat(sdkVersion) + '&' + "mode=".concat(MODE.SDK) + '&' + "notRedirectAfterComplete=".concat(notRedirectAfterComplete)
|
50
|
+
return "".concat(baseDoubleFaUrl) + '?' + "scene=cashierResultPage" + '&' + "instanceId=".concat(instanceId) + '&' + "paymentSessionData=".concat(encodeURIComponent(paymentSessionData)) + '&' + "isLandscape=".concat(isLandscapeOrientation ? 'true' : '') + '&' + "pmt=".concat(paymentMethodType) + '&' + "locale=".concat(locale) + '&' + "sdkVersion=".concat(sdkVersion) + '&' + "mode=".concat(MODE.SDK) + '&' + "¬RedirectAfterComplete=".concat(notRedirectAfterComplete);
|
54
51
|
}
|
package/esm/config/index.d.ts
CHANGED
@@ -6,10 +6,10 @@ export declare const sdkVersion: string;
|
|
6
6
|
* @description: 目前应用层分为v1和v2,会存在两个应用版本号不是同步发布的情况。所以需要把默认的应用版本号配置抽离出来。
|
7
7
|
* TODO 这里考虑直接换成packagejson.version
|
8
8
|
*/
|
9
|
-
export declare const AMSCheckoutAppVersion = "1.42.
|
10
|
-
export declare const AMSAutoDebitAppVersion = "1.42.
|
11
|
-
export declare const AMSEasyPayAppVersion = "1.42.
|
12
|
-
export declare const AMSCashierPaymentAppVersion = "1.42.
|
13
|
-
export declare const AMSVaultingAppVersion = "1.42.
|
14
|
-
export declare const AMSPaymentElementAppVersion = "1.42.
|
15
|
-
export declare const ADDRESSElementAppVersion = "1.42.
|
9
|
+
export declare const AMSCheckoutAppVersion = "1.42.2";
|
10
|
+
export declare const AMSAutoDebitAppVersion = "1.42.2";
|
11
|
+
export declare const AMSEasyPayAppVersion = "1.42.2";
|
12
|
+
export declare const AMSCashierPaymentAppVersion = "1.42.2";
|
13
|
+
export declare const AMSVaultingAppVersion = "1.42.2";
|
14
|
+
export declare const AMSPaymentElementAppVersion = "1.42.2";
|
15
|
+
export declare const ADDRESSElementAppVersion = "1.42.2";
|
package/esm/config/index.js
CHANGED
@@ -36,10 +36,10 @@ export var sdkVersion = json.version;
|
|
36
36
|
* @description: 目前应用层分为v1和v2,会存在两个应用版本号不是同步发布的情况。所以需要把默认的应用版本号配置抽离出来。
|
37
37
|
* TODO 这里考虑直接换成packagejson.version
|
38
38
|
*/
|
39
|
-
export var AMSCheckoutAppVersion = '1.42.
|
40
|
-
export var AMSAutoDebitAppVersion = '1.42.
|
41
|
-
export var AMSEasyPayAppVersion = '1.42.
|
42
|
-
export var AMSCashierPaymentAppVersion = '1.42.
|
43
|
-
export var AMSVaultingAppVersion = '1.42.
|
44
|
-
export var AMSPaymentElementAppVersion = '1.42.
|
45
|
-
export var ADDRESSElementAppVersion = '1.42.
|
39
|
+
export var AMSCheckoutAppVersion = '1.42.2'; // 兜底版本号
|
40
|
+
export var AMSAutoDebitAppVersion = '1.42.2'; // 代扣
|
41
|
+
export var AMSEasyPayAppVersion = '1.42.2'; // easypay
|
42
|
+
export var AMSCashierPaymentAppVersion = '1.42.2'; // 收银台(卡、apm)
|
43
|
+
export var AMSVaultingAppVersion = '1.42.2'; // 绑卡
|
44
|
+
export var AMSPaymentElementAppVersion = '1.42.2'; // payment element
|
45
|
+
export var ADDRESSElementAppVersion = '1.42.2'; // address element
|
@@ -12,7 +12,7 @@ import { BusManager, BusMessage } from "../../core/bus";
|
|
12
12
|
import { SecuritySDKActionEnum } from "../../core/bus/interface";
|
13
13
|
import { getApplePayPaymentSession, submitPayInfo } from "../../service";
|
14
14
|
import { EnvironmentEnum } from "../../types";
|
15
|
-
import { device, isEmpty
|
15
|
+
import { device, isEmpty } from "../../util";
|
16
16
|
import { APPLE_PAY_RECURRING_VERSION, APPLE_PAY_VERSION } from "../applepay/interface";
|
17
17
|
import { getDoubleFaUrlFromSession } from "../../foundation/utils/web_app_url_utils";
|
18
18
|
import { MODE } from "../../constant/easysafepay";
|
@@ -65,8 +65,6 @@ export function getChannelBehavior(paymentSessionMetaData, notRedirectAfterCompl
|
|
65
65
|
return undefined;
|
66
66
|
}
|
67
67
|
export function getDoubleFaUrl(params) {
|
68
|
-
var _queryParse = queryParse(),
|
69
|
-
_sandbox = _queryParse._sandbox;
|
70
68
|
var instanceId = params.instanceId,
|
71
69
|
paymentMethodType = params.paymentMethodType,
|
72
70
|
paymentSessionData = params.paymentSessionData,
|
@@ -78,7 +76,7 @@ export function getDoubleFaUrl(params) {
|
|
78
76
|
var isLandscapeOrientation = false; // Web 不含横屏
|
79
77
|
|
80
78
|
var baseDoubleFaUrl = getDoubleFaUrlFromSession(paymentSessionObj, env);
|
81
|
-
return "".concat(baseDoubleFaUrl) + '?' + "scene=cashierResultPage" + '&' + "instanceId=".concat(instanceId) + '&' + "paymentSessionData=".concat(encodeURIComponent(paymentSessionData)) + '&' + "isLandscape=".concat(isLandscapeOrientation ? 'true' : '') + '&' + "pmt=".concat(paymentMethodType) + '&' + "locale=".concat(locale) + '&' + "mode=".concat(MODE.SDK) + '&' + "sdkVersion=".concat(sdkVersion) + '&' + "notRedirectAfterComplete=".concat(notRedirectAfterComplete)
|
79
|
+
return "".concat(baseDoubleFaUrl) + '?' + "scene=cashierResultPage" + '&' + "instanceId=".concat(instanceId) + '&' + "paymentSessionData=".concat(encodeURIComponent(paymentSessionData)) + '&' + "isLandscape=".concat(isLandscapeOrientation ? 'true' : '') + '&' + "pmt=".concat(paymentMethodType) + '&' + "locale=".concat(locale) + '&' + "mode=".concat(MODE.SDK) + '&' + "sdkVersion=".concat(sdkVersion) + '&' + "¬RedirectAfterComplete=".concat(notRedirectAfterComplete);
|
82
80
|
}
|
83
81
|
export var handleGooglePay = function handleGooglePay(data) {
|
84
82
|
return new Promise(function (resolve, reject) {
|
@@ -673,6 +673,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
673
673
|
message: res === null || res === void 0 ? void 0 : res.errorMessage
|
674
674
|
};
|
675
675
|
_this5.dispatchToSDK(EVENT.error.name, createComponentError);
|
676
|
+
_this5.dispatchToSDK(EVENT.eventCallback.name, createComponentError);
|
676
677
|
if ((res === null || res === void 0 || (_res$errorActions = res.errorActions) === null || _res$errorActions === void 0 ? void 0 : _res$errorActions.showType) === 'NONE') {
|
677
678
|
// 抛错销毁SDK,不展示错误页面
|
678
679
|
reject(createComponentError);
|
@@ -684,6 +685,7 @@ var ComponentApp = /*#__PURE__*/function () {
|
|
684
685
|
if (ComponentSignEnum.CASHIER_PAYMENT_CARD === _this5._componentSign) {
|
685
686
|
// 通用操作:抛CREATECOMPONENT_ERROR错误码给商户,商户升级到新版本需要处理CREATECOMPONENT_ERROR逻辑
|
686
687
|
_this5.dispatchToSDK(EVENT.error.name, ERRORMESSAGE.CREATECOMPONENT_ERROR.NETWORK_REQUEST_ERROR);
|
688
|
+
_this5.dispatchToSDK(EVENT.eventCallback.name, ERRORMESSAGE.CREATECOMPONENT_ERROR.NETWORK_REQUEST_ERROR);
|
687
689
|
}
|
688
690
|
if ([ComponentSignEnum.CASHIER_PAYMENT_CARD, ComponentSignEnum.VAULTING_CARD, ComponentSignEnum.CASHIER_PAYMENT_APM].includes(_this5._componentSign)) {
|
689
691
|
return resolve({
|