Closed klaseskilson closed 8 years ago
@klaseskilson Big 👏 ! This is really an awesome contribution. I'm happy to merge it soon. Especially as I haven't used the subscriptions yet!
Could you have a look at some of my annotations?
And another question: Do you have an Idea how to test it against the real APIs? I think the subscription verification is still lacking CLI support lib/cli/app.rb
, but I'm more then willing to implement this myself.
I think to test iOS we need to find / generate some receipt data for a subscription.
For Android a valid subscription?
@jnbt Sounds great, I'll take a look at your comments asap. I left out CLI support for now, yes. If you don't mind implementing it yourself, go ahead. 👍
@jnbt Pushed some changes now.
Regarding testing against the real APIs, I'm not sure either. I guess you would need some sort of real data or subscription info and the corresponding authorization keys. That might be semi-tricky to get a hold of, since it might contain sensitive information.
I guess some information could be stored in a CI environment to allow for tests that way, but that will create a tricky situation when it comes to local testing. Also in a CI situation, storing the P12 file securely is kind of tricky and keeping auth keys to Google up to date is a hassle.
The same holds for all PlayStore verifications as they also require a secret. At least I did some local testing on my machine for these cases.
I think I try to setup an iOS and PlayStore test app and configure at least one product and one subscription. We might even use Travis to test it, as we could encrypt these data.
Addition: For obvious reasons we could only test against sandbox... (but this is more than nothing.)
Oh right, Travis supports encryption!
Is this something you want me to look at before merging this PR?
I'll merge it in the current state. Thanks for all the work. Do you have an urgent use case? Otherwise I'd prefer to do the CLI part before publishing a new gem version. This would also allow some manual integration testing. Have you performed any real interactions against the subscription API while developing the extension?
I tottaly agree that a way to test subscriptions manually should be made possible before publishing a new version. I'm fine waiting, I can pull it through git meanwhile.
Awesome work on the gem, thanks for merging! 👌
I'll try to have a look at CLI this or next week.
Awesome, let me know if you need any help regarding subscriptions!
Thanks, I've already invited you to be a collaborator.
Thank you! Looking forward to contributing with subscriptions! 🍻
This adds support for both the App Store's and Play Store's subscriptions. By using the verifiers'
verify_subscription
methods, you can verify subscriptions much like you can verify subscriptions much like you can verify single purchases.Hit me with your feedback! I'd love to hear your thoughts on what I've done. 👍