javascript - Getting an error when trying to use react-native-billing library for making test purchase -


i want test buying using react-native-billing library. way:

 buy() {     const inappbilling = require("react-native-billing");     inappbilling.open()       .then(() => inappbilling.purchase('android.test.purchased'))       .then((details) => {         console.log("you purchased: ", details)         return inappbilling.close()       })       .catch((err) => {         console.log(err);       });   } 

and error this: "undefined not object (evaluating 'inappbillingbridge.open')"

in library there code this:

"use strict";  const inappbillingbridge = require("react-native").nativemodules.inappbillingbridge;  class inappbilling {     static open() {       return inappbillingbridge.open();  // error here     } } 

i.e. inappbillingbridge undefined don't understand why. did face problem?


Comments

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -