File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ $ yarn add flutterwave-react-v3
50
50
51
51
``` javascript
52
52
import React from ' react' ;
53
- import { useFlutterwave } from ' flutterwave-react-v3' ;
53
+ import { useFlutterwave , closePaymentModal } from ' flutterwave-react-v3' ;
54
54
55
55
export default function App () {
56
56
const config = {
@@ -81,7 +81,8 @@ export default function App() {
81
81
onClick= {() => {
82
82
handleFlutterPayment ({
83
83
callback : (response ) => {
84
- console .log (response);
84
+ console .log (response);
85
+ closePaymentModal () // this will close the modal programmatically
85
86
},
86
87
onClose : () => {},
87
88
});
@@ -99,7 +100,7 @@ export default function App() {
99
100
100
101
``` javascript
101
102
import React from ' react' ;
102
- import { FlutterWaveButton } from ' flutterwave-react-v3' ;
103
+ import { FlutterWaveButton , closePaymentModal } from ' flutterwave-react-v3' ;
103
104
104
105
export default function App () {
105
106
const config = {
@@ -124,7 +125,8 @@ export default function App() {
124
125
... config,
125
126
text: ' Pay with Flutterwave!' ,
126
127
callback : (response ) => {
127
- console .log (response);
128
+ console .log (response);
129
+ closePaymentModal () // this will close the modal programmatically
128
130
},
129
131
onClose : () => {},
130
132
};
You can’t perform that action at this time.
0 commit comments