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

Allow setting a network timeout value #234

Open
Jenrykster opened this issue Dec 1, 2024 · 6 comments
Open

Allow setting a network timeout value #234

Jenrykster opened this issue Dec 1, 2024 · 6 comments

Comments

@Jenrykster
Copy link

I've noticed that sometimes my app gets stuck on the first "Processing" screen if the network is unstable. Is there any way I can set a fixed timeout so that the user can retry the payment process? Currently, it randomly takes from 20 seconds to 3 minutes for the SDK to return the user to the previous activity.

I could also implement the timeout inside my app but I couldn't find a method that allows me to forcefully cancel the checkout.

@zaid-abdullah
Copy link
Contributor

Hello @Jenrykster
It is a bit difficult to assess the phase of the transaction process as processing "under the hood" could be doing different things depending on where we are in the process.
Would be helpful if you could provide an example video 🙏
Also, it could be that if you can cancel the transaction from the reader at this point, that might already solve your problem as readers are connected via BT.

@Jenrykster
Copy link
Author

It gets stuck on the first screen right after the transaction starts. I was debugging it by turning off the Android device's wifi right before the sumup activity started.
It happens before the reader is connected so the user can't cancel the transaction and return to the previous screen.

I'll try to provide an example video later.

@Jenrykster
Copy link
Author

Sorry for the delay on providing the video. Just to be clear I turned off my internet connection right before clicking on "Cartão" (card payment) to reproduce this issue.

Screen.Recording.2024-12-08.at.10.32.32.mov

This is the current behavior. But the time spent on the "processing" screen varies randomly, and some of my users have been reporting very long times where they can't interact with the app.

@zaid-abdullah
Copy link
Contributor

@Jenrykster thanks for the video 🙏
Can you also please specify from the SDK API which method you are calling behind "Cartão"? (just to be explicit and not to make any assumptions

@Jenrykster
Copy link
Author

Yeah of course, the app from the video is made using react native so the code below is part of a native module.

 SumUpPayment payment = SumUpPayment.builder().total(new BigDecimal(value))
                            .currency(SumUpPayment.Currency.BRL)
                            .title(title).skipSuccessScreen().build();

SumUpAPI.checkout(activity, payment, REQUEST_CODE_PAYMENT);

I guess that the "processing screen" appears right after the call to checkout

@zaid-abdullah
Copy link
Contributor

Thanks for the detailed bug report. We will look into it and return to you if any other input is needed. I appreciate 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants