Skip to content

Commit e1d4537

Browse files
committed
docs(readme): show document onRedirect required prop
1 parent 58bc783 commit e1d4537

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ import {PayWithFlutterwave} from 'flutterwave-react-native';
9191

9292
<PayWithFlutterwave
9393
...
94-
onComplete={handleOnComplete}
94+
onRedirect={handleOnRedirect}
9595
options={{
9696
tx_ref: transactionReference,
9797
authorization: '[merchant secret key]',
@@ -117,7 +117,7 @@ import {PayWithFlutterwave} from 'flutterwave-react-native';
117117

118118
<PayWithFlutterwave
119119
...
120-
onComplete={handleOnComplete}
120+
onRedirect={handleOnRedirect}
121121
options={{...}}
122122
customButton={(props) => (
123123
<TouchableOpacity
@@ -201,7 +201,7 @@ try {
201201
| Name | Required | Type | Default | Description |
202202
| --------- | --------- | ---- | ------- | ----------- |
203203
| style | No | object | undefined | Used to apply styling to the button.|
204-
| onComplete | Yes | function | **REQUIRED** | Called when a payment is completed successfully or is canceled. The function will receive [redirect params](#redirectparams) as an argument.|
204+
| onRedirect | Yes | function | **REQUIRED** | Called when a payment is completed successfully or is canceled. The function will receive [redirect params](#redirectparams) as an argument.|
205205
| onWillInitialize | No | function | undefined | This will be called before a payment link is generated.|
206206
| onDidInitialize | No | function | undefined | This is called when a new payment link has been successfully initialized.|
207207
| onInitializeError | No | function | undefined | This is called if an error occurred while initializing a new pyment link. The function will receive [FlutterwaveInitError](#flutterwaveiniterror) |
@@ -305,7 +305,7 @@ export interface FlutterwaveInitOptions {
305305
````typescript
306306
interface PayWithFlutterwaveProps {
307307
style?: ViewStyle;
308-
onComplete: (data: RedirectParams) => void;
308+
onRedirect: (data: RedirectParams) => void;
309309
onWillInitialize?: () => void;
310310
onDidInitialize?: () => void;
311311
onInitializeError?: (error: FlutterwaveInitError) => void;

README.v2.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ import {PayWithFlutterwaveV2} from 'flutterwave-react-native';
8383

8484
<PayWithFlutterwaveV2
8585
...
86-
onComplete={handleOnComplete}
86+
onRedirect={handleOnRedirect}
8787
options={{
8888
txref: txref,
8989
PBFPubKey: '[Your Flutterwave Public Key]',
@@ -106,7 +106,7 @@ import {PayWithFlutterwaveV2} from 'flutterwave-react-native';
106106

107107
<PayWithFlutterwaveV2
108108
...
109-
onComplete={handleOnComplete}
109+
onRedirect={handleOnRedirect}
110110
options={{...}}
111111
customButton={(props) => (
112112
<TouchableOpacity
@@ -199,7 +199,7 @@ Hi :wave:, so there are cases where you have already initialized a payment with
199199
| Name | Required | Type | Default | Description |
200200
| --------- | --------- | ---- | ------- | ----------- |
201201
| style | No | object | undefined | Used to apply styling to the button.|
202-
| onComplete | Yes | function | **REQUIRED** | Called when a payment is completed successfully or is canceled. The function will receive [on complete data](#oncompletedata)|
202+
| onRedirect | Yes | function | **REQUIRED** | Called when a payment is completed successfully or is canceled. The function will receive [on complete data](#oncompletedata)|
203203
| onWillInitialize | No | function | undefined | This will be called before a payment link is generated.|
204204
| onDidInitialize | No | function | undefined | This is called when a new payment link has been successfully initialized.|
205205
| onInitializeError | No | function | undefined | This is called if an error occurred while initializing a new pyment link. The function will receive [FlutterwaveInitError](#flutterwaveiniterror) |
@@ -290,7 +290,7 @@ export interface FlutterwaveInitV2Options {
290290
````typescript
291291
interface PayWithFlutterwaveV2Props {
292292
style?: ViewStyle;
293-
onComplete: (data: RedirectParamsV2) => void;
293+
onRedirect: (data: RedirectParamsV2) => void;
294294
onWillInitialize?: () => void;
295295
onDidInitialize?: () => void;
296296
onInitializeError?: (error: FlutterwaveInitError) => void;

0 commit comments

Comments
 (0)