-
Notifications
You must be signed in to change notification settings - Fork 65
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
Terminal.shared.disconnectReader doesn't work when app is about to go in the background or terminate #330
Comments
@harsh7703 some questions to help us:
|
@bric-stripe - Hi |
@bric-stripe - any update on this it would be fruitful for us to communicate with our clients using this device type? |
@bric-stripe -I have updated the SDK to version 4.0.0, but I am still encountering the same issue. Below is the error code that might help identify the root cause. This issue is blocking the release of the new app version, so I would appreciate your assistance in resolving it as soon as possible. collectPaymentMethod failed: Error Domain=com.stripe-terminal Code=2020 "The command was canceled." UserInfo={NSLocalizedDescription=The command was canceled., com.stripe-terminal:Message=The command was canceled.} |
Hi, I'm investigating the disconnect issue as reported but can you clarify when you're seeing a collectPaymentMethod cancel error? Is it related to the original issue? Canceled collectPaymentMethod is expected if cancel is requested on the cancelable or the user cancels on the reader. Could you provide a serial number for a reader where you're hitting this? And for the collectPaymentMethod issue can you provide a PaymentIntent ID so I can try to find some additional logging/timing to help me investigate / understand the problem. |
I've been unable to reproduce any issues disconnecting when going in to the background. Can you reproduce this with our repo's Example app? I added this simple diff to try to repro: this is added at the end of AppDelegate.swift
when an sPOS reader is connected I've only seen successful disconnects. Only error I've seen is when backgrounding and no reader is connected, but that's expected. |
Summary
I want to disconnect the reader when the app is supposed to go in the background state or let's say it is about to terminate. This same code works when the app is foreground but does not work when the app is about to switch its state.Code to reproduce
iOS version
18.0.1Installation method
CocoapodsSDK version
3.9.1Other information
The text was updated successfully, but these errors were encountered: