@alipay/ams-checkout 0.0.1757311345-dev.0 → 0.0.1757311345-dev.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.
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) + '&' + "notRedirectAfterComplete=".concat(notRedirectAfterComplete);
|
|
54
51
|
}
|
|
@@ -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) + '&' + "notRedirectAfterComplete=".concat(notRedirectAfterComplete);
|
|
82
80
|
}
|
|
83
81
|
export var handleGooglePay = function handleGooglePay(data) {
|
|
84
82
|
return new Promise(function (resolve, reject) {
|