React-Native icon indicating copy to clipboard operation
React-Native copied to clipboard

iOS app crashes once it gets to the page where Paywithflutterwave is imported

Open EffiEmmanuel opened this issue 2 years ago • 4 comments

Description

Hi, my react native expo app crashes only on the page where PayWithFlutterwave is imported. This happens ONLY on the iOS TestFlight / live version. It works perfectly on the emulator but crashes on there.

it also works perfectly on the android version. Please how do I resolve this?

Steps to Reproduce

  1. Install Flutterwave-react-native package
  2. Import PayWithFlutterwave and use it in that page

Expected behaviour

Open up payment sheet and walk user through the payment process.

Actual behaviour

App crashes once the page containing this import statement / PayWithFlutterwave component is opened or navigated to.

Reproduces how often

Everytime on iOS TestFlight version.

EffiEmmanuel avatar Jul 08 '23 17:07 EffiEmmanuel

@thecodecafe @kpose @Official-kornelios @theafolayan please can you take a look at this? I'm having the same issue, the app crashes when you import Paywithflutterwave. If you comment it out everything works fine

Dalu26 avatar Aug 19 '23 22:08 Dalu26

@EffiEmmanuel @Dalu26 where you able to get past this?

3KINGZ avatar Sep 05 '23 08:09 3KINGZ

@3KINGZ @Dalu26 I think the package itself has issues! I was not able to get past through it using the PayWithFlutterwave component. It still crashed my app.

I solved this issue by using a custom web view.

  • I built a web page on the frontend of the company's website that processed Flutterwave payments using the Flutterwave web package

  • So I just injected the data into the url (using an id of course, not just plain data carrying amount as this can be altered by malicious users) AND redirected my users to that webpage using OpenBrowserAsync(URL)

  • Once payment is made or failed, I update my backend payment schema from the webpage's payment onsuccess or onerror handler

  • You can also listen for events on the app, to know if the browser was closed by the user

It was the only reasonable solution I could come up with and I hope this helps you also!

EffiEmmanuel avatar Sep 05 '23 08:09 EffiEmmanuel

@EffiEmmanuel thanks, i had to upgrade react-native-webview to the latest to resolve this issue

3KINGZ avatar Sep 07 '23 15:09 3KINGZ