-
Notifications
You must be signed in to change notification settings - Fork 62
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
Can't check the connection status of SCPTerminal unless it's already initialized #26
Comments
Hi @jacobrharris , We'll try to make the docs here clearer! In your app, you can either:
Hope that helps! Ben |
That does help. Thanks! |
@bg-stripe |
Hi @jacobrharris ! You can't change the To switch accounts, you'll need to re-configure the same Hope that clears things up! We'll think about how to make the interface and documentation here clearer. Best, |
Another note (from the docs) You should call
|
@bg-stripe I'm having the same problem. My "StripeAPIClient" requires authentication to access my backend, which occurs after successfully logging in. I also do a check on launch of my application to see if the user is authenticated or not. Authentication is cached. If they aren't, it returns unauthorized. If they are, it returns authorized. As you can imagine, sometimes on launch they'll be unauthorized so the order of operation can get really screwed up without the ability to check if the Terminal.shared is set or not, so that I can properly clear it if it is. |
@bg-stripe any update here? |
@troypayne – it sounds like you should:
Hope that helps! Note that for integration questions like this one, you can always email |
@bg-stripe this results in a Locations prompt immediately on launch of my app, which is a poor experience. Can this be more contextual and prompt only at the very point it is needed (as suggested by Apple), certainly after there's confirmation of a valid token |
That's good feedback! We'll think about changing the request location prompt to be more contextual (e.g. when you take your first payment) in the next SDK release. |
@bg-stripe
I discovered that the problem was that my code wasn't passing a valid error object to the completion block in the fetch-connection method. |
This would be fantastic. The prompt itself is our biggest issue as well, and we would love to see that reconsidered. Thanks! Update: Just saw that rc1 does this. Fantastic! Thanks, guys. |
Hey folks! If you've had trouble checking whether a ConnectionToken provider has been set, you can now use the |
Our app crashes and gives this error:
We're not trying to switch accounts. We want to re-use the existing
SCPTerminal
connection. The problem is that we have no way of knowing ifSCPTerminal
is already initialized. If we knew that it was already initialized, we wouldn't pass it the token provider.This is how we start Terminal:
If I call
[self startStripeTerminal]
again, the app crashes with the above message. But I have to call it again because there's no way to check ifSCPTerminal
is already initialized without usingSCPTerminal.shared
, and if it's not initialized, accessing that property causes a crash.Does that make sense? Am I caught in a chicken-and-the-egg cycle?
The text was updated successfully, but these errors were encountered: