Flutterwave / React-Native

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

Modal not working after some time. Same code was working before #73

Closed Ademola101 closed 5 months ago

Ademola101 commented 5 months ago

I'm puzzled as to why the modal isn't triggering after the button is clicked. This exact code was working just fine a few days ago, and I'm unsure what's changed

const options = {
    tx_ref: generateTransactionRef(10),
    authorization: "*******************8",
    customer: {
      email: user?.email || "",
      phonenumber: user?.phoneNumber || "",
      name: user?.displayName || "",
    },
    amount: totalAmount,
    currency: "NGN",
    payment_options: "card",
    customizations: {
      title: "Payment for items in cart",
      description: "Payment for items in cart",
    },
    redirect_url: "https://your-redirect-url.com/",
  };
<PayWithFlutterwave
        onRedirect={onRedirect}
        options={options}
        onAbort={() => {
          navigation.navigate("PaymentFailure");
        }}
        customButton={(props) => (
          <Flex direction="column" padding="md" paddingTop="lg">
            <Button
              onPress={() => {
                props.onPress();
              }}
              title="Pay Now"
              // @ts-ignore
              isLoading={props.isInitializing}
              width="100%"
            />
          </Flex>
        )}
      />