Google PayTM

1. Overview

To be able to integrate with Google Pay, you will need to go through a couple steps to ensure that your integration fulfills Google requirements.  For both web and Android integrations, there are excellent guides provided by Google to help you meet these.  The purpose of this guide is to help get you started with the specifics of an integration with the iTRANSACT gateway and will provide links to important developer documentation provided by Google.

A new Google Pay integration is going to consist of three main steps:

1. Integration work using Google’s test environment

2. Validation that work fulfills Google’s provided integration checklist

3. Request for production access from Google and iTRANSACT Support

2. GPay Feature Support and Requirements

A.      Supported Auth Methods

The iTRANSACT gateway supports both authorization methods provided by Google Pay.  The type of token you support could be dependent on your point of integration.  Part of your setup will include passing through an array of values indicating which methods you would like to use.  The supported values are: PAN_ONLY, CRYPTOGRAM_3DS

B.      Supported Card Networks

You can specify the card networks that you would like to support in your configuration.  The values supported by the iTRANSACT gateway are: VISA, MASTERCARD, DISCOVER, AMEX, JCB

C.      Billing Address Requirements

While there is no requirement to pass through billing address fields to iTRANSACT, it is a supported feature.

D.     Sandbox Testing

If you are working with a sandbox or test account, you are able to test your Google Pay integration by configuring your code to use Google’s test environment.  Once your code is setup to use Google’s test mode, the tokens returned will not have live card data in them.  You do have to use a Google Pay wallet with live cards, but since those cards are not tokenized you don’t have to worry about leaking live cards into the sandbox environment.  You can read more about Google’s test mode at:  https://developers.google.com/pay/api/web/guides/test-and-deploy/integration-checklist#about-the-test-environment

3. Android Native App Integration

This section contains information related to doing an integration using a native Android application.

A. Integration Steps

i Google Pay Android developer documentation

ii Google Pay Android integration checklist

iii Google Pay Android brand guidelines

Modify your code to create a tokenization specification based on the sample below.  This has been modified to work correctly with the iTRANSACT gateway.  The ITRANSACT_GATEWAY_ID value will be provided to you.

Request a payment token

private static JSONObject getGatewayTokenizationSpecification() throws JSONException {
    return new JSONObject() {{
put("type", "PAYMENT_GATEWAY");
      put("parameters", new JSONObject() {
        {
          put("gateway", "paroc_iTransact");
          put("gatewayMerchantId", "__ITRANSACT_GATEWAY_ID__");
        }
      });
    }};
  }

4. Web App

This section contains information related to doing a Google Pay integration with a website.

A.      Integration Steps

The following guides are provided by Google and describe how to implement Google Pay within your website application:

i. Google Pay Web developer documentation

ii. Google Pay Web integration checklist

iii. Google Pay Web Brand Guidelines

Request a Payment Token

Modify your code to create a tokenization specification object based on the sample below.  This has been modified to work correctly with the iTRANSACT gateway.  The ITRANSACT_GATEWAY_ID value will be provided to you.

const tokenizationSpecification = {
  type: 'PAYMENT_GATEWAY',
  parameters: {
    'gateway': payroc_iTransact,
    'gatewayMerchantId': '"__ITRANSACT_GATEWAY_ID__'   }
};

5. Process Payment

Once you have obtained a payment token it can be processed through the iTRANSACT gateway by passing through a CardToken and TokenMode parameter to the ProcessCreditCard endpoint. Below is an example Curl request showing what a properly formatted request would look like.

1.	curl --location --request POST '{{ServerUrl}}ws/CardSafe.asmx/ProcessCreditCard' \
2.	--header 'Content-Type: application/x-www-form-urlencoded' \
3.	--data-urlencode 'UserName={{username}}' \
4.	--data-urlencode 'Password={{password}}' \
5.	--data-urlencode 'TransType=sale' \
6.	--data-urlencode 'CardToken={"signature":"MEYCIQDozGZ2SAvfv+e0X+1h/25qHqC3wsY2JtoXndsuUcKwxQIhAMr9iYzR+9ZmC8GKBIfGxwwSflz28/GwKGK1xaxeB46j","intermediateSigningKey":{"signedKey":"{\"keyValue\":\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEgkemu7aS47o3JDB7msMJAD4bo6Lu4WKUvJLoiJHYq6ft8G1snv/uI55+zvgVh5jJMKM99jkSw/k38cwLKIwyiw\u003d\u003d\",\"keyExpiration\":\"1595525208075\"}","signatures":["MEUCIHXJAJHKfYMGBw0c/akHrtLR27W3J9QiVu0ct7g9dRqhAiEAlBG7BLIP4JDkCT1otiJInJ0B8ZeQ1pFExo3jZCSajTI\u003d"]},"protocolVersion":"ECv2","signedMessage":"{\"encryptedMessage\":\"rzWmImkXm8FdvfeTfPREgeUAF4icv4hVltpOcW5EUNaOsMSSes8uY3+CP2BoyPR9w+bZpjPshn3RjSD5xCcpP63W//jb0Z++JXLnhv2ltJ3hwDuDhJK7PpvcL/rqHbGPc4zajEn/WlOcHrEea5ut9em67ZEBqkNPNQT9P2ym/bNlYoAjwU2QXB2CvZLgDp2T4eR6kuVh+6HYhHLoXlLYc2KU//7P862lQpdGwj3BfATBLclzt0NPt3AmUZyeHa79LBd8/+kfNoBXKoZExWimjoaxo+MzFlidGTDgfcJpvNvLJXfWX6IB1Qt+b7KynOQa3I3M1Wf8P44fzMFBJR/H9FweCBlaFiun4plV87w1Ad7vh4wAPquUcBoQNYiy9yorvIe8NAUuxFMSVoBPk/uLGaxgaZdJCTmapx65Q+y4ICHaBbYw3x1BIC5/e6XOU91ybaLkdDNXvHUzHHcD5N7gzaphMkDigA\u003d\u003d\",\"ephemeralPublicKey\":\"BBF+Inap6j2N8zgXhBZ+y/0gWPygtfQHMOguTWIKTkxfU89oCYx3L1CpxCx4/wVLk4+Q7RyqYdsAT7gtOgqJqYo\u003d\",\"tag\":\"ok7FqSBy3B4wVqVsGpDqI63vGZIEorqafsovcUwFWt0\u003d\"}"}' \
7.	--data-urlencode 'TokenMode=googlepay' \
8.	--data-urlencode 'Amount=15'