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
Something like this fixes the issue. This code is from plans-stripe-client.js
Meteor.startup(function(){letinitStripeService=()=>{// If Stripe public key is configured in the Meteor settings JSON fileif(Meteor.settings&&Meteor.settings.public.Stripe&&Meteor.settings.public.Stripe.publicKey){// Configure Stripe Checkout// StripeCheckout is an object that is defined in the mrgalaxy:stripe package.// It simply exposes Stripe's checkout API documented here:// https://stripe.com/docs/checkoutstripeCheckout=StripeCheckout.configure({key: Meteor.settings.public.Stripe.publicKey,// whether to put the 'remember me' checkbox on stripe formallowRememberMe: Meteor.settings.public.Stripe.rememberMe||false,token: function(token){// Call the server-side function 'AppPlans/add' to create// a customer through the Stripe API, based on the token that resulted from// the payment form success.varoptions=_.extend(checkoutAddOptions||{},{service: 'stripe',token: token.id,email: token.email});AppPlans.add(checkoutPlanName,options,function(error,result){result=result&&{added: result,email: token.email};addPlanCallback(error,result);});}});}// END if}// END initStripeService functionhasRan=falseTracker.autorun((c)=>{if(Meteor.status().connected){if(!hasRan){hasRan=true;c.stop();initStripeService()}}returnMeteor.status().connected;});});// END Meteor.startup
I have an app that uses this package but my app is also supposed to work offline.
With this package added, if you try to load your app offline, this package will prevent your app from loading.
Can we please fix this so if
Meteor.status().connected
is true then only will the package try and communicate with stripe servers?The text was updated successfully, but these errors were encountered: