You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello @Kingswhale, so sorry you're experiencing this, but I've been unable to reproduce from my end. Here's a trick you apply for now to resolve this on your end.
Debounce the redirect handler so that it only fires once, see the example below.
classYourComponentextendsReact.Component{
...
redirectTimeout;
...
onSuccess=(result)=>{// clear timerclearTimeout(this.redirectTimeout);// set timer to handle result in 100msthis.redirectTimeout=setTimeoute(()=>{// do something with the result},100);};
...
render(){
...
return(
...
<PayWithFlutterwaveonRedirect={this.onSuccess}options={{tx_ref: Date.parse(newDate()).toString(),authorization: PUBLICKEY_FLUTTER,customer: {email: email,phonenumber: phoneNumber,name: userName,},amount: amount,currency: 'NGN',payment_options: 'card',}}/>...);}}
Please try this out and let me know if it solves your problem.
Thanks.
Kindly help me with this
<PayWithFlutterwave
onRedirect={this.onsuccess}
options={{
tx_ref: Date.parse(new Date()).toString(),
authorization: PUBLICKEY_FLUTTER,
customer: {
email: email.toString(),
phonenumber: phoneNumber.toString(),
name: userName.toString(),
},
amount: parseFloat(amount),
currency: 'NGN',
payment_options: 'card',
}} />
The text was updated successfully, but these errors were encountered: