Flutterwave / React-Native

React Native library for Flutterwave for Business (F4B) v2 and v3 APIs.
https://developer.flutterwave.com/
MIT License
6 stars 13 forks source link

modal not opening #36

Closed AnthonyFugi closed 3 years ago

AnthonyFugi commented 3 years ago

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle. PayWithFlutterwaveBase@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:138320:50 PayWithFlutterwave@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:138049:21 RCTView

AnthonyFugi commented 3 years ago

Thank God it worked! It seems the email field is required: in options: customer: { name: **********************, email: '**', }, Also use a dummy method; onst PayMakeNow = () => { / s / // initialize payment const paymentLink = FlutterwaveInit({ tx_ref: generateRef(11), authorization: 'FLWPUBK-cae2bf56b3549804aa0d00558a12a186-X', redirecturl: {handleOnRedirect}, amount: price, currency: 'ZMW', customer: { // email: 'mufugi12@gmail.com' name: `Nyumba${phoneNumber}_${location}` }, payment_options: 'mobilemoney' }); // use payment link / usePaymentLink(paymentLink); } catch (error) { // handle payment error console.log(error.message); } / }

To initialise the modal, possibly with FlutterwaveInit.

And you cannot just go with name alone!