File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 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
5050
5151``` javascript
5252import React from ' react' ;
53- import { useFlutterwave } from ' flutterwave-react-v3' ;
53+ import { useFlutterwave , closePaymentModal } from ' flutterwave-react-v3' ;
5454
5555export default function App () {
5656 const config = {
@@ -81,7 +81,8 @@ export default function App() {
8181 onClick= {() => {
8282 handleFlutterPayment ({
8383 callback : (response ) => {
84- console .log (response);
84+ console .log (response);
85+ closePaymentModal () // this will close the modal programmatically
8586 },
8687 onClose : () => {},
8788 });
@@ -99,7 +100,7 @@ export default function App() {
99100
100101``` javascript
101102import React from ' react' ;
102- import { FlutterWaveButton } from ' flutterwave-react-v3' ;
103+ import { FlutterWaveButton , closePaymentModal } from ' flutterwave-react-v3' ;
103104
104105export default function App () {
105106 const config = {
@@ -124,7 +125,8 @@ export default function App() {
124125 ... config,
125126 text: ' Pay with Flutterwave!' ,
126127 callback : (response ) => {
127- console .log (response);
128+ console .log (response);
129+ closePaymentModal () // this will close the modal programmatically
128130 },
129131 onClose : () => {},
130132 };
You can’t perform that action at this time.
0 commit comments