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. python
request = {
  "amount": Decimal("10.00"),
  "android_pay_card": {
    "cryptogram": online_payment_cryptogram,
    "eci_indicator": eci_indicator,
    "expiration_month": expiration_month,
    "expiration_year": expiration_year,
    "google_transaction_id": google_transaction_id,
    "number": application_primary_account_number,
    "source_card_last_four": source_card_last_four,
    "source_card_type": source_card_type
  },
  "options": {
    "submit_for_settlement": True
  }
}

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.