Trying to implementing some consumables using the Google Play IAP V3 Corona plugin and I’m seeing some inconsistencies between the Corona docs and what Google’s IAP docs suggest.
Google’s docs say:
http://developer.android.com/google/play/billing/api.html#consume
To retrieve the list of product’s owned by the user, your application sends agetPurchases call to Google Play. Your application can make a consumption request by sending a consumePurchasecall. In the request argument, you must specify the in-app product’s uniquepurchaseToken String that you obtained from Google Play when it was purchased. Google Play returns a status code indicating if the consumption was recorded successfully.
But the syntax found in Corona’s docs say:
http://docs.coronalabs.com/plugin/google-iap-v3/consumePurchase.html
store.consumePurchase( productSku, listener )
Which seems like it might be a cut and paste error from the store.purchase docs. The example code on the same page instead shows this:
store.consumePurchase( {“manangedItem1”, “managedItem2”} )
Which seems to indicate I should pass in a table of product skus. But according to the Google docs above I should really be sending the “unique purchaseToken string that you obtained from Google Play when it was purchased.”
So, are the Corona docs wrong? If not, how is Google Play getting the unique purchaseToken if I only send them a productSKU? If the docs are wrong does that mean the API is broken? IAP has been a bear to implement and test so I don’t want to go too far down this road if it simply doesn’t work. If anyone has successfully implemented consumables using the V3 plugin I’d love to know any helpful tips. Or I’m happy to file a bug if this is indeed broken.
-Stephen