I am trying to implement the Google Pay using direct integration and in the google docs it is mentioned that merchants have to manually rotate the keys. During rotation it is mentioned that Caution: You must support the old private key for decryption of payment methods for eight days after you remove the old public key.
Does this mean I need to support old private key even after deleting the old public key?
I found out that Google uses Elliptic Curve Digital Signature which is asymmetric. As far as I know in case of asymmetric algorithms only one key pair will be involved (public and private). Why does Google recommend to support old private key up to 8 days?
The workflow is the following:
String decryptedMessage = new PaymentMethodTokenRecipient.Builder() .addRecipientPrivateKey(newPrivateKey) .addRecipientPrivateKey(oldPrivateKey);
remove old key
This is a common approach as the platform might require some time to propagate the new keys and make sure the old ones are no longer used. You need to support the old key deploying the code above (supporting both signatures) for some time (at least 8 days according to Google's note) and ideally
confirm that the old public key is no longer used to encrypt any transactions.
Well it would be nice to have a choice instead of having to bring my wallet and cards in case I have to use a browser based payment system like every venue in my country has now since the pandemic. It's not that much of a big deal but it would be nice to have similar functionality as other browsers.