Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always receiving product.state = store.INVALID #75

Closed
PadreMontoya opened this issue Nov 11, 2014 · 6 comments
Closed

Always receiving product.state = store.INVALID #75

PadreMontoya opened this issue Nov 11, 2014 · 6 comments

Comments

@PadreMontoya
Copy link

I'm attempting to implement your excellent-looking plugin for Cordova 3.5.0 and I'm getting an "Invalid" error when I try to retrieve the product info.

I don't know what I'm doing wrong, but here is what I have done:

  • The plug-in is installed with the proper billing API key in platforms\android\res\values\billing_key.xml
  • The store.ready() event does fire without errors, so I know I'm at least connecting.
  • I've uploaded a signed APK to Beta and published it.
  • I created an in-app purchase and confirmed it is active.
  • I confirmed I'm calling the right product ID within the code by hard-coding the ID.
  • I get callbacks from store.when("product").updated(fnProcessProduct), but the product.state is always store.INVALID

Is there something I'm missing, either within Google Play, PhoneGap, deploying, or the plug-in?

@j3k0
Copy link
Owner

j3k0 commented Nov 11, 2014

Hello @PadreMontoya,

  • Are you testing on an actual device?
  • Did you sign the test APK with the same key?

Can you activate more logs by doing store.verbosity = store.DEBUG and send the output of adb locat?

@PadreMontoya
Copy link
Author

I am testing on an actual device. (Galaxy S3) I'm not as sure on the second one, however.

So far I'm only testing on a debug version of my app, not the signed version I uploaded to Google Play as Beta.

It sounds like I either need to sign my debug version with the same key as my beta app, or test using my beta app?

@j3k0
Copy link
Owner

j3k0 commented Nov 11, 2014

Yes. To test locally, you have to install the same same release signed app. If you use the debug build, you can do some actions, however you will not be able to buy the product.

Also, did you activate the purchase on google's developer console? that's required.

@PadreMontoya
Copy link
Author

Yes, the IAP is in the "Active" state.

I'll try downloading the actual beta build and give that a try. That
sounds like it's the issue.

Thanks!

On Tue, Nov 11, 2014 at 12:57 PM, Jean-Christophe Hoelt <
notifications@github.com> wrote:

Yes. To test locally, you have to install the same same release signed
app. If you use the debug build, you can do some actions, however you will
not be able to buy the product.

Also, did you activate the purchase on google's developer console? that's
required.


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

@PadreMontoya
Copy link
Author

Confirmed - once I ran the version signed with the same key I used to upload my beta, it worked fine. Thanks!

@j3k0
Copy link
Owner

j3k0 commented Nov 12, 2014

Your'e welcome! Good luck with the rest.

@j3k0 j3k0 closed this as completed Nov 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants