Running a Stripe payment control with my app is fine when i am running online.
But if i run offline (no internet), i get this error:
Uncaught ReferenceError:
StripeCheckout is not defined. line 133 column 21
Is there any way to still run it offline without showing this error?
Thanks for your reply.
Running online only will be a problem as many of my app users are in remote areas and many run my app in offline mode until they are in a coveraged area.
I don’t want the Stripe control stopping the entire app from running if internet is not available.
If it is not working offline, why do you want to use it offline?
What about this:
In the app you just show a picture of stripe (or a button). When the user chooses it, you check first, if stripe is available as Leader suggested you. If not online you show a message “Sorry, not online”, if online you show a form with stripe functions on it.
I should have been more clear. The message: Uncaught ReferenceError: StripeCheckout is not defined. line 133 column 21
shows when the app first loads.
The first form won’t load.
If i start the app with internet enabled (online), i don’t get the Stripe error.
If i start the app with no internet (offline), then the Stripe error shows and the app won’t load.
So i still need to be able to load the app when there is no internet when the app is first opened.
Just a thought, but could you put the Stripe portion of your app in a different app and only call this when it is needed and after testing to see if you are running online?
If you don’t include the strip control using the AppStudio IDE, then the initialization will not be added by AppStudio. You could use jQuery to add the control on the fly after you determine you are online.