AbstractTransactionResponse Class
Namespace
Usage
Specify the CommercePayments namespace when creating an instance of this class. The constructor of this class takes no arguments. For example:
CommercePayments.AbstractTransactionResponse atr = new CommercePayments.AbstractTransactionResponse();AbstractTransactionResponse Methods
The following are methods for AbstractTransactionResponse.
setAmount(amount)
Signature
global void setAmount(Double amount)
Parameters
- amount
- Type: Double
- The amount of the transaction.
Return Value
Type: void
setGatewayAvsCode(gatewayAvsCode)
Signature
global void setGatewayAvsCode(String gatewayAvsCode)
Parameters
- gatewayAvsCode
- Type: String
- Used to verify the address mapped to a payment method when the payments platform requests tokenization from the payment gateway.
Return Value
Type: void
setGatewayDate(gatewayDate)
Signature
global void setGatewayDate(Datetime gatewayDate)
Parameters
- gatewayDate
- Type: Datetime
- The date that the transaction occurred.
Return Value
Type: void
setGatewayMessage(gatewayMessage)
Signature
global void setGatewayMessage(String gatewayMessage)
Parameters
- gatewayMessage
- Type: String
- The message that the gateway returned with the transaction request. Contains additional information about the transaction.
Return Value
Type: void
setGatewayReferenceDetails(gatewayReferenceDetails)
Signature
global void setGatewayReferenceDetails(String gatewayReferenceDetails)
Parameters
- gatewayReferenceDetails
- Type: String
- Provides information about the gateway communication.
Return Value
Type: void
setGatewayReferenceNumber(gatewayReferenceNumber)
Signature
global void setGatewayReferenceNumber(String gatewayReferenceNumber)
Parameters
- gatewayReferenceNumber
- Type: String
- Unique transaction ID created by the payment gateway.
Return Value
Type: void
setGatewayResultCode(gatewayResultCode)
Signature
global void setGatewayResultCode(String gatewayResultCode)
Parameters
- gatewayResultCode
- Type: String
- Gateway-specific result code. Must be mapped to a Salesforce-specific result code.
Return Value
Type: void
setGatewayResultCodeDescription(gatewayResultCodeDescription)
Signature
global void setGatewayResultCodeDescription(String gatewayResultCodeDescription)
Parameters
- gatewayResultCodeDescription
- Type: String
- Provides additional information about the result code and why the gateway returned the specific code. Descriptions vary between different gateways.
Return Value
Type: void
setSalesforceResultCodeInfo(salesforceResultCodeInfo)
Signature
global void setSalesforceResultCodeInfo(commercepayments.SalesforceResultCodeInfo salesforceResultCodeInfo)
Parameters
- salesforceResultCodeInfo
- Type: commercepayments.SalesforceResultCodeInfo
- 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.
Return Value
Type: void