Google Pay™ App =============== .. toctree:: :maxdepth: 2 .. contents:: :local: .. role:: ex .. role:: code Introduction ------------ | Google Pay™ is an electronic wallet system that allows making one-click payment using a card stored securely on Google side. There is no need to enter card details during Google Pay™ transaction. | Access to the payment mechanism is possible from any device, which supports Google Pay™. | After choosing Google Pay™ payment method, the payer will see the form on which he confirms his Google account and card he is going to use to pay for order. If payer doesn’t have a previously registered card, he may do it while making payment. | | See terms definitions in :ref:`Glossary`. | Integrate Google Pay™ in App with the following steps: | 1. Read and accept :ref:`Terms of Service`. | 2. Follow :ref:`Google Pay™ Account SetupApp`. | 3. Get the :ref:`requiredgooglepayparameters`. | 4. Check the possible :ref:`accsetupgooglepay`, and :ref:`Google Pay™ Allowed Networks`. | 5. Follow the transaction flow instructions. :ref:`transactionflowappgoogle`. How to integrate Google Pay through Payneteasy ----------------------------------------------------- .. only:: google_pay_contacts_enabled .. raw:: html
Already our client   Not our client yet
If you are Payneteasy client, you can get in touch with your manager or contact us here.   Contact our sales team and we’ll create a test account for you and help to integrate Google Pay in a week.
.. only:: insurance_enabled Please contact Payneteasy support manager to get help with Google Pay test account. .. _Terms of ServiceApp: Terms of Service ---------------- | The following rules must be complied to use Google Pay™: * `Google Pay™ API terms of service `_ * `Google Pay™ APIs Acceptable Use Policy `_ | The following rules must be complied to use Google Pay™ on mobile apps: * `Google Pay™ for Android payments overview `_ * `Integration checklist for mobile integration `_ * `Google Pay™ Android Brand Guidelines `_ .. _Google Pay™ Account SetupApp: Google Pay™ Account Setup ------------------------- 1. Connecting Party must register in |google_console_link|. Instead of gmail, Connecting Party can use a corporate email address. .. |google_console_link| raw:: html Google Console .. image:: ../_static/images/Gpay/gpay-1.png :scale: 60 % :align: center .. image:: ../_static/images/Gpay/gpay-2.png :scale: 60 % :align: center 2. Then, from the account screen in the console, save the Merchant ID and proceed to the registration of the website in the Google Pay API section. .. image:: ../_static/images/Gpay/gpay-3.png :scale: 60 % :align: center 3. Add a website using the "Add website" button. .. image:: ../_static/images/Gpay/gpay-4.png :scale: 60 % :align: center 4. Specify screenshots of the checkout and payment form in the website settings, as well as integration type = Gateway and the address of the Connecting Party's website from where the purchase starts. .. image:: ../_static/images/Gpay/gpay-5.png :scale: 60 % :align: center 5. Send the website address and Merchant ID to Payneteasy support managers. Google Pay™ Integration in an Android App ----------------------------------------- Google Pay™ integration in an Android app supports only CRYPTOGRAM_3DS (tokenized) authentication type. All requests using PAN_ONLY (non-tokenized) authentication type will be automatically declined. .. _accsetupgooglepay: Google Pay™ Authentication Types ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | Connecting Party can independently choose the card types in Google Pay™ that will be available for payment. The card type is specified in the :code:`allowedAuthMethods` Google request parameter. | There are two card types (authentication methods): #. | **PAN_ONLY** (non-tokenized) - cards stored in payer`s Google account. These cards available on any device of the payer. | The token contains the number and expiration date of the physical card. That is why 3-D Secure authentication is required for these cards. 3DS is required for PAN_ONLY cards. It can be indicated by the :code:`Success==3DS` in Google payment response. 3-D Secure authentication does not differ from the standard 3-D Secure. #. | **CRYPTOGRAM_3DS** (tokenized) - cards that are stored tokenized on the payer's device. Tokenized cards are only available on the device where the card was added to the Google Pay™ app. | The token contains the number and expiration date of the virtual card as well as the 3-D Secure cryptogram. Customer 3-D Secure verification for tokenized cards is not required. .. _Google Pay™ Allowed Networks: Google Pay™ Allowed Networks ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | Payment Gateway supports all networks specified in the :code:`allowedCardNetworks` Google request parameter, such as: :ex:`VISA`, :ex:`MASTERCARD`, etc. For the complete list of allowed networks refer to Payneteasy support. .. _requiredgooglepayparameters: Required Parameters for Google Pay™ Integration ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1. :ref:`Register with Google`, accept :ref:`Google Terms of Service`, and receive a :code:`Google merchant ID` after website passes a Google review. 2. Request :code:`googleMerchantGatewayID` from Payneteasy support, which looks like: :code:`eXXX.mXXX.gate.payneteasy.com`, where: | :code:`eXXX` - endpointID | :code:`mXXX` - merchantID | An example of googleMerchantGatewayID: :code:`e123.m567.gate.payneteasy.com` 3. Set :code:`gatewayID=google.gatewayid`. 4. :code:`ENDPOINTID` or :code:`ENDPOINTGROUPID` received from Payneteasy support. 5. Control-key and Connecting Party login received from Payneteasy support. .. _transactionflowappgoogle: Google Pay™ Sale Flow ^^^^^^^^^^^^^^^^^^^^^ .. uml:: :align: center skinparam roundcorner 20 skinparam sequenceArrowThickness 2 skinparam ParticipantPadding 30 actor "Payer" as p participant "Connecting Party\n mobile app" as m participant Payneteasy as ppg autonumber "(##)" p -> m: checkout activate m == Retrieve Google Pay token data == m -> m: Check if Google Pay is available on the device m --> p: Payment screen \ncontaining GooglePay button activate p p -> m: Press GooglePay button deactivate p m -> m: Create PaymentRequestData m -> m: Call loadPaymentData\nPayneteasy, merchantGatewayId \nRetrieve Google Pay token == Purchase Payment Request == m -> ppg: /mapi/v1/sale/ENDPOINTID\nencrypted-type=googlepay\nencrypted-data=hex(Google Pay token json) activate ppg ppg --> m: type=async-response, paynet-order-id=orderId ppg -> ppg: Check signature and decrypt token data alt authMethod=CRYPTOGRAM_3DS ppg -> ppg : Process payment else authMethod=PAN_ONLY ppg-> ppg: stop processing\nset status=declined end == Status Request == m -> ppg: /api/v2/status/ENDPOINTID\n orderId=orderId ppg--> m: Response\nstatus,order-stage deactivate ppg m--> p: Show payment result deactivate m | (2)-(6) To implement retrieving of Google Pay token data within mobile application, please follow official tutorial from Google: https://developers.google.com/pay/api/android/guides/tutorial. | (7) To implement Mobile API sale request, see :ref:`/mapi/v1/sale/`. | (12) To implement order status request see :ref:`/api/v2/status/`. Status should be requested multiple times with 3-5 seconds interval until final status will be received in response.