You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm encountering an issue with the Stripe Terminal React Native SDK on iOS for offline payments on the Wisepad 3.
Offline payments work awesome when initializing the SDK when the device is online.
When starting the app without an internet connection I get the following error:
ERROR Couldn't fetch connection token. Please check your tokenProvider method
The hook also keeps returningisInitialized to false. I'm experiencing this behavior in dev mode.
On production builds it seems to get initialized as you would expect. (Maybe some HTTP caching?)
Here's what I need to know:
Should I be caching the last successful requested token for offline use in my fetchTokenProvider function like this pseudo code, or should the stripe SDK handle this internally?
I guess by trail and error we figured it out. It seems that stripe SDK always prefers to do caching itself (because otherwise ill get an error that the token was already used). But it could be a bit better described in the docs that its ok for fetchTokenProvider to fail on prod.
Is it correct that the location of the terminal needs to be in proximity for this caching mechanism to work?
Hey Stripe Team,
I'm encountering an issue with the Stripe Terminal React Native SDK on iOS for offline payments on the Wisepad 3.
Offline payments work awesome when initializing the SDK when the device is online.
When starting the app without an internet connection I get the following error:
The hook also keeps returning
isInitialized
tofalse
. I'm experiencing this behavior in dev mode.On production builds it seems to get initialized as you would expect. (Maybe some HTTP caching?)
Here's what I need to know:
Should I be caching the last successful requested token for offline use in my fetchTokenProvider function like this pseudo code, or should the stripe SDK handle this internally?
Some documentation about this would also be helpful I think.
Thanks in advance!
The text was updated successfully, but these errors were encountered: