@alipay/ams-checkout 0.0.1755258111-dev.0 → 0.0.1755258862-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/dist/umd/ams-checkout.min.js +1 -1
- package/esm/component/channel.d.ts +1 -3
- package/esm/component/channel.js +62 -26
- package/esm/component/component.inline.style.js +2 -2
- package/esm/component/popupWindow.style.d.ts +1 -4
- package/esm/component/popupWindow.style.js +2 -37
- package/esm/config/index.d.ts +8 -8
- package/esm/config/index.js +8 -8
- package/esm/constant/index.d.ts +2 -41
- package/esm/constant/index.js +5 -43
- package/esm/core/component/ckp/index.d.ts +0 -2
- package/esm/core/component/ckp/index.js +5 -41
- package/esm/core/component/element/index.d.ts +46 -7
- package/esm/core/component/element/index.js +923 -31
- package/esm/core/component/element/mock.d.ts +0 -4
- package/esm/core/component/element/mock.js +1 -365
- package/esm/core/component/element/type.d.ts +34 -74
- package/esm/core/component/element/type.js +12 -20
- package/esm/core/component/index.d.ts +1 -5
- package/esm/core/component/index.js +2 -1
- package/esm/core/instance/index.d.ts +1 -1
- package/esm/core/instance/index.js +1 -1
- package/esm/foundation/core/index.d.ts +1 -9
- package/esm/foundation/core/index.js +49 -153
- package/esm/foundation/index.d.ts +0 -20
- package/esm/foundation/index.js +2 -13
- package/esm/foundation/product-processor/easysafepay/deps.d.ts +1 -3
- package/esm/foundation/product-processor/easysafepay/deps.js +1 -3
- package/esm/foundation/product-processor/easysafepay/index.d.ts +0 -5
- package/esm/foundation/product-processor/easysafepay/index.js +138 -266
- package/esm/foundation/service/container/index.d.ts +3 -14
- package/esm/foundation/service/container/index.js +25 -178
- package/esm/foundation/service/container/popup.d.ts +7 -10
- package/esm/foundation/service/container/popup.js +1 -3
- package/esm/foundation/service/event-center.js +0 -1
- package/esm/foundation/service/log/keys.js +1 -3
- package/esm/foundation/service/log/types.d.ts +0 -1
- package/esm/foundation/service/requester/requester.js +37 -17
- package/esm/foundation/utils/preload_helper.d.ts +2 -2
- package/esm/foundation/utils/preload_helper.js +4 -8
- package/esm/foundation/utils/redirect_utils.js +18 -34
- package/esm/foundation/utils/web_app_url_utils.d.ts +1 -71
- package/esm/foundation/utils/web_app_url_utils.js +8 -219
- package/esm/index.d.ts +4 -7
- package/esm/index.js +48 -98
- package/esm/plugin/component/cashierApp.d.ts +1 -1
- package/esm/plugin/component/cashierApp.js +5 -5
- package/esm/plugin/component/channel.d.ts +1 -3
- package/esm/plugin/component/channel.js +12 -10
- package/esm/plugin/component/index.js +44 -47
- package/esm/plugin/type.d.ts +1 -1
- package/esm/request/index.js +2 -2
- package/esm/types/index.d.ts +3 -37
- package/esm/types/index.js +2 -10
- package/esm/util/index.d.ts +1 -8
- package/esm/util/index.js +3 -31
- package/esm/util/spm-map.d.ts +4 -18
- package/esm/util/spm-map.js +6 -20
- package/package.json +4 -27
- package/esm/constant/easysafepay.d.ts +0 -16
- package/esm/constant/easysafepay.js +0 -19
- package/esm/core/component/element/elementContainerService/containerService.d.ts +0 -33
- package/esm/core/component/element/elementContainerService/containerService.js +0 -123
- package/esm/core/component/element/elementContainerService/index.d.ts +0 -20
- package/esm/core/component/element/elementContainerService/index.js +0 -63
- package/esm/core/component/element/elementController/index.d.ts +0 -27
- package/esm/core/component/element/elementController/index.js +0 -493
- package/esm/core/component/element/elementProcessor/addressProcessor.d.ts +0 -20
- package/esm/core/component/element/elementProcessor/addressProcessor.js +0 -160
- package/esm/core/component/element/elementProcessor/authProcessor.d.ts +0 -20
- package/esm/core/component/element/elementProcessor/authProcessor.js +0 -125
- package/esm/core/component/element/elementProcessor/baseElementProcessor.d.ts +0 -41
- package/esm/core/component/element/elementProcessor/baseElementProcessor.js +0 -96
- package/esm/core/component/element/elementProcessor/paymentProcessor.d.ts +0 -20
- package/esm/core/component/element/elementProcessor/paymentProcessor.js +0 -380
- package/esm/core/component/element/util.d.ts +0 -69
- package/esm/core/component/element/util.js +0 -477
- package/esm/core/component/oldElement/index.d.ts +0 -59
- package/esm/core/component/oldElement/index.js +0 -956
- package/esm/core/component/oldElement/mock.d.ts +0 -6
- package/esm/core/component/oldElement/mock.js +0 -567
- package/esm/core/component/oldElement/type.d.ts +0 -354
- package/esm/core/component/oldElement/type.js +0 -81
- package/esm/foundation/product-processor/autoDebit/deps.d.ts +0 -14
- package/esm/foundation/product-processor/autoDebit/deps.js +0 -12
- package/esm/foundation/product-processor/autoDebit/index.d.ts +0 -48
- package/esm/foundation/product-processor/autoDebit/index.js +0 -466
- package/esm/foundation/product-processor/element/index.d.ts +0 -7
- package/esm/foundation/product-processor/element/index.js +0 -24
- package/esm/util/redirect.d.ts +0 -6
- package/esm/util/redirect.js +0 -54
- /package/esm/core/component/{oldElement → element}/components/address.d.ts +0 -0
- /package/esm/core/component/{oldElement → element}/components/address.js +0 -0
- /package/esm/core/component/{oldElement → element}/components/auth.d.ts +0 -0
- /package/esm/core/component/{oldElement → element}/components/auth.js +0 -0
- /package/esm/core/component/{oldElement → element}/components/payment.d.ts +0 -0
- /package/esm/core/component/{oldElement → element}/components/payment.js +0 -0
- /package/esm/core/component/{oldElement → element}/utils.d.ts +0 -0
- /package/esm/core/component/{oldElement → element}/utils.js +0 -0
@@ -1,354 +0,0 @@
|
|
1
|
-
import { ActionForm, ConnectErrorCode, IAmount, IAmountView, IPaymentMethod } from '../../../types';
|
2
|
-
export declare enum ElementPaymentEvent {
|
3
|
-
RENDER_COMPONENT = "renderComponent",
|
4
|
-
CAPTURE_ASSET = "onCaptureAsset",
|
5
|
-
SIGN_OUT = "onSignout",
|
6
|
-
BLUR = "onBlur",
|
7
|
-
VALIDATE = "submitPay",
|
8
|
-
SUBMIT_RISK = "onSubmitRisk",
|
9
|
-
AFTER_SUBMIT = "onAfterSubmit",
|
10
|
-
SIZE_CHANGE = "onSizeChange",
|
11
|
-
LAUNCH = "onLaunch",
|
12
|
-
CALLBACK = "callback",
|
13
|
-
/**
|
14
|
-
* @deprecated 已废弃 请使用eventCallback
|
15
|
-
*/
|
16
|
-
SEND_MUITI_APP_EVENT_TO_SDK = "sendMuitiAppEventToSdk",
|
17
|
-
LOG = "log",
|
18
|
-
HANDLE_PAYMENT = "handlePayment"
|
19
|
-
}
|
20
|
-
export declare enum ElementPaymentMethod {
|
21
|
-
CONTAINER_ELEMENT = "CONTAINER_ELEMENT",
|
22
|
-
AUTH_ELEMENT = "AUTH_ELEMENT",
|
23
|
-
ADDRESS_ELEMENT = "ADDRESS_ELEMENT",
|
24
|
-
PAYMENT_ELEMENT = "PAYMENT_ELEMENT"
|
25
|
-
}
|
26
|
-
export declare enum ThemeType {
|
27
|
-
NostalgicGray = "nostalgicGray",
|
28
|
-
Default = "default",
|
29
|
-
Night = "night",
|
30
|
-
CherryBlossomPink = "cherryBlossomPink",
|
31
|
-
GamingPurple = "gamingPurple",
|
32
|
-
AgateGreen = "agateGreen"
|
33
|
-
}
|
34
|
-
export declare enum ElementType {
|
35
|
-
auth = "auth",
|
36
|
-
address = "address",
|
37
|
-
payment = "payment"
|
38
|
-
}
|
39
|
-
export declare enum PaymentElementLayout {
|
40
|
-
Tabs = "tabs",
|
41
|
-
Accordion = "Accordion"
|
42
|
-
}
|
43
|
-
export declare enum MountElementType {
|
44
|
-
auth = "AUTH_ELEMENT",
|
45
|
-
address = "ADDRESS_ELEMENT",
|
46
|
-
payment = "PAYMENT_ELEMENT"
|
47
|
-
}
|
48
|
-
export declare const addressTheme: {
|
49
|
-
default: string;
|
50
|
-
night: string;
|
51
|
-
};
|
52
|
-
export declare enum EventCallbackCode {
|
53
|
-
SDK_CREATE_COMPONENT_ERROR = "SDK_CREATE_COMPONENT_ERROR",
|
54
|
-
SDK_CREATEPAYMENT_PARAMETER_ERROR = "SDK_CREATEPAYMENT_PARAMETER_ERROR"
|
55
|
-
}
|
56
|
-
export declare enum ELEMENT_ENVIRONMENT {
|
57
|
-
DEV = "DEV",
|
58
|
-
TEST = "TEST",
|
59
|
-
SIT = "SIT",
|
60
|
-
PRE = "PRE",
|
61
|
-
PROD = "PROD",
|
62
|
-
SANDBOX = "SANDBOX"
|
63
|
-
}
|
64
|
-
export type ELEMENT_ENVIRONMENT_TYPE = keyof typeof ELEMENT_ENVIRONMENT | (typeof ELEMENT_ENVIRONMENT)[keyof typeof ELEMENT_ENVIRONMENT];
|
65
|
-
export interface IElementOptions {
|
66
|
-
sessionData: string;
|
67
|
-
environment?: ELEMENT_ENVIRONMENT_TYPE;
|
68
|
-
locale?: string;
|
69
|
-
version?: string;
|
70
|
-
appearance?: {
|
71
|
-
theme: ThemeType.Default | ThemeType.Night;
|
72
|
-
};
|
73
|
-
onEventCallback?: ({ code, message, result }: {
|
74
|
-
code: EventCallbackCode;
|
75
|
-
message: string;
|
76
|
-
result?: any;
|
77
|
-
}) => void;
|
78
|
-
loading?: {
|
79
|
-
onStartLoading: () => void;
|
80
|
-
onEndLoading: () => void;
|
81
|
-
};
|
82
|
-
}
|
83
|
-
export interface AddressMountComponentsParams {
|
84
|
-
configParams?: AddressMountConfig;
|
85
|
-
prefillValue: Array<AddressSubmitData>;
|
86
|
-
sessionData: string;
|
87
|
-
appearance: {
|
88
|
-
themeType: string;
|
89
|
-
};
|
90
|
-
debugProps?: {
|
91
|
-
localLink: string;
|
92
|
-
};
|
93
|
-
elementProps?: {
|
94
|
-
elementLink: string;
|
95
|
-
};
|
96
|
-
}
|
97
|
-
interface BaseMountOptions<T = void> {
|
98
|
-
configParams?: T;
|
99
|
-
sessionData: string;
|
100
|
-
debugProps?: {
|
101
|
-
localLink: string;
|
102
|
-
};
|
103
|
-
elementProps?: {
|
104
|
-
elementLink: string;
|
105
|
-
};
|
106
|
-
}
|
107
|
-
type HideField = 'shippingCountry' | 'shippingName' | 'shippingPhoneNo' | 'shippingRegion' | 'shippingAddress1' | 'shippingZipCode' | 'shippingAddress2';
|
108
|
-
interface AddressMountConfig {
|
109
|
-
/**
|
110
|
-
* 是否开启地址联想功能
|
111
|
-
* 0 开启
|
112
|
-
* 1 关闭
|
113
|
-
*/
|
114
|
-
autoSaveAsDefaultAddress?: boolean;
|
115
|
-
/**
|
116
|
-
* 隐藏部分地址要素
|
117
|
-
*/
|
118
|
-
hideFields?: Array<HideField>;
|
119
|
-
}
|
120
|
-
export interface AddressMountOptions extends BaseMountOptions<AddressMountConfig> {
|
121
|
-
type: ElementType.address;
|
122
|
-
prefillValue: Array<AddressSubmitData>;
|
123
|
-
appearance?: {
|
124
|
-
theme?: ThemeType.Default | ThemeType.Night;
|
125
|
-
};
|
126
|
-
}
|
127
|
-
export interface LinkAuthMountOptions extends BaseMountOptions {
|
128
|
-
type: ElementType.auth;
|
129
|
-
appearance?: {
|
130
|
-
theme?: ThemeType;
|
131
|
-
};
|
132
|
-
}
|
133
|
-
export interface PaymentMountOptions extends BaseMountOptions {
|
134
|
-
type: ElementType.payment;
|
135
|
-
appearance?: {
|
136
|
-
theme?: ThemeType;
|
137
|
-
layout?: {
|
138
|
-
type: PaymentElementLayout;
|
139
|
-
};
|
140
|
-
variables?: {
|
141
|
-
'content-primary': string;
|
142
|
-
'content-secondary': string;
|
143
|
-
'content-tertiary': string;
|
144
|
-
'content-quaternary': string;
|
145
|
-
'background-primary': string;
|
146
|
-
'background-secondary': string;
|
147
|
-
'background-disable': string;
|
148
|
-
'background-transparency': string;
|
149
|
-
'border-primary': string;
|
150
|
-
'border-secondary': string;
|
151
|
-
'border-disable': string;
|
152
|
-
'action-normal': string;
|
153
|
-
'action-hover': string;
|
154
|
-
'action-disable': string;
|
155
|
-
'action-secondary': string;
|
156
|
-
'state-failure': string;
|
157
|
-
'state-warning': string;
|
158
|
-
'state-success': string;
|
159
|
-
'state-info': string;
|
160
|
-
'state-marketing': string;
|
161
|
-
'radius-backup': string;
|
162
|
-
'radius-module': string;
|
163
|
-
'radius-component': string;
|
164
|
-
'radius-button': string;
|
165
|
-
};
|
166
|
-
};
|
167
|
-
}
|
168
|
-
export declare enum AddressEventCallbackName {
|
169
|
-
SHIPPING_CHANGE = "SHIPPING_CHANGE"
|
170
|
-
}
|
171
|
-
interface BaseMountResult {
|
172
|
-
}
|
173
|
-
export interface AddressMountResult extends BaseMountResult {
|
174
|
-
on: (event: AddressEventCallbackName, callback: (data: any) => void) => void;
|
175
|
-
}
|
176
|
-
export interface LinkAuthMountResult extends BaseMountResult {
|
177
|
-
}
|
178
|
-
export interface PaymentMountResult extends BaseMountResult {
|
179
|
-
}
|
180
|
-
export interface EventCallbackData<T = {}> {
|
181
|
-
source?: ElementPaymentMethod;
|
182
|
-
target?: ElementPaymentMethod;
|
183
|
-
success?: boolean;
|
184
|
-
data?: T;
|
185
|
-
event?: AddressEventCallbackName;
|
186
|
-
}
|
187
|
-
export interface ValidateResult<T = {}> {
|
188
|
-
success: boolean;
|
189
|
-
data: {
|
190
|
-
success: boolean;
|
191
|
-
data: T;
|
192
|
-
};
|
193
|
-
}
|
194
|
-
export interface AuthSubmitData {
|
195
|
-
accountInfo: {
|
196
|
-
email: string;
|
197
|
-
};
|
198
|
-
}
|
199
|
-
export interface PaymentSubmitData {
|
200
|
-
paymentMethod: {
|
201
|
-
paymentMethodType: string;
|
202
|
-
paymentMethodDetail?: {
|
203
|
-
cardNo?: string;
|
204
|
-
};
|
205
|
-
cardHolderName?: {
|
206
|
-
firstName: string;
|
207
|
-
};
|
208
|
-
lastName: string;
|
209
|
-
};
|
210
|
-
paymentFactors: {
|
211
|
-
paymentRedirectUrl: string;
|
212
|
-
paymentMethodId?: string;
|
213
|
-
};
|
214
|
-
}
|
215
|
-
export interface AddressSubmitData {
|
216
|
-
shippingName: {
|
217
|
-
firstName: string;
|
218
|
-
lastName: string;
|
219
|
-
};
|
220
|
-
shippingPhoneNo: string;
|
221
|
-
shippingAddress: {
|
222
|
-
region: string;
|
223
|
-
address1: string;
|
224
|
-
address2: string;
|
225
|
-
city?: string;
|
226
|
-
province?: string;
|
227
|
-
zipCode: string;
|
228
|
-
districts?: string[];
|
229
|
-
districtValues?: {
|
230
|
-
[key: string]: string;
|
231
|
-
};
|
232
|
-
};
|
233
|
-
notes: string;
|
234
|
-
prefer: '1' | '0';
|
235
|
-
shippingId: string;
|
236
|
-
actionFlag?: 'I' | 'U' | 'D';
|
237
|
-
}
|
238
|
-
export interface SubmitServiceParams extends PaymentSubmitData {
|
239
|
-
accountInfo: AuthSubmitData['accountInfo'];
|
240
|
-
shipping?: AddressSubmitData;
|
241
|
-
}
|
242
|
-
interface SubmitResultActionForm extends ActionForm {
|
243
|
-
paymentCodeExpireTime: string;
|
244
|
-
}
|
245
|
-
export interface SubmitServiceResult {
|
246
|
-
success: boolean;
|
247
|
-
errorCode: ConnectErrorCode;
|
248
|
-
errorMessage: string;
|
249
|
-
errorStatus: string;
|
250
|
-
traceId: string;
|
251
|
-
actionForm?: SubmitResultActionForm;
|
252
|
-
codeFormViews?: Array<{
|
253
|
-
codeExpireTime?: string;
|
254
|
-
}>;
|
255
|
-
}
|
256
|
-
export interface SubmitFuncResult {
|
257
|
-
success: boolean;
|
258
|
-
msg: string;
|
259
|
-
}
|
260
|
-
declare enum AccountStatusEnum {
|
261
|
-
EFFECTIVE = "EFFECTIVE",
|
262
|
-
UNREGISTERED = "UNREGISTERED"
|
263
|
-
}
|
264
|
-
type IAccountInfo = {
|
265
|
-
email?: string;
|
266
|
-
verifyId?: string;
|
267
|
-
accountStatus?: AccountStatusEnum;
|
268
|
-
oneAccountId?: string;
|
269
|
-
needOtp?: boolean;
|
270
|
-
errorMsg?: string;
|
271
|
-
inputStatus?: 'success' | 'loading' | 'error' | 'focused' | '';
|
272
|
-
resendLeftTimes?: number;
|
273
|
-
};
|
274
|
-
interface ShippingsItem {
|
275
|
-
shippingName: {
|
276
|
-
firstName: string;
|
277
|
-
lastName: string;
|
278
|
-
};
|
279
|
-
prefer: '1' | '0';
|
280
|
-
shippingId: string;
|
281
|
-
shippingPhoneNo: string;
|
282
|
-
shippingAddress: {
|
283
|
-
region: string;
|
284
|
-
state: string;
|
285
|
-
city: string;
|
286
|
-
address1: string;
|
287
|
-
address2: string;
|
288
|
-
zipCode: string;
|
289
|
-
};
|
290
|
-
}
|
291
|
-
interface Estimate {
|
292
|
-
unit: string;
|
293
|
-
value: number;
|
294
|
-
}
|
295
|
-
interface DeliveryEstimate {
|
296
|
-
maximum: Estimate;
|
297
|
-
minimum: Estimate;
|
298
|
-
}
|
299
|
-
interface FixedAmount {
|
300
|
-
amount: number;
|
301
|
-
currency: string;
|
302
|
-
}
|
303
|
-
interface ShippingRateData {
|
304
|
-
displayName: string;
|
305
|
-
deliveryEstimate: DeliveryEstimate;
|
306
|
-
fixedAmount: FixedAmount;
|
307
|
-
}
|
308
|
-
interface ShippingAddress {
|
309
|
-
address1: string;
|
310
|
-
address2: string;
|
311
|
-
city: string;
|
312
|
-
region: string;
|
313
|
-
state: string;
|
314
|
-
zipCode: string;
|
315
|
-
}
|
316
|
-
interface IUserName {
|
317
|
-
firstName: string;
|
318
|
-
middleName?: string;
|
319
|
-
lastName: string;
|
320
|
-
fullName?: string;
|
321
|
-
}
|
322
|
-
type Shippings = ShippingsItem[];
|
323
|
-
type IPaymentMethods = IPaymentMethod[];
|
324
|
-
interface CKPShipping {
|
325
|
-
shippingRateId?: string;
|
326
|
-
shippingRateData?: ShippingRateData;
|
327
|
-
shippingAddress: ShippingAddress;
|
328
|
-
shippingFee?: IAmount;
|
329
|
-
shippingFeeView?: IAmountView;
|
330
|
-
shippingDescription?: string;
|
331
|
-
deliveryEstimate?: DeliveryEstimate;
|
332
|
-
shippingFeeId?: string;
|
333
|
-
shippingName?: IUserName;
|
334
|
-
shippingPhoneNo?: string;
|
335
|
-
shipToEmail?: string;
|
336
|
-
notes?: string;
|
337
|
-
}
|
338
|
-
export interface AccountQueryRequest {
|
339
|
-
paymentSessionData: string;
|
340
|
-
paymentSessionConfig: any;
|
341
|
-
accountInfo: IAccountInfo;
|
342
|
-
}
|
343
|
-
export interface AccountQueryResult {
|
344
|
-
accountInfo: IAccountInfo;
|
345
|
-
actionForm?: ActionForm;
|
346
|
-
paymentMethods: IPaymentMethods;
|
347
|
-
shippings: Shippings;
|
348
|
-
success: boolean;
|
349
|
-
errorCode?: string;
|
350
|
-
errorMessage?: string;
|
351
|
-
errorStatus?: string;
|
352
|
-
shippingInfo?: CKPShipping;
|
353
|
-
}
|
354
|
-
export {};
|
@@ -1,81 +0,0 @@
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
3
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
4
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
5
|
-
export var ElementPaymentEvent = /*#__PURE__*/function (ElementPaymentEvent) {
|
6
|
-
ElementPaymentEvent["RENDER_COMPONENT"] = "renderComponent";
|
7
|
-
ElementPaymentEvent["CAPTURE_ASSET"] = "onCaptureAsset";
|
8
|
-
ElementPaymentEvent["SIGN_OUT"] = "onSignout";
|
9
|
-
ElementPaymentEvent["BLUR"] = "onBlur";
|
10
|
-
ElementPaymentEvent["VALIDATE"] = "submitPay";
|
11
|
-
ElementPaymentEvent["SUBMIT_RISK"] = "onSubmitRisk";
|
12
|
-
ElementPaymentEvent["AFTER_SUBMIT"] = "onAfterSubmit";
|
13
|
-
ElementPaymentEvent["SIZE_CHANGE"] = "onSizeChange";
|
14
|
-
ElementPaymentEvent["LAUNCH"] = "onLaunch";
|
15
|
-
ElementPaymentEvent["CALLBACK"] = "callback";
|
16
|
-
ElementPaymentEvent["SEND_MUITI_APP_EVENT_TO_SDK"] = "sendMuitiAppEventToSdk";
|
17
|
-
ElementPaymentEvent["LOG"] = "log";
|
18
|
-
ElementPaymentEvent["HANDLE_PAYMENT"] = "handlePayment";
|
19
|
-
return ElementPaymentEvent;
|
20
|
-
}({});
|
21
|
-
export var ElementPaymentMethod = /*#__PURE__*/function (ElementPaymentMethod) {
|
22
|
-
ElementPaymentMethod["CONTAINER_ELEMENT"] = "CONTAINER_ELEMENT";
|
23
|
-
ElementPaymentMethod["AUTH_ELEMENT"] = "AUTH_ELEMENT";
|
24
|
-
ElementPaymentMethod["ADDRESS_ELEMENT"] = "ADDRESS_ELEMENT";
|
25
|
-
ElementPaymentMethod["PAYMENT_ELEMENT"] = "PAYMENT_ELEMENT";
|
26
|
-
return ElementPaymentMethod;
|
27
|
-
}({});
|
28
|
-
export var ThemeType = /*#__PURE__*/function (ThemeType) {
|
29
|
-
ThemeType["NostalgicGray"] = "nostalgicGray";
|
30
|
-
ThemeType["Default"] = "default";
|
31
|
-
ThemeType["Night"] = "night";
|
32
|
-
ThemeType["CherryBlossomPink"] = "cherryBlossomPink";
|
33
|
-
ThemeType["GamingPurple"] = "gamingPurple";
|
34
|
-
ThemeType["AgateGreen"] = "agateGreen";
|
35
|
-
return ThemeType;
|
36
|
-
}({});
|
37
|
-
export var ElementType = /*#__PURE__*/function (ElementType) {
|
38
|
-
ElementType["auth"] = "auth";
|
39
|
-
ElementType["address"] = "address";
|
40
|
-
ElementType["payment"] = "payment";
|
41
|
-
return ElementType;
|
42
|
-
}({});
|
43
|
-
export var PaymentElementLayout = /*#__PURE__*/function (PaymentElementLayout) {
|
44
|
-
PaymentElementLayout["Tabs"] = "tabs";
|
45
|
-
PaymentElementLayout["Accordion"] = "Accordion";
|
46
|
-
return PaymentElementLayout;
|
47
|
-
}({});
|
48
|
-
export var MountElementType = /*#__PURE__*/function (MountElementType) {
|
49
|
-
MountElementType["auth"] = "AUTH_ELEMENT";
|
50
|
-
MountElementType["address"] = "ADDRESS_ELEMENT";
|
51
|
-
MountElementType["payment"] = "PAYMENT_ELEMENT";
|
52
|
-
return MountElementType;
|
53
|
-
}({});
|
54
|
-
export var addressTheme = _defineProperty(_defineProperty({}, ThemeType.Default, 'LIGHT'), ThemeType.Night, 'NIGHT');
|
55
|
-
export var EventCallbackCode = /*#__PURE__*/function (EventCallbackCode) {
|
56
|
-
EventCallbackCode["SDK_CREATE_COMPONENT_ERROR"] = "SDK_CREATE_COMPONENT_ERROR";
|
57
|
-
EventCallbackCode["SDK_CREATEPAYMENT_PARAMETER_ERROR"] = "SDK_CREATEPAYMENT_PARAMETER_ERROR";
|
58
|
-
return EventCallbackCode;
|
59
|
-
}({});
|
60
|
-
export var ELEMENT_ENVIRONMENT = /*#__PURE__*/function (ELEMENT_ENVIRONMENT) {
|
61
|
-
ELEMENT_ENVIRONMENT["DEV"] = "DEV";
|
62
|
-
ELEMENT_ENVIRONMENT["TEST"] = "TEST";
|
63
|
-
ELEMENT_ENVIRONMENT["SIT"] = "SIT";
|
64
|
-
ELEMENT_ENVIRONMENT["PRE"] = "PRE";
|
65
|
-
ELEMENT_ENVIRONMENT["PROD"] = "PROD";
|
66
|
-
ELEMENT_ENVIRONMENT["SANDBOX"] = "SANDBOX";
|
67
|
-
return ELEMENT_ENVIRONMENT;
|
68
|
-
}({});
|
69
|
-
// export type IMountOptions = AddressMountOptions | LinkAuthMountOptions | PaymentMountOptions;
|
70
|
-
|
71
|
-
export var AddressEventCallbackName = /*#__PURE__*/function (AddressEventCallbackName) {
|
72
|
-
AddressEventCallbackName["SHIPPING_CHANGE"] = "SHIPPING_CHANGE";
|
73
|
-
return AddressEventCallbackName;
|
74
|
-
}({});
|
75
|
-
|
76
|
-
// export type IMountResult = AddressMountResult | LinkAuthMountResult | PaymentMountResult;
|
77
|
-
var AccountStatusEnum = /*#__PURE__*/function (AccountStatusEnum) {
|
78
|
-
AccountStatusEnum["EFFECTIVE"] = "EFFECTIVE";
|
79
|
-
AccountStatusEnum["UNREGISTERED"] = "UNREGISTERED";
|
80
|
-
return AccountStatusEnum;
|
81
|
-
}(AccountStatusEnum || {}); // element 接口start
|
@@ -1,14 +0,0 @@
|
|
1
|
-
export type { BizFlowStartBehavior, PaymentContext, ProductProcessor, RedirectBehaviorPayload, RenderBehaviorPayload, SDKMetaData, } from '../..';
|
2
|
-
export { v2AppMarmotMap } from '../../../config';
|
3
|
-
export { COMPONENT_CONTAINER_ID, COMPONENT_SECTION_ID, ERRORMESSAGE, EVENT, LOADTIME_LIMIT } from '../../../constant';
|
4
|
-
export { getComponentSign } from '../../../core/component';
|
5
|
-
export { ComponentSignEnum, eventCodeEnum, PlatformEnum } from '../../../types';
|
6
|
-
export type { CashierSdkActionQueryRequest, IoptionsParams } from '../../../types';
|
7
|
-
export { isPC, isTrue, queryParse } from '../../../util';
|
8
|
-
export { isLocalMock } from '../../../util/mock';
|
9
|
-
export { EventCenter } from '../..//service/event-center';
|
10
|
-
export { ServiceProvider } from '../../service';
|
11
|
-
export { LogService } from '../../service/log';
|
12
|
-
export { RequesterService } from '../../service/requester/requester';
|
13
|
-
export { SecurityService } from '../../service/security';
|
14
|
-
export { getWebAppV2Url } from '../../utils/web_app_url_utils';
|
@@ -1,12 +0,0 @@
|
|
1
|
-
export { v2AppMarmotMap } from "../../../config";
|
2
|
-
export { COMPONENT_CONTAINER_ID, COMPONENT_SECTION_ID, ERRORMESSAGE, EVENT, LOADTIME_LIMIT } from "../../../constant";
|
3
|
-
export { getComponentSign } from "../../../core/component";
|
4
|
-
export { ComponentSignEnum, eventCodeEnum, PlatformEnum } from "../../../types";
|
5
|
-
export { isPC, isTrue, queryParse } from "../../../util";
|
6
|
-
export { isLocalMock } from "../../../util/mock";
|
7
|
-
export { EventCenter } from "../..//service/event-center";
|
8
|
-
export { ServiceProvider } from "../../service";
|
9
|
-
export { LogService } from "../../service/log";
|
10
|
-
export { RequesterService } from "../../service/requester/requester";
|
11
|
-
export { SecurityService } from "../../service/security";
|
12
|
-
export { getWebAppV2Url } from "../../utils/web_app_url_utils";
|
@@ -1,48 +0,0 @@
|
|
1
|
-
import { BizFlowStartBehavior, IoptionsParams, PaymentContext, ProductProcessor, SDKMetaData } from './deps';
|
2
|
-
export declare class AutoDebitProcessor implements ProductProcessor {
|
3
|
-
private paymentContext?;
|
4
|
-
private initConfig;
|
5
|
-
private logger;
|
6
|
-
private eventCenter;
|
7
|
-
private securityService;
|
8
|
-
private instanceId;
|
9
|
-
private componentSign;
|
10
|
-
private hostSign;
|
11
|
-
private _performanceData;
|
12
|
-
private SECURITY_SDK_INIT_TIMEOUT;
|
13
|
-
init(config: IoptionsParams, instanceId: string, sdkMetaData: SDKMetaData): void;
|
14
|
-
startBizFlow(paymentContext: PaymentContext): Promise<BizFlowStartBehavior>;
|
15
|
-
private acquireApdidToken;
|
16
|
-
/**
|
17
|
-
* 获取SDK操作查询请求
|
18
|
-
* @returns {Promise<CashierSdkActionQueryRequest | { message?: string; success: boolean }>} 返回SDK操作查询请求或错误信息
|
19
|
-
*/
|
20
|
-
private getSdkActionQuery;
|
21
|
-
/**
|
22
|
-
* webLaunchPromise方法用于返回一个Promise对象,用于异步加载Web App
|
23
|
-
* @returns {Promise} 返回一个Promise对象
|
24
|
-
*/
|
25
|
-
private webLaunchPromise;
|
26
|
-
private sendRequestAndWaitWebLaunch;
|
27
|
-
private buildRedirectResult;
|
28
|
-
/**
|
29
|
-
* 构建 Web App 的 URL
|
30
|
-
* @returns {string} Web App 的 URL
|
31
|
-
*/
|
32
|
-
private buildWebAppUrl;
|
33
|
-
/**
|
34
|
-
* 初始化安全SDK
|
35
|
-
* @returns {Promise}
|
36
|
-
*/
|
37
|
-
private initSecuritySDK;
|
38
|
-
/**
|
39
|
-
* 设置容器宽度
|
40
|
-
* 如果是 Trustly 支付方式,并且显示平台为桌面端,则设置组件区块和容器的最大宽度为 656px
|
41
|
-
*/
|
42
|
-
private setAchAutoDebitContainerWidth;
|
43
|
-
/**
|
44
|
-
* 判断是否为Trustly支付方式
|
45
|
-
* @returns {boolean} true 表示是Trustly支付方式
|
46
|
-
*/
|
47
|
-
private get isTrustly();
|
48
|
-
}
|