Coder Social home page Coder Social logo

Comments (9)

j3k0 avatar j3k0 commented on July 24, 2024

How did you install the plugin? Manually? using plugman?

from cordova-plugin-purchase.

Eternalspirit avatar Eternalspirit commented on July 24, 2024

We installed it manually. I have no doubt that we did something wrong, but we double checked everything and, according to the documentation, it should be functioning correctly with what we've done.

If it makes it easier to help out, I can provide my Skype here if you're willing to talk in a more real-time setting.

UPDATE: I added a window.onerror function into the InAppPurchase.js file, and it came back with "ReferenceError: Can't find variable: module"

I'm assuming this is likely our problem, but I have no idea how to resolve this at this time.

EDIT: So, I believe I have tracked down the issue. I looked at the working sample project, and in the InAppPurchase.js file, there was the following line at the top of the script:

cordova.define("com.phonegap.plugins.inapppurchase.InAppPurchase", function(require, exports, module) {/**

This was MISSING from the IAP.js provided by the repository of your plugin version. Once I included that line (and closed the function correctly at the bottom of the file), alert(window.storekit) is returning "object Object", which is correct (I think).

I have yet to continue testing the plugin to see if this actually works, and I would like to get confirmation from you that this indeed should be in that file, so I will not close this just yet.

from cordova-plugin-purchase.

j3k0 avatar j3k0 commented on July 24, 2024

This line:

cordova.define("com.phonegap.plugins.inapppurchase.InAppPurchase", function(require, exports, module) {

is added by cordova's plugin manager. This is new, I think from cordova 3.0, and maybe necessary to now add manually if you opted for the manual way of adding the plugin (to be confirmed).

Anyway, if you have access to the plugins' object, you can use it safely. I will document the issue. Can I ask which version of PhoneGap or Cordova you are using?

from cordova-plugin-purchase.

Eternalspirit avatar Eternalspirit commented on July 24, 2024

We're using Cordova 2.9.

After we added that line, the window.storekit object was being initialized correctly and IAP, thus far, has worked (for the most part anyways.. we're having very serious issues with trying to verify receipts using our server).

If you say it's fine to use it, then this issue can probably be closed. We're going to try again with the receipt validation on Monday, may post again about that if we can't figure it out.

Many thanks!

from cordova-plugin-purchase.

Gabana avatar Gabana commented on July 24, 2024

Hi,

I am having exactly the same problem but i was not able to fix it adding the line Eternalspirit suggested:
cordova.define("com.phonegap.plugins.inapppurchase.InAppPurchase", function(require, exports, module) {

I am using XCode 5 and Cordova 2.9 too... although i'm using iOS 6.1

Any help will be reaaaally appreaciated!!!!
Thanks!

from cordova-plugin-purchase.

j3k0 avatar j3k0 commented on July 24, 2024

@Gabana sorry, I've been long to react. Did you solve the issue? Can you share the solution?

from cordova-plugin-purchase.

blaster151 avatar blaster151 commented on July 24, 2024

The documentation even in this thread seems a little ambiguous.

This line does not indicate where the closing brace should go:

cordova.define("com.phonegap.plugins.inapppurchase.InAppPurchase", function(require, exports, module) {

Should we assume that the closing brace belongs at the end of the file? Or does it belong elsewhere?

from cordova-plugin-purchase.

j3k0 avatar j3k0 commented on July 24, 2024

It belongs at the end of the file. But anyway, if you're using a recent
version of phonegap, manual install shouldn't be necessary and you should
use the automatic install documented in the README.

Cofounder and Mobile Apps Developer at Fovea
http://fovea.cc

Email: [email protected]

On Fri, Jun 27, 2014 at 9:37 PM, blaster151 [email protected]
wrote:

The documentation even in this thread seems a little ambiguous.

This line does not indicate where the closing brace should go:

cordova.define("com.phonegap.plugins.inapppurchase.InAppPurchase",
function(require, exports, module) {

Should we assume that the closing brace belongs at the end of the file? Or
does it belong elsewhere?


Reply to this email directly or view it on GitHub
#9 (comment)
.

from cordova-plugin-purchase.

blaster151 avatar blaster151 commented on July 24, 2024

Thanks for the response! I'm using Telerik AppBuilder, which sits on top of PhoneGap but seems to control access to it somewhat.  For example, instead of installing plug-ins at a command line, I have to use to Telerik's own "import custom plug-in" function, which tries to shield the developer somewhat.

I still haven't mastered the art of translating the details of plug-in README files into the correct equivalents for configuring under AppBuilder.  So for some reason, even though I think it's using the latest version of PhoneGap, I'm getting this error message that guided me to this discussion thread.

Jeff


Sent from Mailbox

On Fri, Jun 27, 2014 at 9:11 PM, Jean-Christophe Hoelt
[email protected] wrote:

It belongs at the end of the file. But anyway, if you're using a recent
version of phonegap, manual install shouldn't be necessary and you should
use the automatic install documented in the README.
Cofounder and Mobile Apps Developer at Fovea
http://fovea.cc
Email: [email protected]
On Fri, Jun 27, 2014 at 9:37 PM, blaster151 [email protected]
wrote:

The documentation even in this thread seems a little ambiguous.

This line does not indicate where the closing brace should go:

cordova.define("com.phonegap.plugins.inapppurchase.InAppPurchase",
function(require, exports, module) {

Should we assume that the closing brace belongs at the end of the file? Or
does it belong elsewhere?


Reply to this email directly or view it on GitHub
#9 (comment)
.


Reply to this email directly or view it on GitHub:
#9 (comment)

from cordova-plugin-purchase.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.