react-sdk-feexpay 1.0.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.
@@ -0,0 +1,85 @@
1
+ import React, { ReactNode } from 'react';
2
+
3
+ type Network = 'MTN' | 'MOOV' | 'CELTIIS' | 'CORIS' | 'ORANGE' | 'WAVE' | 'FREE' | 'TOGOCOM';
4
+ type Country = 'BENIN' | 'COTE_D_IVOIRE' | 'BURKINA_FASO' | 'CONGO_BRAZZAVILLE' | 'SENEGAL' | 'TOGO';
5
+ type PaymentMethod = 'MOBILE' | 'CARD' | 'WALLET';
6
+ type Currency = 'XOF' | 'USD' | 'CAD' | 'XAF';
7
+ type PaymentStatus = 'PENDING' | 'SUCCESSFUL' | 'FAILED' | 'TIMEOUT' | 'INSUFFICIENT_FUNDS' | 'SUCCESS';
8
+ interface PaymentConfig {
9
+ amount: number;
10
+ description: string;
11
+ id: string;
12
+ token: string;
13
+ callback_url?: string;
14
+ error_callback_url?: string;
15
+ mode?: 'SANDBOX' | 'LIVE';
16
+ customId?: string;
17
+ fields_to_hide?: string[];
18
+ callback?: (response: {
19
+ reference: string;
20
+ status: PaymentStatus;
21
+ phoneNumber: string;
22
+ reseau: string;
23
+ callback_info: Record<string, unknown>;
24
+ description: string;
25
+ transaction_id: string;
26
+ message: string;
27
+ amount: number;
28
+ currency: string;
29
+ first_name: string;
30
+ email: string;
31
+ }) => void;
32
+ currency?: Currency;
33
+ case?: string;
34
+ callback_info?: Record<string, unknown>;
35
+ first_name?: string;
36
+ email?: string;
37
+ buttonText?: string;
38
+ buttonClass?: string;
39
+ defaultValueField?: Record<string, any>;
40
+ }
41
+ interface Transaction {
42
+ reference: string;
43
+ status: PaymentStatus;
44
+ amount: number;
45
+ fees: number;
46
+ total: number;
47
+ phoneNumber: string;
48
+ network: Network;
49
+ country: Country;
50
+ timestamp: number;
51
+ }
52
+
53
+ interface FeexPayProviderProps {
54
+ children: ReactNode;
55
+ }
56
+ declare const FeexPayProvider: React.FC<FeexPayProviderProps>;
57
+
58
+ type FeexPayProps = {
59
+ amount: number;
60
+ token: string;
61
+ id: string;
62
+ description?: string;
63
+ callback?: PaymentConfig['callback'];
64
+ callback_url?: string;
65
+ error_callback_url?: string;
66
+ callback_info?: Record<string, unknown>;
67
+ reference?: string;
68
+ customId?: string;
69
+ fieldsToHide?: string[];
70
+ fields_to_hide?: string[];
71
+ buttonClass?: string;
72
+ buttonText?: string;
73
+ buttonStyles?: React.CSSProperties;
74
+ defaultValueField?: Record<string, any>;
75
+ mode?: 'LIVE' | 'SANDBOX';
76
+ currency?: string;
77
+ case?: string;
78
+ first_name?: string;
79
+ email?: string;
80
+ };
81
+ declare const FeexPay: React.FC<FeexPayProps>;
82
+
83
+ declare const FeexPayButton: React.FC<FeexPayProps>;
84
+
85
+ export { type Country, type Currency, FeexPayButton, type FeexPayProps, FeexPayProvider, type Network, type PaymentConfig, type PaymentMethod, type PaymentStatus, type Transaction, FeexPay as default };
@@ -0,0 +1,85 @@
1
+ import React, { ReactNode } from 'react';
2
+
3
+ type Network = 'MTN' | 'MOOV' | 'CELTIIS' | 'CORIS' | 'ORANGE' | 'WAVE' | 'FREE' | 'TOGOCOM';
4
+ type Country = 'BENIN' | 'COTE_D_IVOIRE' | 'BURKINA_FASO' | 'CONGO_BRAZZAVILLE' | 'SENEGAL' | 'TOGO';
5
+ type PaymentMethod = 'MOBILE' | 'CARD' | 'WALLET';
6
+ type Currency = 'XOF' | 'USD' | 'CAD' | 'XAF';
7
+ type PaymentStatus = 'PENDING' | 'SUCCESSFUL' | 'FAILED' | 'TIMEOUT' | 'INSUFFICIENT_FUNDS' | 'SUCCESS';
8
+ interface PaymentConfig {
9
+ amount: number;
10
+ description: string;
11
+ id: string;
12
+ token: string;
13
+ callback_url?: string;
14
+ error_callback_url?: string;
15
+ mode?: 'SANDBOX' | 'LIVE';
16
+ customId?: string;
17
+ fields_to_hide?: string[];
18
+ callback?: (response: {
19
+ reference: string;
20
+ status: PaymentStatus;
21
+ phoneNumber: string;
22
+ reseau: string;
23
+ callback_info: Record<string, unknown>;
24
+ description: string;
25
+ transaction_id: string;
26
+ message: string;
27
+ amount: number;
28
+ currency: string;
29
+ first_name: string;
30
+ email: string;
31
+ }) => void;
32
+ currency?: Currency;
33
+ case?: string;
34
+ callback_info?: Record<string, unknown>;
35
+ first_name?: string;
36
+ email?: string;
37
+ buttonText?: string;
38
+ buttonClass?: string;
39
+ defaultValueField?: Record<string, any>;
40
+ }
41
+ interface Transaction {
42
+ reference: string;
43
+ status: PaymentStatus;
44
+ amount: number;
45
+ fees: number;
46
+ total: number;
47
+ phoneNumber: string;
48
+ network: Network;
49
+ country: Country;
50
+ timestamp: number;
51
+ }
52
+
53
+ interface FeexPayProviderProps {
54
+ children: ReactNode;
55
+ }
56
+ declare const FeexPayProvider: React.FC<FeexPayProviderProps>;
57
+
58
+ type FeexPayProps = {
59
+ amount: number;
60
+ token: string;
61
+ id: string;
62
+ description?: string;
63
+ callback?: PaymentConfig['callback'];
64
+ callback_url?: string;
65
+ error_callback_url?: string;
66
+ callback_info?: Record<string, unknown>;
67
+ reference?: string;
68
+ customId?: string;
69
+ fieldsToHide?: string[];
70
+ fields_to_hide?: string[];
71
+ buttonClass?: string;
72
+ buttonText?: string;
73
+ buttonStyles?: React.CSSProperties;
74
+ defaultValueField?: Record<string, any>;
75
+ mode?: 'LIVE' | 'SANDBOX';
76
+ currency?: string;
77
+ case?: string;
78
+ first_name?: string;
79
+ email?: string;
80
+ };
81
+ declare const FeexPay: React.FC<FeexPayProps>;
82
+
83
+ declare const FeexPayButton: React.FC<FeexPayProps>;
84
+
85
+ export { type Country, type Currency, FeexPayButton, type FeexPayProps, FeexPayProvider, type Network, type PaymentConfig, type PaymentMethod, type PaymentStatus, type Transaction, FeexPay as default };