Decrypted Server-Side Implementation

Creating transactionsAnchorIcon

If you decrypt the encrypted Google Pay payment data on your server, you can create a transaction with the decrypted parameters.
  1. C#
TransactionRequest request = new TransactionRequest {
    Amount = 10.00M,
    AndroidPayCard = new TransactionAndroidPayCardRequest {
        Cryptogram = onlinePaymentCryptogram,
        EciIndicator = eciIndicator,
        ExpirationMonth = expirationDate,
        ExpirationYear = expirationYear,
        GoogleTransactionId = googleTransactionId,
        Number = applicationPrimaryAccountNumber,
        SourceCardLastFour = sourceCardLastFour,
        SourceCardType = sourceCardType
    },
    Options = new TransactionOptionsRequest {
        SubmitForSettlement = true
    }
};

Result<transaction> result = gateway.Transaction.Sale(request);
The amount you specify in your client-side payment request should reflect the actual amount you authorize and submit for settlement; transactions will still process in cases where the amount changes during order fulfillment.