---
schema_version: "1"
id: e70bbe3f2800393d8037890a1269df1b29b6fbedb4103f568cdda3e03de83d9d
title: setGatewayResultCode(gatewayResultCode)
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_commercepayments_PostAuthorizationResponse_setGatewayResultCode.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_commercepayments_PostAuthorizationResponse_setGatewayResultCode.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 36b9f2ebd5812d8937c6242d042cc6003551247a33a9897472d59418961cf053
description: Sets a gateway-specific result code. The code may be mapped to a Salesforce-specific result code. Maximum length of 64 characters.
---
# setGatewayResultCode(gatewayResultCode)

Sets a gateway-specific result code. The code may be mapped to a Salesforce-specific result code. Maximum length of 64 characters.

## Signature

public void setGatewayResultCode(String gatewayResultCode)

## Parameters

- **gatewayResultCode**:
    
    Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")
    
    Gateway-specific result code.
    
    Must be used to map a Salesforce-specific result code.

## Return Value

Type: void