Skip to content
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

How to check transaction is genuine or not? #3

Closed
aman811 opened this issue Mar 19, 2019 · 3 comments
Closed

How to check transaction is genuine or not? #3

aman811 opened this issue Mar 19, 2019 · 3 comments

Comments

@aman811
Copy link

aman811 commented Mar 19, 2019

Google Billing API says to check the purchase token using the Base64 public key, to check whether the transaction was genuine or not. From the code, I couldn't find the module where this is being done whether in the app or provision to send to server.

@svignesh93 Could you point me to the file where this is being done or where I could check the token after a successful purchase?

@svignesh93
Copy link
Member

svignesh93 commented Mar 20, 2019

@aman811 there is no need to put your Base64 public key anywhere in the app. This was handled by Play Billing Library itself. All the Purchase flows are handled in BillingManager. However, if you need to verify the purchase, whether genuine, you can do it on the server side.

@aman811
Copy link
Author

aman811 commented Mar 20, 2019

@svignesh93 I see.. Thanks for your help.. Do you know a reliable PHP backend code source for this? Because I have been reading ambiguous statements. One says the Base64 key is used when used within the app, and for the server, we need to create refresh_token / access_token which expires every 60 minutes. More on this: https://developers.google.com/android-publisher/authorization

Any help would be appreciated.

@svignesh93
Copy link
Member

@aman811 I'm sorry that I have not done any implementation on the server side, for this app. I focused only on the client side implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants