@fractalpay/fractalpay-next 0.0.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/.eslintrc.json ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": ["next/core-web-vitals", "next/typescript"]
3
+ }
package/README.md ADDED
@@ -0,0 +1,120 @@
1
+ # ๐Ÿงฉ FractalPay React Components
2
+
3
+ A collection of React components to easily integrate FractalPay payment flows into your React applications.
4
+
5
+ ---
6
+
7
+ ## ๐Ÿงช Components
8
+
9
+ ### 1. `RequestPayment`
10
+
11
+ Initiate a payment request with optional customer and order details.
12
+
13
+ ```tsx
14
+
15
+ <RequestPayment
16
+ fractalpayClientKey="your-client-key"
17
+ amount="100.00"
18
+ customerId="cust_123"
19
+ orderID="order_001"
20
+ name="John Doe"
21
+ email="john@example.com"
22
+ phone="+11234567890"
23
+ from="checkout"
24
+ webname="MyWebsite"
25
+ discount="10"
26
+ tax="5"
27
+ surcharge="2"
28
+ require_3ds={true}
29
+ />
30
+ ```
31
+
32
+ ---
33
+
34
+ ### 2. `RequestPreAuthPayment`
35
+
36
+ Initiate a pre-authorization payment.
37
+
38
+ ```tsx
39
+
40
+ <RequestPreAuthPayment
41
+ fractalpayClientKey="your-client-key"
42
+ amount="100.00"
43
+ customerId="cust_123"
44
+ orderID="order_001"
45
+ />
46
+ ```
47
+
48
+ ---
49
+
50
+ ### 3. `GetPaymentPage`
51
+
52
+ Render a payment page interface with full customization.
53
+
54
+ ```tsx
55
+
56
+ <GetPaymentPage
57
+ fractalpayClientKey="your-client-key"
58
+ amount="150.00"
59
+ name="Alice"
60
+ email="alice@example.com"
61
+ phone="+19876543210"
62
+ />
63
+ ```
64
+
65
+ ---
66
+
67
+ ### 4. `PreAuthPayment`
68
+
69
+ Render a pre-auth payment page interface.
70
+
71
+ ```tsx
72
+
73
+ <PreAuthPayment
74
+ fractalpayClientKey="your-client-key"
75
+ amount="75.00"
76
+ />
77
+ ```
78
+
79
+ ---
80
+
81
+ ### 5. `AddCard`
82
+
83
+ Add a card with a simplified experience.
84
+
85
+ ```tsx
86
+
87
+ <AddCardEasyPay
88
+ fractalpayClientKey="your-client-key"
89
+ customerId="cust_456"
90
+ name="Jane Smith"
91
+ email="jane@example.com"
92
+ phone="+10987654321"
93
+ />
94
+ ```
95
+
96
+ ---
97
+
98
+ ## โš™๏ธ Props Overview
99
+
100
+ | Prop | Type | Required | Description |
101
+ |-----------------------|-----------|----------|--------------------------------------|
102
+ | `fractalpayClientKey` | `string` | โœ… | Your unique FractalPay client key |
103
+ | `customerId` | `string` | โŒ | Customer identifier |
104
+ | `orderID` | `string` | โŒ | Order identifier |
105
+ | `name` | `string` | โŒ | Customer name |
106
+ | `email` | `string` | โŒ | Customer email |
107
+ | `phone` | `string` | โŒ | Customer phone number |
108
+ | `from` | `string` | โŒ | Origin of the payment request |
109
+ | `amount` | `string` | โœ… | Amount to be charged |
110
+ | `webname` | `string` | โŒ | Website name |
111
+ | `discount` | `string` | โŒ | Discount amount |
112
+ | `tax` | `string` | โŒ | Tax amount |
113
+ | `surcharge` | `string` | โŒ | Additional surcharge |
114
+ | `require_3ds` | `boolean` | โŒ | Enable 3D Secure authentication |
115
+
116
+ ---
117
+
118
+ ## ๐Ÿ“„ License
119
+
120
+ MIT License ยฉ 2025 FractalPay Inc.
@@ -0,0 +1,78 @@
1
+ import React from 'react';
2
+
3
+ interface Props$4 {
4
+ fractalpayClientKey: string;
5
+ customerId?: string;
6
+ orderID?: string;
7
+ name?: string;
8
+ email?: string;
9
+ phone?: string;
10
+ from?: string;
11
+ amount: string;
12
+ webname?: string;
13
+ discount?: string;
14
+ tax?: string;
15
+ surcharge?: string;
16
+ require_3ds?: boolean;
17
+ }
18
+ declare function RequestPayment(props: Props$4): React.JSX.Element;
19
+
20
+ interface Props$3 {
21
+ fractalpayClientKey: string;
22
+ customerId?: string;
23
+ orderID?: string;
24
+ name?: string;
25
+ email?: string;
26
+ phone?: string;
27
+ from?: string;
28
+ amount: string;
29
+ webname?: string;
30
+ discount?: string;
31
+ tax?: string;
32
+ surcharge?: string;
33
+ require_3ds?: boolean;
34
+ }
35
+ declare function RequestPreAuthPayment(props: Props$3): React.JSX.Element;
36
+
37
+ type Props$2 = {
38
+ fractalpayClientKey: string;
39
+ customerId?: string;
40
+ orderID?: string;
41
+ name?: string;
42
+ email?: string;
43
+ phone?: string;
44
+ from?: string;
45
+ amount: string;
46
+ webname?: string;
47
+ discount?: string;
48
+ tax?: string;
49
+ surcharge?: string;
50
+ };
51
+ declare function GetPaymentPage(props: Props$2): React.JSX.Element;
52
+
53
+ type Props$1 = {
54
+ fractalpayClientKey: string;
55
+ customerId?: string;
56
+ orderID?: string;
57
+ name?: string;
58
+ email?: string;
59
+ phone?: string;
60
+ from?: string;
61
+ amount: string;
62
+ webname?: string;
63
+ discount?: string;
64
+ tax?: string;
65
+ surcharge?: string;
66
+ };
67
+ declare function PreAuthPayment(props: Props$1): React.JSX.Element;
68
+
69
+ type Props = {
70
+ fractalpayClientKey: string;
71
+ customerId?: string;
72
+ name?: string;
73
+ email?: string;
74
+ phone?: string;
75
+ };
76
+ declare function AddCardEasyPay(props: Props): React.JSX.Element;
77
+
78
+ export { AddCardEasyPay as AddCard, GetPaymentPage, PreAuthPayment, RequestPayment, RequestPreAuthPayment };
@@ -0,0 +1,78 @@
1
+ import React from 'react';
2
+
3
+ interface Props$4 {
4
+ fractalpayClientKey: string;
5
+ customerId?: string;
6
+ orderID?: string;
7
+ name?: string;
8
+ email?: string;
9
+ phone?: string;
10
+ from?: string;
11
+ amount: string;
12
+ webname?: string;
13
+ discount?: string;
14
+ tax?: string;
15
+ surcharge?: string;
16
+ require_3ds?: boolean;
17
+ }
18
+ declare function RequestPayment(props: Props$4): React.JSX.Element;
19
+
20
+ interface Props$3 {
21
+ fractalpayClientKey: string;
22
+ customerId?: string;
23
+ orderID?: string;
24
+ name?: string;
25
+ email?: string;
26
+ phone?: string;
27
+ from?: string;
28
+ amount: string;
29
+ webname?: string;
30
+ discount?: string;
31
+ tax?: string;
32
+ surcharge?: string;
33
+ require_3ds?: boolean;
34
+ }
35
+ declare function RequestPreAuthPayment(props: Props$3): React.JSX.Element;
36
+
37
+ type Props$2 = {
38
+ fractalpayClientKey: string;
39
+ customerId?: string;
40
+ orderID?: string;
41
+ name?: string;
42
+ email?: string;
43
+ phone?: string;
44
+ from?: string;
45
+ amount: string;
46
+ webname?: string;
47
+ discount?: string;
48
+ tax?: string;
49
+ surcharge?: string;
50
+ };
51
+ declare function GetPaymentPage(props: Props$2): React.JSX.Element;
52
+
53
+ type Props$1 = {
54
+ fractalpayClientKey: string;
55
+ customerId?: string;
56
+ orderID?: string;
57
+ name?: string;
58
+ email?: string;
59
+ phone?: string;
60
+ from?: string;
61
+ amount: string;
62
+ webname?: string;
63
+ discount?: string;
64
+ tax?: string;
65
+ surcharge?: string;
66
+ };
67
+ declare function PreAuthPayment(props: Props$1): React.JSX.Element;
68
+
69
+ type Props = {
70
+ fractalpayClientKey: string;
71
+ customerId?: string;
72
+ name?: string;
73
+ email?: string;
74
+ phone?: string;
75
+ };
76
+ declare function AddCardEasyPay(props: Props): React.JSX.Element;
77
+
78
+ export { AddCardEasyPay as AddCard, GetPaymentPage, PreAuthPayment, RequestPayment, RequestPreAuthPayment };