tyler-johnson / stripe-meteor

A Meteor package containing Stripe.js, Node-Stripe, and Stripe Checkout.

Home Page:https://atmospherejs.com/mrgalaxy/stripe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uncaught ReferenceError: Stripe is not defined

micahalcorn opened this issue · comments

This error is getting thrown in my client code according to Kadira. I can't reproduce it from a desktop browser and it only seems to happen on Android. The culprit is my Stripe.publishableKey = function... inside of Meteor.startup. Are you aware of any issues with Meteor not properly waiting for the package to be loaded before running the startup function?

Same issue here. "Uncaught ReferenceError: Stripe is not defined" occurring on Android devices.

The Stripe package works fine on web browser locally and remotely deployed. The error only appears to occur on Android device deployment.

Stripe.setPublishableKey is being called in Meteor.startup on Client.

This issue appears to be caused by new Cordova security rulesets.
The fix is to add the following line in mobile-config.js in the root of your meteor project.

App.accessRule("https://.stripe.com/")

Hi, I've merged that updated documentation. Thanks!