No One on Whole of Stack overflow no one has answer to this, I dont know why , has no one worked with Google pay on android?? . According to google :
Follow this link :
https://developers.google.com/pay/api/android/guides/resources/payment-data-cryptography#key-rotation
it talks about key rotation which is mandatory when using DIRECT integration in your App , means if you are not using a payment processor directly/explicitly.
here is what it says :
Key rotation : If you decrypt a payment method token directly on your servers with direct integration, then you must rotate the keys annually.
To rotate encryption keys:
- Use OpenSSL to generate a new key pair.
- Open your Google Pay Developer Profile while signed in with the Google Account used to manage your app in Google Play Console Under the "Public encryption keys" section, select the Add an encryption key button. Then, select the "Public encryption key" text input field and add your newly generated public key Base64-encoded in uncompressed point format. Click Save.
See the screenshot below from the above link . Can any one click on this link and tell me why it takes you to support page instead of Google pay developer account ?
Questions :
How to create a google pay developer account ? Do i need to pay ? My company already has a google pay console account ( Where you manage and upload apps to goole play store )
Where and how will i generate public key ?
where and how will i upload this public key in google pay developer profile ?
The one who will explain these steps with clear example and screenshots will be given bounty.
EDIT Okay I have generated public and private key using Terminal application on my mac .. Here is the screenshot :
Now I need to upload this key into the Google Pay developer account and I can't see any link or any tutorial describing how can i create one if i have to integrate google-Pay into my android App.
How to create a google pay developer account?
You need to sign up for production access: https://developers.google.com/pay/api/web/guides/test-and-deploy/request-prod-access
Do i need to pay?
No, you do not need to pay.
My company already has a google pay console account ( Where you manage and upload apps to goole play store )
The Google Pay Developer Profile is different from the Google Play developer console. If you don't have a Google Pay Developer profile you will need to sign up for one.
Where and how will i generate public key?
The following link provides details on how to generate a public key using OpenSSL: https://developers.google.com/pay/api/android/guides/resources/payment-data-cryptography#using-openssl
Important bits:
# generate private key
openssl ecparam -name prime256v1 -genkey -noout -out key.pem
# generate a base64-encoded public key
openssl ec -in key.pem -pubout -text -noout 2> /dev/null | grep "pub:" -A5 | sed 1d | xxd -r -p | base64 | paste -sd "\0" -
Where and how will i upload this public key in google pay developer profile?
The public key needs to be added to both the Google Pay Developer Profile and included as part of the payment request: https://developers.google.com/pay/api/android/reference/request-objects#direct
Note that you need to be registered with Google Pay for DIRECT
integration.
Example:
"tokenizationSpecification": {
"type": "DIRECT",
"parameters": {
"protocolVersion": "ECv2",
"publicKey": "BOdoXP1aiNp.....kh3JUhiSZKHYF2Y="
}
}
Can any one click on this link and tell me why it takes you to support page instead of Google pay developer account?
If you are logged in with a Google account with access to the Google Pay Developer Profile, you see the Google Pay Developer Profile details. If you are not logged in or do not have access to the profile you will be redirected to the support page.
You need to be signed into your Google Account which has access to the Google Pay Developer Profile.
EDIT: Corrected information about uploading the public key.
UPDATE: Google Pay has recently launched the Business Console to sign up and manage Google Pay integrations.
I'm sure you don't have to pay for it. You have to apply for it with this form
For sure answer lies here : https://developers.google.com/pay/api/android/guides/resources/payment-data-cryptography#key-rotation
I checked this link almost 50 times .. and i don't know if a true native android or iOS developer will be able to understand this or not .. but we need to go through each and every step of link below carefully ..
Still cant get the clear answer of how to create or find a google pay developer profile
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With