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

Add External Validation helper #23

Closed
wants to merge 4 commits into from

Conversation

nitrag
Copy link
Contributor

@nitrag nitrag commented Sep 9, 2016

Validating your receipt externally is a PITA currently, this adds a helper function that returns exactly what you need.

Tested with NPM: in-app-purchase

@ashcoding
Copy link
Contributor

This is to expose getOriginalJson()? getSignature() already exists.
Having a method to just return getOriginalJson() instead of a method that returns both Signature and Original Json aka getReceipt() might be better.

What do you think? Is it necessary to combine them into getReceipt()?

@nitrag
Copy link
Contributor Author

nitrag commented Sep 9, 2016

For Google validation, receipt is an object

{ data: "stringified purchase data", signature: "yyyy" }.

It was necessary to expose originalJson because the data has to be in the exact order it was received for valid decoding. So I killed two birds with one proxy method. Sure it might be cleaner to separate it but that's just one more thing to merge properly on the JS side.

@ashcoding
Copy link
Contributor

Ah. Okay. Understood. 👍

@ashcoding
Copy link
Contributor

@nitrag I'm going to have to cherry-pick this put it in another PR. Reason being that there's a need to branch out the ti.inappbilling for support prior to TiSDK 6 and for TiSDK 6 moving forward.

Hope that is okay for you?

@nitrag
Copy link
Contributor Author

nitrag commented Sep 9, 2016

No problem, I'll keep an eye out for the change when I upgrade to 6.0.

On Sep 9, 2016 2:45 AM, "Ashraf" notifications@github.com wrote:

@nitrag https://github.com/nitrag I'm going to have to cherry-pick this
put it in another PR. Reason being that there's a need to branch out the
ti.inappbilling for support prior to TiSDK 6 and for TiSDK 6 moving forward.

Hope that is okay for you?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#23 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAMBkoJdlIIKdeAem3YPdiB8LvSGj8rYks5qoQCigaJpZM4J4pqG
.

@ashcoding
Copy link
Contributor

I've updated this PR here: #24

@ashcoding
Copy link
Contributor

Will be closing this.

@ashcoding ashcoding closed this Sep 14, 2016
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

Successfully merging this pull request may close these issues.

None yet

3 participants