Having issues calculating the hash for validation.
In the documentation for decrypting an ApplePay Payment Token:
Use the value of the
publicKeyHash key to determine which merchant public key was used by Apple, and then retrieve the corresponding merchant public key certificate and private key.
I can't seem to get the hash to generate properly. Is the public key in the X509 returned by apple in the initial certificate exchange the correct one to use?
I'm doing this decryption at the gateway level, my code is in C# using BouncyCastle. Any help is appreciated.