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. Ruby
result = gateway.transaction.sale(
  :amount => "10.00",
  :google_pay_card => {
    :number => applicationPrimaryAccountNumber,
    :cryptogram => onlinePaymentCryptogram,
    :expiration_month => applicationExpirationDate[2..3],
    :expiration_year => applicationExpirationDate[0..1],
    :eci_indicator => eciIndicator,
    :source_card_type => sourceCardType,
    :source_card_last_four => sourceCardLastFour,
    :google_transaction_id => googleTransactionId
  },
  :options => {
    :submit_for_settlement => true
  }
)
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.