@alipay/ams-checkout 0.0.1745390310-dev.6 → 0.0.1746604244-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/core/component/ckp/index.d.ts +5 -15
- package/esm/core/component/ckp/index.js +26 -288
- package/esm/core/component/element/elementController/index.js +15 -9
- package/esm/core/component/element/elementProcessor/baseElementProcessor.d.ts +3 -0
- package/esm/core/component/element/elementProcessor/baseElementProcessor.js +11 -0
- package/esm/core/component/element/elementProcessor/paymentProcessor.js +15 -8
- package/esm/core/component/element/index.js +6 -1
- package/esm/core/component/element/util.d.ts +6 -0
- package/esm/core/component/element/util.js +27 -0
- package/esm/plugin/applepay/service.d.ts +1 -1
- package/esm/plugin/applepay/service.js +3 -5
- package/esm/types/index.d.ts +0 -1
- package/esm/types/index.js +0 -1
- package/package.json +1 -1
- package/esm/core/component/ckp/interface.d.ts +0 -540
- package/esm/core/component/ckp/interface.js +0 -233
@@ -1,233 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Copyright (c) 2022 International Business Group, Ant Group. All rights reserved.
|
3
|
-
*
|
4
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), the rights to use, copy, modify, merge, and/or distribute the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
5
|
-
* 1. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE; and
|
6
|
-
* 2. If applicable, the use of the Software is also subject to the terms and conditions of any non-disclosure agreement signed by you and the relevant Ant Group entity.
|
7
|
-
*/
|
8
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
9
|
-
// https://developer.apple.com/documentation/apple_pay_on_the_web/apple_pay_on_the_web_version_history
|
10
|
-
|
11
|
-
export var APPLE_PAY_VERSION = 2;
|
12
|
-
export var APPLE_PAY_RECURRING_VERSION = 14;
|
13
|
-
|
14
|
-
// https://developer.apple.com/documentation/apple_pay_on_the_web/applepayvalidatemerchantevent
|
15
|
-
|
16
|
-
// https://developer.apple.com/documentation/apple_pay_on_the_web/applepaymerchantcapability
|
17
|
-
|
18
|
-
// https://developer.apple.com/documentation/apple_pay_on_the_web/applepaypaymentrequest/1916122-supportednetworks
|
19
|
-
|
20
|
-
// https://developer.apple.com/documentation/apple_pay_on_the_web/applepaycontactfield
|
21
|
-
|
22
|
-
export var RedirectTypeEnum = /*#__PURE__*/function (RedirectTypeEnum) {
|
23
|
-
RedirectTypeEnum["TWO_D"] = "TWO_D";
|
24
|
-
RedirectTypeEnum["THREE_D_IDENTIFICATION"] = "THREE_D_IDENTIFICATION";
|
25
|
-
RedirectTypeEnum["THREE_D_ENROLLED"] = "THREE_D_ENROLLED";
|
26
|
-
return RedirectTypeEnum;
|
27
|
-
}({});
|
28
|
-
export var PaymentStatusType = /*#__PURE__*/function (PaymentStatusType) {
|
29
|
-
PaymentStatusType["SUCCESS"] = "SUCCESS";
|
30
|
-
PaymentStatusType["PROCESSING"] = "PROCESSING";
|
31
|
-
PaymentStatusType["FAIL"] = "FAIL";
|
32
|
-
PaymentStatusType["CANCELLED"] = "CANCELLED";
|
33
|
-
PaymentStatusType["EXPIRED"] = "EXPIRED";
|
34
|
-
return PaymentStatusType;
|
35
|
-
}({});
|
36
|
-
|
37
|
-
// https://developer.apple.com/documentation/apple_pay_on_the_web/applepaypaymentcontact
|
38
|
-
|
39
|
-
// https://developer.apple.com/documentation/apple_pay_on_the_web/applepaylineitemtype
|
40
|
-
|
41
|
-
//https://developer.apple.com/documentation/apple_pay_on_the_web/applepaypaymenttiming
|
42
|
-
|
43
|
-
//https://developer.apple.com/documentation/apple_pay_on_the_web/applepayrecurringpaymentdateunit
|
44
|
-
|
45
|
-
// https://developer.apple.com/documentation/apple_pay_on_the_web/applepaylineitem
|
46
|
-
/**
|
47
|
-
*
|
48
|
-
{
|
49
|
-
"label": "Subscription",
|
50
|
-
"amount": "20.00",
|
51
|
-
"type": "final",
|
52
|
-
"paymentTiming": "recurring",
|
53
|
-
"recurringPaymentStartDate": new Date("2022-01-01T00:00:00"),
|
54
|
-
"recurringPaymentIntervalUnit": "month",
|
55
|
-
"recurringPaymentIntervalCount": 6,
|
56
|
-
"recurringPaymentEndDate": new Date("2024-01-01T00:00:00"),
|
57
|
-
}
|
58
|
-
*/
|
59
|
-
|
60
|
-
// https://developer.apple.com/documentation/apple_pay_on_the_web/applepayshippingtype
|
61
|
-
|
62
|
-
// https://developer.apple.com/documentation/apple_pay_on_the_web/applepayshippingmethod
|
63
|
-
|
64
|
-
// https://developer.apple.com/documentation/apple_pay_on_the_web/applepaypayment
|
65
|
-
|
66
|
-
// https://developer.apple.com/documentation/apple_pay_on_the_web/applepaypaymentauthorizedevent
|
67
|
-
|
68
|
-
// https://developer.apple.com/documentation/apple_pay_on_the_web/apple_pay_js_api/apple_pay_status_codes
|
69
|
-
|
70
|
-
// https://developer.apple.com/documentation/apple_pay_on_the_web/applepaypaymentauthorizationresult
|
71
|
-
|
72
|
-
// https://developer.apple.com/documentation/apple_pay_on_the_web/applepaypaymentrequest
|
73
|
-
|
74
|
-
// https://developer.apple.com/documentation/apple_pay_on_the_web/applepayrecurringpaymentrequest
|
75
|
-
|
76
|
-
// https://developer.apple.com/documentation/apple_pay_on_the_web/applepaysession
|
77
|
-
|
78
|
-
// IGetMerchantSession spi type
|
79
|
-
|
80
|
-
// ICompletePaymentAuthorized spi type
|
81
|
-
|
82
|
-
// ICompleteApplePay spi type
|
83
|
-
|
84
|
-
// ILogError spi type
|
85
|
-
|
86
|
-
export var ProductSceneEnum = /*#__PURE__*/function (ProductSceneEnum) {
|
87
|
-
ProductSceneEnum["EASY_PAY"] = "EASY_PAY";
|
88
|
-
ProductSceneEnum["CASHIER_PAYMENT"] = "CASHIER_PAYMENT";
|
89
|
-
ProductSceneEnum["AUTO_DEBIT"] = "AUTO_DEBIT";
|
90
|
-
ProductSceneEnum["AUTO_DEBIT_PAY"] = "AUTO_DEBIT_PAY";
|
91
|
-
ProductSceneEnum["VAULTING"] = "VAULTING";
|
92
|
-
ProductSceneEnum["FLASH_BUY"] = "FLASH_BUY";
|
93
|
-
ProductSceneEnum["CARD_APPLE_PAY"] = "CARD_APPLE_PAY";
|
94
|
-
ProductSceneEnum["CHECKOUT_PAYMENT"] = "CHECKOUT_PAYMENT";
|
95
|
-
return ProductSceneEnum;
|
96
|
-
}({});
|
97
|
-
export var PaymentMethodCategoryTypeEnum = /*#__PURE__*/function (PaymentMethodCategoryTypeEnum) {
|
98
|
-
PaymentMethodCategoryTypeEnum["CARD"] = "CARD";
|
99
|
-
PaymentMethodCategoryTypeEnum["WALLET"] = "WALLET";
|
100
|
-
PaymentMethodCategoryTypeEnum["BANK"] = "BANK";
|
101
|
-
PaymentMethodCategoryTypeEnum["APM"] = "APM";
|
102
|
-
return PaymentMethodCategoryTypeEnum;
|
103
|
-
}({});
|
104
|
-
// export interface IpaymentSessionMetaData {
|
105
|
-
// clientId?: string;
|
106
|
-
// renderDisplayType?: string;
|
107
|
-
// paymentSessionConfig?: IpaymentSessionConfig;
|
108
|
-
// securityConfig?: IpaymentSecurityConfig;
|
109
|
-
// moneyView?: any;
|
110
|
-
// extendInfo?: string;
|
111
|
-
// paymentMethodInfoView?: any;
|
112
|
-
// action?: {
|
113
|
-
// amountConfirmRequired?: boolean;
|
114
|
-
// autoDebitWithToken: boolean;
|
115
|
-
// enableSignAgreement?: boolean;
|
116
|
-
// skipSdkQuery: boolean;
|
117
|
-
// requireFastSdk: boolean;
|
118
|
-
// skipSdkQueryForm?: {
|
119
|
-
// value: boolean;
|
120
|
-
// version: string;
|
121
|
-
// platform: string;
|
122
|
-
// };
|
123
|
-
// };
|
124
|
-
// authUrlInfo?: {
|
125
|
-
// appIdentifier?: string;
|
126
|
-
// applinkUrl?: string;
|
127
|
-
// normalUrl?: string;
|
128
|
-
// schemeUrl?: string;
|
129
|
-
// authUrl?: string;
|
130
|
-
// };
|
131
|
-
// paymentSessionFactor?: {
|
132
|
-
// extendInfo?: {
|
133
|
-
// merchantCapabilities?: string[];
|
134
|
-
// supportedNetworks?: string[];
|
135
|
-
// };
|
136
|
-
// merchantInfo?: {
|
137
|
-
// registeredCountry?: string;
|
138
|
-
// partnerId?: string;
|
139
|
-
// merchantName?: string;
|
140
|
-
// };
|
141
|
-
// order?: {
|
142
|
-
// orderDescription: string;
|
143
|
-
// };
|
144
|
-
// paymentAmount?: {
|
145
|
-
// value?: string;
|
146
|
-
// currency?: string;
|
147
|
-
// };
|
148
|
-
// paymentMethodInfo?: {
|
149
|
-
// paymentMethodType?: string;
|
150
|
-
// };
|
151
|
-
// paymentMethodViewMetaData?: any;
|
152
|
-
// paymentRequestId?: string;
|
153
|
-
// supportedLanguages?: any;
|
154
|
-
// /**
|
155
|
-
// * 当前为苹果分期场景的信息
|
156
|
-
// */
|
157
|
-
// recurringInfo?: {
|
158
|
-
// /**
|
159
|
-
// * 代扣协议开始日期 不传为当前系统时间
|
160
|
-
// */
|
161
|
-
// startDate?: number;
|
162
|
-
// /**
|
163
|
-
// * 代扣协议结束日期 不传不限制结束时间
|
164
|
-
// */
|
165
|
-
// endDate?: number;
|
166
|
-
// /**
|
167
|
-
// * 付款时间间隔单位,支持:"year" "month" "day" "hour" "minute" 不传默认month
|
168
|
-
// */
|
169
|
-
// intervalUnit?: string;
|
170
|
-
// /**
|
171
|
-
// * 付款时间间隔。比如每过6个月付款一次,intervalCount就是6, 不传默认为1
|
172
|
-
// */
|
173
|
-
// intervalCount?: number;
|
174
|
-
// /**
|
175
|
-
// * 分期标题信息
|
176
|
-
// */
|
177
|
-
// title?: string;
|
178
|
-
// /**
|
179
|
-
// * 分期管理页面
|
180
|
-
// */
|
181
|
-
// managementURL?: string;
|
182
|
-
|
183
|
-
// /**
|
184
|
-
// * 苹果通知ipay MAPN信息变更的地址
|
185
|
-
// */
|
186
|
-
// tokenNotificationURL?: string;
|
187
|
-
|
188
|
-
// /**
|
189
|
-
// * 分期协议描述
|
190
|
-
// */
|
191
|
-
// agreementDescription?: string;
|
192
|
-
// };
|
193
|
-
// frontModulesToBeLoaded?: frontModulesToBeLoadedInterface[];
|
194
|
-
// };
|
195
|
-
// }
|
196
|
-
export var eventCodeEnum = /*#__PURE__*/function (eventCodeEnum) {
|
197
|
-
eventCodeEnum["SDK_START_OF_LOADING"] = "SDK_START_OF_LOADING";
|
198
|
-
eventCodeEnum["SDK_END_OF_LOADING"] = "SDK_END_OF_LOADING";
|
199
|
-
eventCodeEnum["SDK_INTERNAL_ERROR"] = "SDK_INTERNAL_ERROR";
|
200
|
-
eventCodeEnum["SDK_CREATEPAYMENT_PARAMETER_ERROR"] = "SDK_CREATEPAYMENT_PARAMETER_ERROR";
|
201
|
-
eventCodeEnum["SDK_INIT_PARAMETER_ERROR"] = "SDK_INIT_PARAMETER_ERROR";
|
202
|
-
eventCodeEnum["SDK_CREATECOMPONENT_ERROR"] = "SDK_CREATECOMPONENT_ERROR";
|
203
|
-
eventCodeEnum["SDK_CALL_URL_ERROR"] = "SDK_CALL_URL_ERROR";
|
204
|
-
eventCodeEnum["SDK_CALL_URL_SUCCESS"] = "SDK_CALL_URL_SUCCESS";
|
205
|
-
eventCodeEnum["SDK_PAYMENT_SUCCESSFUL"] = "SDK_PAYMENT_SUCCESSFUL";
|
206
|
-
eventCodeEnum["SDK_PAYMENT_FAIL"] = "SDK_PAYMENT_FAIL";
|
207
|
-
eventCodeEnum["SDK_PAYMENT_ERROR"] = "SDK_PAYMENT_ERROR";
|
208
|
-
eventCodeEnum["SDK_PAYMENT_CANCEL"] = "SDK_PAYMENT_CANCEL";
|
209
|
-
eventCodeEnum["SDK_PAYMENT_PROCESSING"] = "SDK_PAYMENT_PROCESSING";
|
210
|
-
eventCodeEnum["SDK_PAYMENT_WARN"] = "SDK_PAYMENT_WARN";
|
211
|
-
eventCodeEnum["SDK_PAYMENT_SHIPPINGCHANGE"] = "SDK_PAYMENT_SHIPPINGCHANGE";
|
212
|
-
eventCodeEnum["SDK_PAYMENT_APPROVE"] = "SDK_PAYMENT_APPROVE";
|
213
|
-
return eventCodeEnum;
|
214
|
-
}({});
|
215
|
-
export var environmentEnum = /*#__PURE__*/function (environmentEnum) {
|
216
|
-
environmentEnum["sandbox"] = "sandbox";
|
217
|
-
environmentEnum["prod"] = "prod";
|
218
|
-
environmentEnum["light_sandbox"] = "light_sandbox";
|
219
|
-
return environmentEnum;
|
220
|
-
}({});
|
221
|
-
export var redirectTypeEnum = /*#__PURE__*/function (redirectTypeEnum) {
|
222
|
-
redirectTypeEnum["UNSAFE_BROWSER"] = "UNSAFE_BROWSER";
|
223
|
-
redirectTypeEnum["SAFETY_BROWSER"] = "SAFETY_BROWSER";
|
224
|
-
redirectTypeEnum["INVOKE_SDK"] = "INVOKE_SDK";
|
225
|
-
return redirectTypeEnum;
|
226
|
-
}({}); // 拉SDK
|
227
|
-
export var InterActionTypeEnum = /*#__PURE__*/function (InterActionTypeEnum) {
|
228
|
-
InterActionTypeEnum["COLLECT_REDIRECT"] = "COLLECT_REDIRECT";
|
229
|
-
InterActionTypeEnum["SHOW_CODE"] = "SHOW_CODE";
|
230
|
-
InterActionTypeEnum["COLLECT_SHOW_CODE"] = "COLLECT_SHOW_CODE";
|
231
|
-
InterActionTypeEnum["REDIRECT"] = "REDIRECT";
|
232
|
-
return InterActionTypeEnum;
|
233
|
-
}({});
|