• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Android IAP Purchase Problem

A

alpha_centauri

Guest
In App Purchases are failing in my game. I can't figure out why. I will not post code at this time (because I think it is irrelevant) I used the tutorial found on the game maker website. The code is very similar with only changes to the name of the id's for the IAP.

My problem is I purchase an item. Shows the dialog from Google Play, confirm purchase, get the "payment successful" dialog from GP. Resumes back to the game (DEBUG SHOWS error that payment failed.

BILLING: Purchase failed => { "productId":"removeads", "response":0, "purchaseIndex":2, "purchaseState":-3 }
)
The item isn't consumed because of failure. My account (test account) is charged though anyways.

Click on the button again for the IAP. Nothing shows. Google Play Dialog doesn't show up. (but consume is attempted) But debug shows the following messages:

Code:
09-03 01:53:03.396 20276 20339 I yoyo    : BILLING: RequestCode=7
09-03 01:53:03.396 20276 20339 I yoyo    : BILLING: Requesting removeads for purchase
09-03 01:53:03.401 20276 22117 I yoyo    : BILLING: Unable to buy item, Error response=7:Item Already Owned
09-03 01:53:03.410 20276 20276 I yoyo    : BILLING: Purchase succeeded => { "productId":"removeads", "response":7, "purchaseIndex":2, "purchaseState":0 }
09-03 01:53:03.413 20276 20339 I yoyo    : purchased is being checked
09-03 01:53:03.413 20276 20339 I yoyo    : Purchased Confirmed Cons Atempt removeads
09-03 01:53:03.413 20276 20339 I yoyo    : BILLING(R): Consume failed, no valid purchase found
09-03 01:53:03.430 20276 20339 I yoyo    : Consumed is attempted.
09-03 01:53:03.430 20276 20339 I yoyo    : Consume Init for removeads
The last two parts are debug messages that show consume is attempted. (in IAP Async)

in the Async for IAP: iap_ev_consumed: the following if statement is returned false even though iap_consume(product_id) is called:

if (ds_map_find_value(iap_data, "consumed"))

I am stumped and do not know what to do. I do have the right app id and everything...I've done all the things to properly setup (at least to my knowledge).

On restart of the app I get the following errors:
billing1.JPG


Here is some more pics of the debug:

(After I get payment succesful from google play)Billing3.JPG


Also I cannot attempt to purchase the iap items until I refund them, restart my device and reinstall my app.

Help please I'm loosing my sanity over this. Will post code if needed but I still think the issue is elsewhere.
 
Top