0

i am using stripe for my payment method in my react-native app, in the "initPayment" i add customFlow with value true, the problem is when i want to cancel and close the modal, googlePay popup even if i closed the payment sheet and not choosing googlePay enter image description here

i tried this but not working :

const handleModalClose = () => {
    toggleHandler();
    if (addnotification) {
      addnotification({
        message: 'Payment sheet closed',
        type: 'info',
      });
    }
  };

 return (
    <DDKModal animationType="slide" isFullscreen requestCloseHandler={() => {
      handleModalClose();
    }}
    >
  • It isn't generally supported to programmatically close the Payment Sheet so this isn't really expected to work. The Payment Sheet should either be closed via a customer action or you can set a timeout for the sheet to "expire" and close via the `presentOptions` for `presentPaymentSheet` (https://stripe.dev/stripe-react-native/api-reference/modules/PaymentSheet.html#PresentOptions) – bismarck Jul 21 '23 at 14:34

0 Answers0