-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathindex.d.ts
More file actions
29 lines (27 loc) · 804 Bytes
/
index.d.ts
File metadata and controls
29 lines (27 loc) · 804 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
type CreateCardTokenParams = {
holder_name: string;
card_number: string;
expiration_month: string;
expiration_year: string;
cvv2: string;
};
interface RNOpenpay {
/**
* Setup the instance with the credentials
*/
setup: (merchantID: string, apiKey: string, isProduction?: boolean) => void;
/**
* Create a card token, this function takes an object with the card info and
* returns a promise, the result is the token id string (it does not yet
* support sending an address):
*/
createCardToken: (params: CreateCardTokenParams) => Promise<string>;
/**
* Get the device session id, returns a promise, the result is the session id
* string.
*/
getDeviceSessionId: () => Promise<string>;
}
declare module "react-native-openpay" {
export default RNOpenpay;
}