-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
purchases_updated does not return original data needed for receipt validation #27
Comments
I believe the need for the original json is specific to the Playfab receipt validation implementation. Adding it to the Purchase dictionary should be possible in a future release, if you wanted to make a local build with the feature I think all you would need to do is add the following line to the
And then use the original_json key to retrieve the string to pass to Playfab. |
Ah, ok! I will try that. Thanks! |
Ok, I have results: On the most current version of this repo, I was unable to get the plugin to work in godot (with my changes or not) but when I rolled back to the stable release version, I was able to make this change and PlayFab is happy. Thanks for the suggestion @natetrost ! |
Glad to hear it, the current version of the repo hasn't rolled out into a release yet, it does have an API change, which isn't reflected in the tutorial docs since it isn't the current release yet. I suspect that might have been where you ran into problems before rolling back to 1.0.1. |
Per [issue 27](godot-sdk-integrations#27) added an `original_json` key to the Purchase dictionary containing the contents of `Purchase.getOriginalJson()`. Bumped version to 1.1.1 and updated readme to note that is now building against API 30.
purchases_updated uses your custom utils to convert the received purchases data into a dictionary (very useful, except in this case...)
For receipt validation (in my case through Playfab) I need to pass the original JSON from the purchase data in the exact format it was received - on their end, it looks like Google converts this to a hash using your private developer key and compares it to the signature, which should match. Changing the order or formatting of their data, or leaving out pieces of it, makes it so that won't work. Is there any way to change purchases_updated or create a new callback that returns the original purchase data?
My understanding of this may be somewhat naïve, so I hope I explained it well, and I'm open to other solutions!
The text was updated successfully, but these errors were encountered: