stripe-react-native icon indicating copy to clipboard operation
stripe-react-native copied to clipboard

The payment sheet does not close when timeout if user lock and unlock the mobile devices

Open hongduclam opened this issue 1 year ago • 1 comments

Describe the bug I have added a timeout value for presentPaymentSheet({ timeout: 900s });. When a user opens the payment sheet, locks the screen, and waits for a period exceeding the timeout value, then unlocks the screen, the payment sheet is still available, and the user can proceed with the payment. This behavior violates our business rule. The timeout works correctly when the app is running in the background, but I'm unsure why there's a difference in behavior when the screen is locked. Im using "@stripe/stripe-react-native": "0.37.2" To Reproduce Steps to reproduce the behavior:

  1. Set timeout for presentPaymentSheet({ timeout: 900s });
  2. Open payment sheet
  3. Lock the screen
  4. Waiting for after timeout
  5. Unlock the screen
  6. The payment sheet still not closed

Expected behavior The payment sheet should be closed after timeout when use lock the screen

Smartphone (please complete the following information):

  • Device: Iphone, Android
  • OS: IOS, Android

hongduclam avatar Aug 14 '24 17:08 hongduclam