AuthorizationReversalResponse Class

Response sent by the payment gateway following a payment authorization reversal service.

CommercePayments

The constructor of this class takes no arguments. For example:

CommercePayments.AuthorizationReversalResponse authRevRes = new CommercePayments.AuthorizationResponse();

Contains information about the payment gateway’s response following an authorization reversal transaction. The gateway adapter uses the payment gateway’s response to populate the AuthorizationReversalResponse fields. The payments platform uses the information from this class to construct the authorization gateway response shown to the user.

This class builds an authorization reversal response that contains the amount of the original reversal request, gateway information, and the Salesforce result code.

The following are methods for AuthorizationReversalResponse.

Contains the amount of the authorization reversal. Must be a non-zero value.

global void setAmount(Double amount)

Type: void

Sets the AVS (Address Verification System) result code that the gateway returned. Maximum length of 64 characters.

global void setGatewayAvsCode(String gatewayAvsCode)

  • gatewayAvsCode:

    Type: String

    Used to verify

    the address mapped to a payment method when the payments platform requests tokenization from the payment gateway.

Type: void

Sets the date that the authorization reversal request occurred in the payment gateway. Some gateways don’t send this value.

global void setGatewayDate(Datetime gatewayDate)

Type: void

Sets error messages that the gateway returned for the authorization reversal request. Maximum length of 255 characters.

global void setGatewayMessage(String gatewayMessage)

  • gatewayMessage:

    Type: String

Type: void

Stores data that you can use for subsequent authorizations. You can use any data that isn’t normalized in financial entities. This field has a maximum length of 1000 characters and can store data as JSON or XML.

global void setGatewayReferenceDetails(String gatewayReferenceDetails)

  • gatewayReferenceDetails:

    Type: String

Type: void

Sets a unique gateway reference number for the transaction that the gateway returned. Maximum length of 255 characters.

global void setGatewayReferenceNumber(String gatewayReferenceNumber)

  • gatewayReferenceNumber:

    Type: String

    Unique reference ID created by the payment gateway.

Type: void

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

global void setGatewayResultCode(String gatewayResultCode)

  • gatewayResultCode:

    Type: String

    Gateway-specific result code.

    Must be used to map a Salesforce-specific result code.

Type: void

Sets a description of the gateway-specific result code that a payment gateway returned. Maximum length of 1000 characters.

global void setGatewayResultCodeDescription(String gatewayResultCodeDescription)

  • gatewayResultCodeDescription:

    Type: String

    Description of the gateway’s result code. Use this field to learn more about why the gateway returned a certain result code.

Type: void

Sets the Salesforce-specific result code information. Payment gateways have many response codes for payment calls. Salesforce uses the result code information to map payment gateway codes to a predefined set of standard Salesforce result codes.

global void setSalesforceResultCodeInfo(commercepayments.SalesforceResultCodeInfo salesforceResultCodeInfo)

  • salesforceResultCodeInfo:

    Type: SalesforceResultCodeInfo Description of

    the Salesforce result code value.

Type: void