Defining the payment gateway

Implement the getTokenizationSpecification method as shown below in order to specify that you are using the “lyra” payment gateway.

Excerpt from the code sample:

private const val GATEWAY_TOKENIZATION_NAME = "lyra"
private const val GATEWAY_MERCHANT_ID = "<REPLACE_ME>"					

private fun getTokenizationSpecification(gatewayMerchantId: String): JSONObject {
	val params = JSONObject().put("gateway", GATEWAY_TOKENIZATION_NAME)
	params.put("gatewayMerchantId", gatewayMerchantId)

	return JSONObject().put("type", "PAYMENT_GATEWAY").put("parameters", params)

Replace <REPLACE_ME> by the Google Pay™ contract number that can be found in (Settings > Company > Merchant IDs).

If you are using the sample code, enter your Google Pay contract number in the MainActivity.kt file (GATEWAY_MERCHANT_ID variable).