@alipay/ams-checkout 1.10.1 → 1.11.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/bus/ability/callback.d.ts +9 -0
- package/esm/core/bus/ability/callback.js +55 -0
- package/esm/core/bus/ability/security.d.ts +10 -0
- package/esm/core/bus/ability/security.js +104 -0
- package/esm/core/bus/ability/tracker.d.ts +9 -0
- package/esm/core/bus/ability/tracker.js +77 -0
- package/esm/core/bus/index.d.ts +125 -0
- package/esm/core/bus/index.js +366 -0
- package/esm/core/bus/interface.d.ts +32 -0
- package/esm/core/bus/interface.js +35 -0
- package/esm/core/component/index.d.ts +15 -1
- package/esm/core/component/index.js +185 -28
- package/esm/core/instance/index.d.ts +5 -1
- package/esm/core/instance/index.js +41 -4
- package/esm/index.d.ts +0 -3
- package/esm/index.js +8 -18
- package/esm/{core/applepay/index.d.ts → plugin/applepay/component.d.ts} +27 -8
- package/esm/{core/applepay/index.js → plugin/applepay/component.js} +150 -180
- package/esm/plugin/applepay/index.d.ts +17 -0
- package/esm/plugin/applepay/index.js +117 -0
- package/esm/{common → plugin}/applepay/interface.d.ts +62 -3
- package/esm/plugin/applepay/interface.js +69 -0
- package/esm/{common/applepay/index.d.ts → plugin/applepay/service.d.ts} +13 -7
- package/esm/{common/applepay/index.js → plugin/applepay/service.js} +159 -41
- package/esm/plugin/component/index.d.ts +2 -2
- package/esm/plugin/component/index.js +10 -10
- package/esm/plugin/const.d.ts +2 -0
- package/esm/plugin/const.js +19 -0
- package/esm/plugin/type.d.ts +33 -0
- package/esm/request/index.d.ts +1 -1
- package/esm/service/index.d.ts +1 -1
- package/esm/types/index.d.ts +60 -6
- package/esm/types/index.js +8 -1
- package/package.json +1 -1
- /package/esm/{common/applepay/interface.js → plugin/type.js} +0 -0
package/esm/service/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ApplePayPaymentSessionRequest, ApplePayPaymentSessionResult, CashierSdkActionQueryRequest, CashierSdkActionQueryResult, CashierSubmitPayRequest, CashierSubmitPayResult, RequestConfig } from '../types';
|
2
|
-
import { Logger } from '../util/logger';
|
2
|
+
import type { Logger } from '../util/logger';
|
3
3
|
export declare function queryPaymentInfo(params: CashierSdkActionQueryRequest, options: RequestConfig, logger: Logger): Promise<CashierSdkActionQueryResult>;
|
4
4
|
export declare function antomConfig(options: RequestConfig, logger: Logger): Promise<any>;
|
5
5
|
export declare function submitPayInfo(params: CashierSubmitPayRequest, options: RequestConfig, logger: Logger): Promise<CashierSubmitPayResult>;
|
package/esm/types/index.d.ts
CHANGED
@@ -135,16 +135,17 @@ export interface IpaymentSessionMetaData {
|
|
135
135
|
skipSdkQuery: boolean;
|
136
136
|
};
|
137
137
|
paymentSessionFactor?: {
|
138
|
-
|
138
|
+
extendInfo?: {
|
139
139
|
merchantCapabilities?: string[];
|
140
140
|
supportedNetworks?: string[];
|
141
141
|
};
|
142
142
|
merchantInfo?: {
|
143
143
|
registeredCountry?: string;
|
144
144
|
partnerId?: string;
|
145
|
+
merchantName?: string;
|
145
146
|
};
|
146
147
|
order?: {
|
147
|
-
orderDescription
|
148
|
+
orderDescription: string;
|
148
149
|
};
|
149
150
|
paymentAmount?: {
|
150
151
|
value?: string;
|
@@ -156,6 +157,43 @@ export interface IpaymentSessionMetaData {
|
|
156
157
|
paymentMethodViewMetaData?: any;
|
157
158
|
paymentRequestId?: string;
|
158
159
|
supportedLanguages?: any;
|
160
|
+
/**
|
161
|
+
* 当前为苹果分期场景的信息
|
162
|
+
*/
|
163
|
+
recurringInfo?: {
|
164
|
+
/**
|
165
|
+
* 代扣协议开始日期 不传为当前系统时间
|
166
|
+
*/
|
167
|
+
startDate?: number;
|
168
|
+
/**
|
169
|
+
* 代扣协议结束日期 不传不限制结束时间
|
170
|
+
*/
|
171
|
+
endDate?: number;
|
172
|
+
/**
|
173
|
+
* 付款时间间隔单位,支持:"year" "month" "day" "hour" "minute" 不传默认month
|
174
|
+
*/
|
175
|
+
intervalUnit?: string;
|
176
|
+
/**
|
177
|
+
* 付款时间间隔。比如每过6个月付款一次,intervalCount就是6, 不传默认为1
|
178
|
+
*/
|
179
|
+
intervalCount?: number;
|
180
|
+
/**
|
181
|
+
* 分期标题信息
|
182
|
+
*/
|
183
|
+
title?: string;
|
184
|
+
/**
|
185
|
+
* 分期管理页面
|
186
|
+
*/
|
187
|
+
managementURL?: string;
|
188
|
+
/**
|
189
|
+
* 苹果通知ipay MAPN信息变更的地址
|
190
|
+
*/
|
191
|
+
tokenNotificationURL?: string;
|
192
|
+
/**
|
193
|
+
* 分期协议描述
|
194
|
+
*/
|
195
|
+
agreementDescription?: string;
|
196
|
+
};
|
159
197
|
};
|
160
198
|
}
|
161
199
|
export declare enum localeEnum {
|
@@ -201,8 +239,8 @@ export declare enum platformEnum {
|
|
201
239
|
desktop = "desktop",
|
202
240
|
mobile = "mobile"
|
203
241
|
}
|
204
|
-
type EventCallbackResult = {
|
205
|
-
result
|
242
|
+
export type EventCallbackResult = {
|
243
|
+
result?: {
|
206
244
|
resultCode: string;
|
207
245
|
resultStatus: string;
|
208
246
|
resultMessage: string;
|
@@ -410,9 +448,14 @@ export declare enum eventCodeEnum {
|
|
410
448
|
SDK_CREATECOMPONENT_ERROR = "SDK_CREATECOMPONENT_ERROR",
|
411
449
|
SDK_CALL_URL_ERROR = "SDK_CALL_URL_ERROR",
|
412
450
|
SDK_CALL_URL_SUCCESS = "SDK_CALL_URL_SUCCESS",
|
413
|
-
|
451
|
+
SDK_PAYMENT_SUCCESSFUL = "SDK_PAYMENT_SUCCESSFUL",
|
414
452
|
SDK_PAYMENT_FAIL = "SDK_PAYMENT_FAIL",
|
415
|
-
|
453
|
+
SDK_PAYMENT_ERROR = "SDK_PAYMENT_ERROR",
|
454
|
+
SDK_PAYMENT_CANCEL = "SDK_PAYMENT_CANCEL",
|
455
|
+
/**
|
456
|
+
* 当前为Apple Pay发起了Pay请求,但是用户关闭了页面
|
457
|
+
*/
|
458
|
+
SDK_PAYMENT_PROCESSING = "SDK_PAYMENT_PROCESSING"
|
416
459
|
}
|
417
460
|
export declare enum RedirectType {
|
418
461
|
ApplinkUrl = "ApplinkUrl",
|
@@ -433,4 +476,15 @@ export interface CallbackEventInfo {
|
|
433
476
|
export interface MultipleCallbackEvents {
|
434
477
|
[key: string]: CallbackEventInfo;
|
435
478
|
}
|
479
|
+
export type PaymentMethodTypeEnum = 'ApplePay';
|
480
|
+
export type ApplePaySubTypeEnum = 'ApplePayRecurringPayment';
|
481
|
+
export type SubPaymentMethodTypeEnum = ApplePaySubTypeEnum;
|
482
|
+
export declare enum ProductSceneVersion {
|
483
|
+
V1 = "1.0",
|
484
|
+
V2 = "2.0"
|
485
|
+
}
|
486
|
+
export type IAppendParams = {
|
487
|
+
componentSign: componentSignEnum;
|
488
|
+
iframeNodesParams: IappendIframeNodesParams;
|
489
|
+
};
|
436
490
|
export {};
|
package/esm/types/index.js
CHANGED
@@ -153,9 +153,11 @@ export var eventCodeEnum = /*#__PURE__*/function (eventCodeEnum) {
|
|
153
153
|
eventCodeEnum["SDK_CREATECOMPONENT_ERROR"] = "SDK_CREATECOMPONENT_ERROR";
|
154
154
|
eventCodeEnum["SDK_CALL_URL_ERROR"] = "SDK_CALL_URL_ERROR";
|
155
155
|
eventCodeEnum["SDK_CALL_URL_SUCCESS"] = "SDK_CALL_URL_SUCCESS";
|
156
|
-
eventCodeEnum["
|
156
|
+
eventCodeEnum["SDK_PAYMENT_SUCCESSFUL"] = "SDK_PAYMENT_SUCCESSFUL";
|
157
157
|
eventCodeEnum["SDK_PAYMENT_FAIL"] = "SDK_PAYMENT_FAIL";
|
158
|
+
eventCodeEnum["SDK_PAYMENT_ERROR"] = "SDK_PAYMENT_ERROR";
|
158
159
|
eventCodeEnum["SDK_PAYMENT_CANCEL"] = "SDK_PAYMENT_CANCEL";
|
160
|
+
eventCodeEnum["SDK_PAYMENT_PROCESSING"] = "SDK_PAYMENT_PROCESSING";
|
159
161
|
return eventCodeEnum;
|
160
162
|
}({});
|
161
163
|
export var RedirectType = /*#__PURE__*/function (RedirectType) {
|
@@ -164,4 +166,9 @@ export var RedirectType = /*#__PURE__*/function (RedirectType) {
|
|
164
166
|
RedirectType["NormalUrl"] = "NormalUrl";
|
165
167
|
RedirectType["Unknown"] = "Unknown";
|
166
168
|
return RedirectType;
|
169
|
+
}({});
|
170
|
+
export var ProductSceneVersion = /*#__PURE__*/function (ProductSceneVersion) {
|
171
|
+
ProductSceneVersion["V1"] = "1.0";
|
172
|
+
ProductSceneVersion["V2"] = "2.0";
|
173
|
+
return ProductSceneVersion;
|
167
174
|
}({});
|
package/package.json
CHANGED
File without changes
|