问题
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.
回答1:
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.
来源:https://stackoverflow.com/questions/59033500/google-pay-api-integration-in-android