AuthorizationReversalRequest Class

Sends information about an authorization reversal request to a gateway adapter during a service call.

CommercePayments

Add your reversal classes to your payment gateway adapter. We recommend adding AuthorizationReversal as a possible requestType value when calling processRequest on the gateway’s response.

Then, add a class that sets the amount of the authorization reversal request, as well as gateway information and the Salesforce result code.

The following are constructors for AuthorizationReversalRequest.

Constructor for building the amount in an authorization reversal request. This constructor is intended for test usage and throws an exception if used outside of the Apex test context.

global AuthorizationReversalRequest(Double amount, String authorizationId)

  • amount:

    Type: Double

    The amount of the authorization reversal request.

  • authorizationId:

    Type: String

    The authorization request to be reversed.

The following are properties for AuthorizationReversalRequest.

  • accountId

    References the customer account for the transaction where the authorization reversal was performed.

  • amount

    The total amount of the authorization reversal request. Can be positive or negative.

  • paymentAuthorizationId

    References the payment authorization to be reversed.

References the customer account for the transaction where the authorization reversal was performed.

global String accountId {get; set;}

Type: String

The total amount of the authorization reversal request. Can be positive or negative.

global Double amount {get; set;}

Type: Double

References the payment authorization to be reversed.

global String paymentAuthorizationId {get; set;}

Type: String

The following are methods for AuthorizationReversalRequest.

  • equals(obj)

    Maintains the integrity of lists of type AuthorizationReversalRequest by determining the equality of external objects in a list. This method is dynamic and based on the equals method in Java.

  • hashCode()

    Maintains the integrity of lists of type AuthorizationReversalRequest by determining the uniqueness of the external object in a list.

  • toString()

    Converts a date to a string.

Maintains the integrity of lists of type AuthorizationReversalRequest by determining the equality of external objects in a list. This method is dynamic and based on the equals method in Java.

global Boolean equals(Object obj)

  • obj:

    Type:

    Object External object whose key is to be validated.

Type: Boolean

Maintains the integrity of lists of type AuthorizationReversalRequest by determining the uniqueness of the external object in a list.

global Integer hashCode()

Type: Integer

Converts a date to a string.

global String toString()

Type: String