-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
32 lines (22 loc) · 858 Bytes
/
index.d.ts
File metadata and controls
32 lines (22 loc) · 858 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
export interface IElepayConfig {
publicKey?: string;
apiUrl?: string;
googlePayEnvironment?: string;
languageKey?: Language_Key;
}
export type Language_Key = 'english' | 'simplifiedchinise' | 'traditionalchinese' | 'japanese' | ''
export type Elepay_State = 'succeeded' | 'cancelled' | 'failed'
export interface IElepayResult {
state: Elepay_State
paymentId: null | string
}
export interface IElepayError {
code: string
reason: string
message: string
}
export type ElepayCallBack = (result: IElepayResult, error?: IElepayError) => void
export function initElepay(config: IElepayConfig): void
export function handlePaymentWithPayload(payload: string, callback: ElepayCallBack): void
export function changeLanguage(value:{ languageKey?: Language_Key }): void
export function handleOpenUrlString(url: string): void