Version 17
* corrected declaration of emptyInventoryOfNonConsumableItems function so it calls correctly
Version 17
* corrected declaration of emptyInventoryOfNonConsumableItems function so it calls correctly
Hi everyone.
Have just updated the IAP Badger library based on some user feedback:
Version 18:
These changes are live on github and on the plugin version of the code.
Simon
Hi Simon,
Thanks for continuing to work on IAP Badger!
I’m cross posting this issue I’m having from the Slack General channel, in case you can help:
I’m looking into identifying refunded / revoked orders in Google Play, at app startup, using IAP badger. I am probably doing it wrong, but I was expecting that when an order has been refunded, the next time I restore purchases I would get the onRefund callback. This doesn’t seem to be the case.
In the Play order management console, the order has a state of “Refunded”, but in the verbose logging it is market as state “purchased”
12:16:33.853 : IAP Badger: restore 12:16:33.853 : Requesting restore... 12:16:33.853 : Timeout function specified, placing on timer... 12:16:33.854 : IAP Badger: leaving restore 12:16:33.878 : IAP Badger: storeTransactionCallback 12:16:33.878 : event contains raw data: 12:16:33.878 : table: 0x757c7d08c0 { 12:16:33.878 : [name] =\> "storeTransaction" 12:16:33.878 : [transaction] =\> table: 0x757c7d08c0 { 12:16:33.878 : [identifier] =\> "GPA.3321-2721-1438-62030" 12:16:33.878 : [packageName] =\> "se.appfamily.puzzle.super2.free" 12:16:33.878 : [receipt] =\> "{"orderId":"GPA.3321-2721-1438-62030","packageName":"se.appfamily.puzzle.super2.free","productId":"fullgame","purchaseTime":1566553570093,"purchaseState":0,"purchaseToken":"capmijjmeemfbjgjldem nkgn.AO-J1Ox7HZPQ4i9it6cqawzrK0BHaEKgaRwXD9KYs6rMGFDFX40JLMNdoEbcIih\_MTTVmpiiSHA9IGqCzI0t2K4F6Eqru9-byko4ggpXWNIvdECi\_hdhXPgye3sPMydn-zm52JYMzUrI"}" 12:16:33.878 : [state] =\> "purchased" 12:16:33.878 : [originalJson] =\> "{"orderId":"GPA.3321-2721-1438-62030","packageName":"se.appfamily.puzzle.super2.free","productId":"fullgame","purchaseTime":1566553570093,"purchaseState":0,"purchaseToken":"capmijjmeemfbjg jldemnkgn.AO-J1Ox7HZPQ4i9it6cqawzrK0BHaEKgaRwXD9KYs6rMGFDFX40JLMNdoEbcIih\_MTTVmpiiSHA9IGqCzI0t2K4F6Eqru9-byko4ggpXWNIvdECi\_hdhXPgye3sPMydn-zm52JYMzUrI"}" 12:16:33.878 : [token] =\> "capmijjmeemfbjgjldemnkgn.AO-J1Ox7HZPQ4i9it6cqawzrK0BHaEKgaRwXD9KYs6rMGFDFX40JLMNdoEbcIih\_MTTVmpiiSHA9IGqCzI0t2K4F6Eqru9-byko4ggpXWNIvdECi\_hdhXPgye3sPMydn-zm52JYMzUrI" 12:16:33.878 : [productIdentifier] =\> "fullgame" 12:16:33.878 : [signature] =\> "pP3oRArNaftTPEeSO2FmPbqYlrPg2ynlXsPxc91bvlJRPq05wYJHZ/O4Gd/y/v3i1dWjM8TLHU5P5nbJxYqwc16ZtZI0Y4KfiN8Y5WsbfKBNOe7yLV3qLcQBySF8OjF8+ns8gE+0LRp/g6lgax0EbCu9c16Ruqkgul/D8sSxu02cXWqnx4BmDyLI7WqSeAP c7oV1gdratrKcktg8/555la6Ob3c8jGUZvpLviwS6Ka+N/KC0AMEEtbaqdpQTrxsqgaEntVAW29EdZ+QAW4+u3QWGd4h+4VXNE6jc82ihHBryoP7vl73KZ/dQ1t1XXKR3Vtb5XblCfm0iqZhhT09x3w==" 12:16:33.878 : [type] =\> "inapp" 12:16:33.878 : [date] =\> 1566553570093
When refunding the order in the Play Console, there is a check-box for “Revoke”. I don’t recall if I checked that or not - do you know if that is what is causing this?
Cheers,
Per
Hi,
Could you try the following - when you do your restore, tell IAP Badger to remove the user’s access to all previously purchased non-consumable items. (Bear with me.)
You do it like this:
iap.restore( true , your list of listeners…)
This won’t be a problem, because…
BTW - if my understanding is correct, your app should also receive a ‘refunded’ event when the user requests a refund, but I can’t remember if this works in practice.
The internet also suggests that, if a user initiates a refund, the IAP can get stuck in the ‘purchased’ state for quite some time (72 hours even) due to cacheing issues.
Simon
PS - when you set this flag to true, it won’t affect consumable purchases.
Hi Simon,
Thank you for your response. I have a very simplistic setup with a single ‘remove ads’ IAP, combined with local state management, so no issues with testing that flag.
It does seem that it could be related to the caching that you mentioned. When I re-opened the affected app today, it was locked again. So at some indeterminate time after the refund & revoke, the purchase is no longer returned, and hence I can remove it (when my local state shows it as purchased but it is no longer returned when restoring purchases).
To speed up the testing, I found that you can clear the local cache for Play Store billing via adb: adb shell pm clear com.android.vending
After clearing the cache with that command, the purchase was no longer available when restoring. So, case closed as long as Google accepts my explanation.
Thanks again,
Per
Hmm. The purchase was not available on the first launch after clearing the cache. BUT After exiting and re-launching the app it still got back the purchase.
I’ll have to wait and re-try launching tomorrow or something, to see if it gets the right response back.
Hello
We are facing a validation issue for auto-renewing subscriptions.
This problem was described in the next topic - https://forums.coronalabs.com/topic/76298-iap-not-working-correctly-with-corona-20193528-and-ios-13/
We get a check like this
{length = 3833, bytes = 0x7b0a0922 7369676e 61747572 6522203d … 3d202230 223b0a7d }
Would be perfect to fix this problem in your plugin as well.
Best regards
Hi,
Thanks for raising my attention to this - I’ll take a look at it.
The solution appears to be to use a different IAP plug-in than the standard store that ships with Corona, but it does have ‘experimental - use with caution’ written all over it in the marketplace (which makes me slightly nervous).
So that’ll involve some testing at my end (I don’t want to break everyone’s IAPs…). This may take a little while as I’m snowed under with work at the moment.
If you need a faster fix, you can:
And see what happens - if the threads are to be believed, this should fix it.
But as I said, the plug-in has ‘experimental’ warnings written all over it…
Simon
Well the plugin is marked as “experimental” because we really don’t have a good way to test it. It should work just fine. But there could be bugs with it and we would love to have reports on them so we can remove the experimental label.
Rob
Okay, thanks Rob - that should make things a lot easier at my end
Simon
Hi Simon! How will things work with IAP Badger after Corona turns of the build servers? I’m currently using it via a build.settings plugin, but there was some info in Slack where Vlad explained that 3rd party plugins won’t be integrated in the new build system:
Third party plugins would need their own ‘stores’ for managing them.
In your case, would it be better to include the source from GitHub?
Cheers,
Per
Hi Per,
I won’t be running my own store for managing the plug-in - so my advice is to switch to the source from GitHub.
All you need to do is to take a copy of the source and include it in your lua project folder and ‘require’ it.
On Mac, if you have multiple projects that use IAP Badger, the following work flow saves a lot of time:
So your directory structure would look like this:
Libraries (directory) --iap\_badger.lua (the real source for iap\_badger.lua) Project 1 (directory) --main.lua --iap\_badger.lua (symbolic link to 'iap\_badger.lua' in Libraries directory) Project 2 (directory) --main.lua --iap\_badger.lua (symbolic link to 'iap\_badger.lua' in Libraries directory) Project 3 (directory) --main.lua --iap\_badger.lua (symbolic link to 'iap\_badger.lua' in Libraries directory)
Now when the iap_badger.lua file is updated in the Libraries directory, Project 1, 2 and 3 will all automatically update as well. So you don’t have to manually go into each project and change the source when there’s a change.
Don’t know if it works on Windows though (because I’m not sure whether Corona follows shortcuts).
Hope that makes sense!
Simon
PS. For those of you who haven’t come across symbolic links, there’s a description here.
Just to let you know, despite what I said in the above post, I’ve moved IAP Badger across into the Solar2D plugin store. The code is still free - you can find the plugin at:
https://www.solar2dplugins.com/plugins/iap-badger
Also, I’ve started updating the documentation, which is still available at:
If you have any problems, let me know
Simon
Hi everyone,
I’ve been thinking about the future of this plug-in for a while now.
I’m not currently writing apps (and haven’t really been in this space for some years now - I’ve been more focussed on web development projects).
That means it has been increasingly difficult to maintain the plug-in and give it the time and attention it deserves. Plus, my knowledge of engine updates, App Store changes, API changes etc. has become more and more out of date.
So - with some sadness - I’m afraid I’m going to have to discontinue support at my end.
I’ll leave the plug-in up (and the source code available on Github), and keep the documentation pages available on my website. (In time, I’ll find somewhere more permanent to store the docs - probably on the Github page.)
If anyone would like to take over support and development of IAP Badger, I’m more than happy to pass over the baton and share you any inside knowledge / files / practical information that may make this possible.
I’d just like to say thank you to everyone in the community who has helped me in the past - and I hope you found IAP Badger useful in your own projects.
Kind regards,
Simon
Just a quick note - the domain I used for hosting the IAP Badger docs is now no longer active, so I’ve moved the pages to the github repo page for IAP Badger: