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

[GoogleWallet] How do I verify the callback signature from Google by using tink in Golang #22

Open
mong0520 opened this issue Aug 7, 2024 · 1 comment

Comments

@mong0520
Copy link

mong0520 commented Aug 7, 2024

Hi guys,

I am new to Tink and I'm integrating Google Wallet to my project.
Regarding this document, I can configure an endpoint that Google will callback to my server when some specific events happens.

Since the endpoint is public and the guideline suggest me to use TINK to verify the signature, but I don't know how to use it, could you guys suggest any hint for me?

What I got from the callback function

{
	"signature": "MEUCIHb.....SvXi4pj4=",
	"intermediateSigningKey": {
		"signedKey": "{\"keyValue\":\"MFkw...........oA\\u003d\\u003d\",\"keyExpiration\":\"1723672477000\"}",
		"signatures": [
			"MEUCICtIQ......sH061EM="
		]
	},
	"protocolVersion": "ECv2SigningOnly",
	"signedMessage": "{\"classId\":\"3.....3\",\"objectId\":\"3.....3\",\"eventType\":\"del\",\"expTimeMillis\":1723002546007,\"count\":1,\"nonce\":\"dac48ec0-28f3-4088-8196-ebc7d715da0f\"}"
}

Google Wallet's public key: https://pay.google.com/gp/m/issuer/keys

@juergw
Copy link
Contributor

juergw commented Aug 29, 2024

Unfortunately, paymentmethodtoken can only be in Java, using https://github.com/tink-crypto/tink-java-apps.

There are no plan to add support in Go.

You can try to use this:
https://github.com/google-pay/tink-jni-examples/tree/master/TinkJNIGo

@juergw juergw removed their assignment Sep 11, 2024
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