Installing Cordova Plugin on Meteor

I am trying to install this cordova package in my meteor package:

so i run this command from the CLI

meteor add cordova:cc.fovea.cordova.purchase@

The installation works, but everytime i try to refrence this package from the code i get a Uncaught ReferenceError: store is not defined

Here is the code i am using:

[Client side Code]

Meteor.startup(function () {
   id:    "10stars",
   alias: "10 Stars",
   type:  store.CONSUMABLE

Am i running the installation correctly, or am i missing a step?

Are you testing that on a mobile device? Cordova plugins are loaded only on mobile. To make the code work in both places, you have to add a conditional:

Meteor.startup(function () {
  if (Meteor.isCordova) {

This was the problem all along, how could i be so stupid thank you so much :slight_smile: