jnbt / candy_check

Check and verify in-app receipts
MIT License
125 stars 71 forks source link

Add service for acknowledging subscriptions (#48) #58

Open iduuck opened 3 years ago

iduuck commented 3 years ago

Tasks for this PR:

coveralls commented 3 years ago

Coverage Status

Coverage increased (+0.1%) to 98.741% when pulling 9b18f4ab0af74d36c0ec5e13aebc834b1fda9199 on use-pupy:feature/subscription_acknowledgement into ffc2415a6b236ccf3061ca35e47a0f27517f5152 on jnbt:master.

coveralls commented 3 years ago

Coverage Status

Coverage increased (+0.1%) to 98.741% when pulling 9b18f4ab0af74d36c0ec5e13aebc834b1fda9199 on use-pupy:feature/subscription_acknowledgement into ffc2415a6b236ccf3061ca35e47a0f27517f5152 on jnbt:master.

ToTenMilan commented 3 years ago

Thank you @iDuuck and candy_check team for your great work. @jnbt Do you plan to merge this PR anytime soon?

iduuck commented 3 years ago

@ToTenMilan I am currently using this PR myself in a production application/API. You can use the PR instead of the current candy_check gem using the following line(s) in your Gemfile:

gem 'candy_check', git: 'https://github.com/use-pupy/candy_check.git',
                   branch: 'feature/subscription_acknowledgement'

Disclaimer: While I am in no will of spoofing anything, it is a general disclaimer, that you should always be sure, to check the software you are installing on your system/software. So be sure to check the branch out and what was edited and only then install it into your software.

courtsimas commented 3 years ago

@jnbt any chance this is worthy of being pulled in? I would love it in the primary gem instead of using a forked version.

iduuck commented 3 years ago

I hope it will be merged at some point. For now using my branched version in a production-ready application.

courtsimas commented 3 years ago

@iDuuck Since the official candy_check gem already does acknowledgments and you can pass in a subscription id, like

result = acknowledger.acknowledge_product_purchase(
  package_name: "my-package-name",
  product_id: "my-subscription-id",
  token: "my-token"
)

(according to the readme),... then what does this PR provide that's different? I'm naive and currently implementing IAP for iOS, and about to dive into google/android land so I'm just curious.

iduuck commented 3 years ago

@courtsimas So, actually while it might work out (Spoiler: It didn't for me.) for some time, there could be a place in time, where the subscription will not be acknowledged anymore, because Google might cancel the ability to use the product acknowledgement endpoint for the subscriptions.

Looking at the Google Play API's and the Ruby Library this library is using, you are seeing, that there are actually two different methods for acknowledgment (Product ack. & Subscription ack.).

TLDR: This being said, I think, the endpoint (and the methods) might work for you, however, I would not rely my production code on those.

courtsimas commented 3 years ago

Fair enough. Makes sense. Like I mentioned, I haven’t done this yet - just now diggin in and planning my route. This is good to know.

fabn commented 3 years ago

@jnbt this would be a great addition to this gem, could you please take a look at it?

Thanks.

iduuck commented 3 years ago

Very sad to still see this open...

styrken commented 2 years ago

Please merge this in already!

iduuck commented 2 years ago

Hey @christophweegen, would be awesome to get the opinion of @jnbt first, before putting more effort into the PR.

jnbt commented 2 years ago

@iDuuck I agree. Everything looks fine. Just some instructions how to use it, would be really useful.

alhassanreem commented 2 years ago

@iDuuck @jnbt Any update on this merge, it would be really useful to have this on the main gem

mike927 commented 1 year ago

@jnbt Are there any obstacles to merge this PR? I would love to have to as acknowledging subscriptions is crucial part and it's missing now.

iduuck commented 1 year ago

I am not using the library anymore actively, so I am not very eager to write a doc on this one. Would be awesome to get the docs written by someone after digging into the code here.