I am working to match the payment token's publicKeyHash to one of our stored payment processing certificates base64 sha256 hash but none are matching, not sure what else to try.
For example, I have stored in my system a payment processing certificate where I calculate the publicKeyHash as base64(sha256(public certificate in DER format)), where the "public certificate" is the certificate downloaded from Apple's console. There is only that one certificate available in the console. The result is gMa...dvA=.
I receive the paymentData.header.publicKeyHash from Apple Pay JS as PHF...RVc=. I can still decrypt the encrypted payment data using the private key of the payment processing certificate above, so it is the correct private key, it's just the public key hash does not match the one I have computed. I have also converted the public key to a PEM format before hashing/encoding to no avail.
Any idea what I am doing wrong here?
Thanks, CB