Comments (9)
How did you install the plugin? Manually? using plugman?
from cordova-plugin-purchase.
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.
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.
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.
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.
@Gabana sorry, I've been long to react. Did you solve the issue? Can you share the solution?
from cordova-plugin-purchase.
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.
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.
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)
- Missing proper documentation
- [iOS] I cannot identify the subscription ID
- PurchasePlugin.java uses or overrides a deprecated API (Android Studio)
- "Developer hasn't acknowledged your purchase" HOT 1
- Store.products is empty array after initialize HOT 3
- Store.order() returns undefined if a receipt or transaction has been updated while the purchase dialog is opened, thus never calling cancel or error
- Initiating the purchase flow intercepts onActivityResult calls from Capacitor plugins
- Problem with fovea validator HOT 1
- Manage different and multiple "paid subscription" products
- Tutorial to update from 13.6.0 to a newer version? (IOS error) HOT 1
- This product is not available HOT 1
- [IOS] [TestFlight] Buy/Restore problem with 2 devices HOT 3
- [GOOGLE PLAY] Billing API update my code doesn't work. HOT 2
- is it possible to request a refund from purchaseId? HOT 1
- Getting errors from CDVPurchase.Utils.safeCall HOT 1
- [Android] store.localTransactions doesn't return consumed consumable transactions HOT 1
- Problem running on Android with Capacitor 6.0.0 (startServiceConnection in class PurchasePlugin, deprecated API) HOT 1
- Why does it work on Android but not on iOS? And what's the deal with being asked to purchase again when it's supposed to be a consumable purchase? Android is fine HOT 3
- Google Play Billing Library 4.0.0 is depreciated HOT 1
- Products owned status changes on IOS Ionic Capacitor Live reload HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-purchase.