-
Notifications
You must be signed in to change notification settings - Fork 288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Android] Support Real-time Developer Notifications #141
Comments
Thank you for the detailed suggestion. Let me sit on this a little bit to consider if considering this further makes sense for the package! Cheers! |
Thanks @voltrue2. To simplify things we can leave
Change it to something like this to ensure that signature or api credentials are supplied:
That would be quite an easy change and wouldn't break anything. |
@voltrue2 any news on this? |
Hello, My apologizes for taking this long. I have been side tracked by other projects. I will get back on this issue as soon as I can. Cheers! |
@voltrue2 no problem at all! |
Closing as the latest version resolves this issue by using googoleServiceAccount in configuration. |
We can use
in-app-purchase
to validate Apple's subscription event notifications because Apple provides the receipt data. Google doesn't 😊https://developer.android.com/google/play/billing/realtime_developer_notifications.html
Google sends us this:
We can use this to recreate Google's receipt data and pass it to
in-app-purchase
. You only needpackageName
,productId
andpurchaseToken
for validating using Google API:However using this receipt data won't work because of the checks
in-app-purchase
does.Using this will pass checks and will validate:
However it's probably not a good idea to do that in production.
Changes required:
getService()
method. Need better way to differentiate between Google and Amazonhttps://github.com/voltrue2/in-app-purchase/blob/develop/index.js#L75-L79
https://github.com/voltrue2/in-app-purchase/blob/develop/index.js#L95-L99
https://github.com/voltrue2/in-app-purchase/blob/develop/lib/google.js#L147
isSubscription()
method. Not sure about this one because there is no way to determine if it is a subscription or not given onlypackageName
,productId
andpurchaseToken
. An option would be to allowisSubscription
field in receipt object that we could also check for.https://github.com/voltrue2/in-app-purchase/blob/develop/lib/google.js#L265-L283
Not sure if I am missing anything else.
@voltrue2 what do you think?
The text was updated successfully, but these errors were encountered: