@alipay/ams-checkout 1.14.0 → 1.15.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/core/component/index.js +7 -4
- package/esm/plugin/component/cashierApp.d.ts +1 -1
- package/esm/plugin/component/cashierApp.js +20 -20
- package/esm/plugin/component/channel.d.ts +20 -0
- package/esm/plugin/component/channel.js +38 -0
- package/esm/plugin/component/component.popup.style.d.ts +4 -1
- package/esm/plugin/component/component.popup.style.js +7 -1
- package/esm/plugin/component/index.d.ts +1 -1
- package/esm/plugin/component/index.js +96 -66
- package/esm/request/index.js +2 -2
- package/esm/types/index.d.ts +4 -1
- package/esm/types/index.js +1 -0
- package/esm/util/debug.js +2 -2
- package/esm/util/logger.js +18 -11
- package/package.json +1 -1
package/esm/request/index.js
CHANGED
@@ -91,9 +91,9 @@ function _request() {
|
|
91
91
|
if (envInfo.terminalType === 'WAP') envInfo.osType = device.iOS ? 'IOS' : 'ANDROID';
|
92
92
|
_data = [_objectSpread(_objectSpread({}, requestData), {}, {
|
93
93
|
envInfo: envInfo,
|
94
|
-
extParams: {
|
94
|
+
extParams: _objectSpread(_objectSpread({}, requestData === null || requestData === void 0 ? void 0 : requestData.extParams), {}, {
|
95
95
|
refUrl: window.location.href
|
96
|
-
}
|
96
|
+
})
|
97
97
|
})];
|
98
98
|
startTime = Date.now();
|
99
99
|
_context.prev = 5;
|
package/esm/types/index.d.ts
CHANGED
@@ -42,6 +42,7 @@ export interface IcreatePaymentParams {
|
|
42
42
|
}
|
43
43
|
export declare enum componentSignEnum {
|
44
44
|
'EASY_PAY_WALLET' = "EASY_PAY_WALLET",
|
45
|
+
'EASY_PAY_APM' = "EASY_PAY_APM",
|
45
46
|
'CASHIER_PAYMENT_CARD' = "CASHIER_PAYMENT_CARD",
|
46
47
|
'CASHIER_PAYMENT_BANK' = "CASHIER_PAYMENT_BANK",
|
47
48
|
'CASHIER_PAYMENT_APM' = "CASHIER_PAYMENT_APM",
|
@@ -84,7 +85,7 @@ export interface IappendIframeNodesParams extends IcreateComponent {
|
|
84
85
|
paypalConfiguration?: IPaypalConfiguration;
|
85
86
|
}
|
86
87
|
export interface IPaypalConfiguration {
|
87
|
-
style?:
|
88
|
+
style?: object;
|
88
89
|
blockPayPalCreditButton?: boolean;
|
89
90
|
blockPayPalPayLaterButton?: boolean;
|
90
91
|
displayPayPalPayLaterButtonOnly?: boolean;
|
@@ -144,6 +145,7 @@ export interface IpaymentSessionMetaData {
|
|
144
145
|
extendInfo?: string;
|
145
146
|
paymentMethodInfoView?: any;
|
146
147
|
action?: {
|
148
|
+
amountConfirmRequired?: boolean;
|
147
149
|
autoDebitWithToken: boolean;
|
148
150
|
skipSdkQuery: boolean;
|
149
151
|
skipSdkQueryForm?: {
|
@@ -425,6 +427,7 @@ export interface CashierSubmitPayRequest {
|
|
425
427
|
verifyFactors?: Record<string, string>;
|
426
428
|
paymentSessionData: string;
|
427
429
|
paymentSessionConfig?: any;
|
430
|
+
extParams?: any;
|
428
431
|
}
|
429
432
|
export interface CashierSdkActionQueryResult {
|
430
433
|
supportedLanguages?: any[];
|
package/esm/types/index.js
CHANGED
@@ -17,6 +17,7 @@ export var renderDisplayTypeEnum = /*#__PURE__*/function (renderDisplayTypeEnum)
|
|
17
17
|
}({});
|
18
18
|
export var componentSignEnum = /*#__PURE__*/function (componentSignEnum) {
|
19
19
|
componentSignEnum["EASY_PAY_WALLET"] = "EASY_PAY_WALLET";
|
20
|
+
componentSignEnum["EASY_PAY_APM"] = "EASY_PAY_APM";
|
20
21
|
componentSignEnum["CASHIER_PAYMENT_CARD"] = "CASHIER_PAYMENT_CARD";
|
21
22
|
componentSignEnum["CASHIER_PAYMENT_BANK"] = "CASHIER_PAYMENT_BANK";
|
22
23
|
componentSignEnum["CASHIER_PAYMENT_APM"] = "CASHIER_PAYMENT_APM";
|
package/esm/util/debug.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
import { queryParse } from
|
1
|
+
import { queryParse } from '.';
|
2
2
|
export var isDebugLog = function isDebugLog() {
|
3
3
|
var _ref = queryParse() || {},
|
4
4
|
environment = _ref.environment;
|
5
5
|
if (!environment) {
|
6
6
|
return false;
|
7
7
|
}
|
8
|
-
return environment
|
8
|
+
return environment === 'dev';
|
9
9
|
};
|
package/esm/util/logger.js
CHANGED
@@ -43,10 +43,15 @@ export var Logger = /*#__PURE__*/function () {
|
|
43
43
|
}, {
|
44
44
|
key: "logError",
|
45
45
|
value: function logError(error, extra) {
|
46
|
+
var now = Date.now();
|
47
|
+
var fsDuration = now - this.componentStartTime;
|
46
48
|
this.logs.push({
|
47
49
|
type: 'error',
|
48
50
|
logPayload: error,
|
49
|
-
extra: extra
|
51
|
+
extra: _objectSpread(_objectSpread({}, extra), {}, {
|
52
|
+
fsDuration: fsDuration,
|
53
|
+
timeStamp: now
|
54
|
+
})
|
50
55
|
});
|
51
56
|
if (this.debug) {
|
52
57
|
console.error(error);
|
@@ -57,10 +62,15 @@ export var Logger = /*#__PURE__*/function () {
|
|
57
62
|
}, {
|
58
63
|
key: "logInfo",
|
59
64
|
value: function logInfo(info, extra) {
|
65
|
+
var now = Date.now();
|
66
|
+
var fsDuration = now - this.componentStartTime;
|
60
67
|
this.logs.push({
|
61
68
|
type: 'info',
|
62
69
|
logPayload: info,
|
63
|
-
extra: extra
|
70
|
+
extra: _objectSpread(_objectSpread({}, extra), {}, {
|
71
|
+
fsDuration: fsDuration,
|
72
|
+
timeStamp: now
|
73
|
+
})
|
64
74
|
});
|
65
75
|
if (this.debug) {
|
66
76
|
console.log(info);
|
@@ -71,10 +81,15 @@ export var Logger = /*#__PURE__*/function () {
|
|
71
81
|
}, {
|
72
82
|
key: "reportRPC",
|
73
83
|
value: function reportRPC(rpcData, extra) {
|
84
|
+
var now = Date.now();
|
85
|
+
var fsDuration = now - this.componentStartTime;
|
74
86
|
this.logs.push({
|
75
87
|
type: 'rpc',
|
76
88
|
logPayload: rpcData,
|
77
|
-
extra: extra
|
89
|
+
extra: _objectSpread(_objectSpread({}, extra), {}, {
|
90
|
+
fsDuration: fsDuration,
|
91
|
+
timeStamp: now
|
92
|
+
})
|
78
93
|
});
|
79
94
|
if (this.debug) {
|
80
95
|
console.log(rpcData);
|
@@ -94,32 +109,24 @@ export var Logger = /*#__PURE__*/function () {
|
|
94
109
|
logInfo = _window$iTracker.logInfo,
|
95
110
|
reportRPC = _window$iTracker.reportRPC;
|
96
111
|
var logs = this.logs;
|
97
|
-
var now = Date.now();
|
98
|
-
var fsDuration = now - this.componentStartTime;
|
99
112
|
while (logs.length > 0) {
|
100
113
|
try {
|
101
114
|
var log = logs.pop();
|
102
115
|
if (log.type === 'error') {
|
103
116
|
var _log$logPayload;
|
104
117
|
logError(log.logPayload, _objectSpread({
|
105
|
-
fsDuration: fsDuration,
|
106
|
-
timeStamp: now,
|
107
118
|
trackId: this.trackId,
|
108
119
|
title: (_log$logPayload = log.logPayload) === null || _log$logPayload === void 0 ? void 0 : _log$logPayload.title
|
109
120
|
}, log === null || log === void 0 ? void 0 : log.extra));
|
110
121
|
} else if (log.type === 'info') {
|
111
122
|
var _log$logPayload2;
|
112
123
|
logInfo(log.logPayload, _objectSpread({
|
113
|
-
fsDuration: fsDuration,
|
114
|
-
timeStamp: now,
|
115
124
|
trackId: this.trackId,
|
116
125
|
title: (_log$logPayload2 = log.logPayload) === null || _log$logPayload2 === void 0 ? void 0 : _log$logPayload2.title
|
117
126
|
}, log === null || log === void 0 ? void 0 : log.extra));
|
118
127
|
} else if (log.type === 'rpc') {
|
119
128
|
var _log$logPayload3;
|
120
129
|
reportRPC(log.logPayload, _objectSpread({
|
121
|
-
fsDuration: fsDuration,
|
122
|
-
timeStamp: now,
|
123
130
|
trackId: this.trackId,
|
124
131
|
title: (_log$logPayload3 = log.logPayload) === null || _log$logPayload3 === void 0 ? void 0 : _log$logPayload3.title
|
125
132
|
}, log === null || log === void 0 ? void 0 : log.extra));
|