CaptureResponse Class
Namespace
Usage
You must specify the CommercePayments namespace when creating an instance of this class. The constructor of this class takes no arguments. For example:
CommercePayments.Capture Response ctr = new CommercePayments.CaptureResponse();CaptureResponse Methods
The following are methods for CaptureResponse.
setAmount(amount)
Signature
global void setAmount(Double amount)
Parameters
- amount
- Type: Double
- The amount to be debited or captured.
Return Value
Type: void
setAsync(async)
Signature
global void setAsync(Boolean async)
Parameters
- async
- Type: Boolean
Return Value
Type: void
setGatewayAvsCode(gatewayAvsCode)
Signature
global void setGatewayAvsCode(String gatewayAvsCode)
Parameters
- gatewayAvsCode
- Type: String
- Payment gateways that use an AVS system return this code.
Return Value
Type: void
setGatewayDate(gatewayDate)
Signature
global void setGatewayDate(Datetime gatewayDate)
Parameters
- gatewayDate
- Type: Datetime
- The date that communication happened with the gateway.
Return Value
Type: void
setGatewayMessage(gatewayMessage)
Signature
global void setGatewayMessage(String gatewayMessage)
Parameters
- gatewayMessage
- Type: String
- Information or error messages returned by the gateway.
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
- The gateway result code. You must map this to a Salesforce result code.
Return Value
Type: void
setGatewayResultCodeDescription(gatewayResultCodeDescription)
Signature
global void setGatewayResultCodeDescription(String gatewayResultCodeDescription)
Parameters
- gatewayResultCodeDescription
- Type: String
- Description of the GatewayResultCode. Provides additional context about the result code that the gateway returned.
Return Value
Type: void
setSalesforceResultCodeInfo(salesforceResultCodeInfo)
Signature
global void setSalesforceResultCodeInfo(commercepayments.SalesforceResultCodeInfo salesforceResultCodeInfo)
Parameters
- salesforceResultCodeInfo
- SalesforceResultCodeInfoType: commercepayments.SalesforceResultCodeInfo
- Description of the Salesforce result code value.
Return Value
Type: void