forked from elanic-tech/react-native-paytm
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathindex.d.ts
48 lines (41 loc) · 1.16 KB
/
index.d.ts
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
interface PayTmPaymentDetails {
mode: 'Staging' | 'Production';
MID: string;
INDUSTRY_TYPE_ID: string;
WEBSITE: string;
CHANNEL_ID: string;
TXN_AMOUNT: string;
ORDER_ID: string;
EMAIL?: string;
MOBILE_NO?: string;
CUST_ID: string;
CHECKSUMHASH: string;
CALLBACK_URL: string;
MERC_UNQ_REF?: string;
}
interface PaytmEvents {
PAYTM_RESPONSE: 'PayTMResponse';
}
interface PaytmResponseIos {
ORDERID: string;
MID: string;
TXNID: string;
TXNAMOUNT: string;
PAYMENTMODE: string;
CURRENCY: string;
TXNDATE: string;
STATUS: string;
RESPCODE: string;
RESPMSG: string;
GATEWAYNAME: string;
BANKTXNID: string;
BANKNAME: string;
CHECKSUMHASH: string;
}
interface PaytmResponseAndroid extends PaytmResponseIos {
status: string;
}
export const Events: PaytmEvents;
export function startPayment(details: PayTmPaymentDetails): void;
export function addListener(event: string, handler: (response: PaytmResponseIos | PaytmResponseAndroid) => void): void;
export function removeListener(event: string, handler: (response: PaytmResponseIos | PaytmResponseAndroid) => void): void;