-
Notifications
You must be signed in to change notification settings - Fork 18
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
can this library be used to implement pass callbacks #9
Comments
Did you manage to find the solution? |
Is there a solution to this? |
I have changed the implementation and included ECv2SigningOnly by changing the sender id, recipient id and public keys url. I have commented the decrypting part which not necessary for ECv2SigningOnly, and it worked. |
@shazadmaved |
We are looking for c# solution to implement pass callbacks like this below taken from here:
https://developers.google.com/pay/passes/guides/overview/how-to/use-callbacks
Can we use this library, if so, can you provide with an example?
private static final String PUBLIC_KEY_URL = "https://pay.google.com/gp/m/issuer/keys". // Public key URL provided by Google.
private static final String SENDER_ID = "GooglePayPasses". // Constant.
private static final String RECIPIENT_ID = "ISSUER_ID". // Replace ISSUER_ID with your issuer id.
private static final String PROTOCOL = "ECv2SigningOnly".
Private static final GooglePaymentsPublicKeysManager keysManager = new
GooglePaymentsPublicKeysManager.Builder()
.setKeysUrl(PUBLIC_KEY_URL)
.build();
public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {
try {
// Extract signed message with signature from POST request body.
String signedMessage = CharStreams.toString(request.getReader());
recipient =
new PaymentMethodTokenRecipient.Builder()
.protocolVersion(PROTOCOL)
.fetchSenderVerifyingKeysWith(keysManager)
.senderId(SENDER_ID)
.recipientId(RECIPIENT_ID)
.build();
}
The text was updated successfully, but these errors were encountered: