Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Payment Sheet shows infinite loader #4386

Open
initishbhatt opened this issue Dec 19, 2024 · 2 comments
Open

[BUG] Payment Sheet shows infinite loader #4386

initishbhatt opened this issue Dec 19, 2024 · 2 comments
Labels
kind:bug triaged Issue has been reviewed by Stripe and is being tracked internally

Comments

@initishbhatt
Copy link

initishbhatt commented Dec 19, 2024

Summary

I am upgrading from the legacy payment sheet to the new payment sheet. Below are the steps I followed:

  1. Create a SetupIntent for a customer
  2. Initialize the PaymentSheet with the SetupIntent clientSecret
  3. Present the PaymentSheet

The payment sheet is displayed but gets stuck with an infinite loader.

Code to reproduce

 func showCreditCardForm(completion: @escaping (Bool) -> Void) {
        initialize(provider: .stripe) { clientSecret in
            var configuration = PaymentSheet.Configuration()
            let paymentSheet = PaymentSheet(setupIntentClientSecret: clientSecret, configuration: configuration)
            self.presentPaymentSheet(paymentSheet: paymentSheet, completion: completion)
        }
    }
        
    private func presentPaymentSheet(paymentSheet: PaymentSheet, completion: @escaping (Bool) -> Void) {
          paymentSheet.present(from: currentViewController) { paymentResult in
              switch paymentResult {
              case .completed:
                  completion(true)
              case .canceled:
                  completion(false)
              case .failed(let error):
                  Log("Payment failed: \(error.localizedDescription)")
                  completion(false)
              }
          }
      }

iOS version

18.1

Installation method

cocoapods

SDK version

23.28.1

Other information

Screenshot 2024-12-19 at 2 07 39 PM
@Razaghallu786

This comment was marked as spam.

@amk-stripe
Copy link

Hi, thank you for raising this issue! Could you please help us investigate this further? It would be helpful to know:

  • Do you still see this issue if you upgrade to the latest stripe-ios version (24.2.0)?
  • Can you confirm the loader is shown for more than 1 minute? We have a default network timeout of 60s and want to confirm that the loader is shown for longer than that.
  • Can you provide a minimal example that reproduces the issue? If you had an example app we could look at that reproduces this that would be super helpful!

Thank you!

@yuki-stripe yuki-stripe added the triaged Issue has been reviewed by Stripe and is being tracked internally label Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug triaged Issue has been reviewed by Stripe and is being tracked internally
Projects
None yet
Development

No branches or pull requests

4 participants