#ismailelric

1 messages · Page 1 of 1 (latest)

compact heathBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

steel lion
rocky basin
#

Hello! I'm taking over and catching up...

compact heathBOT
rocky basin
#

This seems like a React state problem, and unfortunately I'm not a React developer. I think what you would need to do is keep the test vs. live logic inside the fetchStripeTerminalToken function and determine which token to fetch based on something like global state or a global variable or something.

steel lion
#

That's exactly what I am doing. But I need a way around the stored callback value

rocky basin
#

Wait, I'm not sure I follow. Let me re-read.

#

Could you create a <StripeTerminalProviderTest> and <StripeTerminalProviderLive> and swap between those instead?

#

I think the core issue is that the Stripe Terminal Provider decides internally when to call the token provider to get a new token. There's no way to force it to switch to a different one.

#

That's why I think you need different Providers entirely rather than trying to switch between tokens inside a single one.