Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Pay API integration in Android

I am trying to explore Google Pay API integration.

I have gone through the document provided.

OFFICIAL DOC.

and also downloaded the sample from GITHUB GITHUB LINK

I am unable to understand fully procedure for the same, like If I want to run it in test environment what are requirements?

1) Do I need to create account somewhere or enabling any api on console?

2) Any key generation procedure for <DIRECT_TOKENIZATION_PUBLIC_KEY>

3) Can I get brief idea for supported processors and gateways mentioned in doc.?

4) What are the key requirements to run the demo and test the functionality?

Referring any proper documentations or blog will also be helpful.

like image 793
Vir Rajpurohit Avatar asked Nov 25 '19 13:11

Vir Rajpurohit


People also ask

How do I implement Google Pay API?

Integrate through your Android deviceFind the Android developer documentation. Complete the Prerequisites. Register with Google Pay & Wallet Console. Set your country as India.

What is the API for GPAY?

The Google Pay API enables fast, simple checkout on your website, and gives you convenient access to hundreds of millions of cards saved to Google Accounts worldwide.

Is Google Pay compatible with Android?

Safe, simple, and helpfulDownload Google Pay on your Android and iOS devices.


1 Answers

What have you tried, and what is the issue that you are having at the moment?

I notice that your question references DIRECT integration and is generally not advised. If you've already got a payment processor which supports Google Pay, then the advice is to follow their instructions instead of DIRECT integration because of the additional PCI DCSS requirements that will be placed on you to go to production.

If completing a DIRECT tokenizationSpecification type integration, you must annually rotate your public encryption key through the Google Pay Developer Profile and provide PCI Attestation to Google. PCI Attestation can be submitted by a third-party or Qualified Security Assessor certified by the PCI Security Standards Council, and approved by an Approved Vendor or Qualified Assessor.


To answer your specific questions about the test environment, see below.

1) Do I need to create account somewhere or enabling any api on console?

No, you don't need a merchant account, however, the user you are testing with will require a Google account with at least one payment method configured in their Google Pay account

2) Any key generation procedure for <DIRECT_TOKENIZATION_PUBLIC_KEY>

Yes, refer to the following: https://developers.google.com/pay/api/android/guides/resources/payment-data-cryptography#using-openssl

Specifically:

openssl ecparam -name prime256v1 -genkey -noout -out key.pem

openssl ec -in key.pem -pubout -text -noout 2> /dev/null | grep "pub:" -A5 | sed 1d | xxd -r -p | base64 | paste -sd "\0" -

Alternatively, you can use the following key for testing purposes: BOdoXP+9Aq473SnGwg3JU1aiNpsd9vH2ognq4PtDtlLGa3Kj8TPf+jaQNPyDSkh3JUhiS0KyrrlWhAgNZKHYF2Y=

3) Can I get brief idea for supported processors and gateways mentioned in doc.?

Refer to the following for supported list of processors: https://developers.google.com/pay/api#participating-processors

4) What are the key requirements to run the demo and test the functionality?

Other than a Google account (from 1st answer) and the ability to build, compile and run an Android app, there shouldn't be any additional special requirements to run and test it out.

like image 67
Soc Avatar answered Sep 18 '22 13:09

Soc