Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
ReferencedRefundNotification Class
Namespace
Usage
The constructor of this class takes no arguments. For example:
CommercePayments.ReferencedRefundNotification rrn = new CommercePayments.ReferencedRefundNotification();Example
1commercepayments.NotificationStatus notificationStatus = null;
2 if (success) {
3 notificationStatus = commercepayments.NotificationStatus.Success;
4 } else {
5 notificationStatus = commercepayments.NotificationStatus.Failed;
6 }
7 commercepayments.BaseNotification notification = null;
8 if ('CAPTURE'.equals(eventCode)) {
9 notification = new commercepayments.CaptureNotification();
10 } else if ('REFUND'.equals(eventCode)) {
11 notification = new commercepayments.ReferencedRefundNotification();
12 }ReferencedRefundNotification Methods
The following are methods for ReferencedRefundNotification.
setAmount(amount)
Signature
global void setAmount(Double amount)
Parameters
-
amount:
Type: Double
The amount to be debited or captured.
Return Value
Type: void
setGatewayAvsCode(gatewayAvsCode)
Signature
public 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 communication happened with the gateway.
Return Value
Type: void
setGatewayMessage(gatewayMessage)
Signature
global void setGatewayMessage(String gatewayMessage)
Parameters
-
gatewayMessage:
Type: String
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-specific result code.
Return Value
Type: void
setGatewayResultCodeDescription(gatewayResultCodeDescription)
Signature
global void setGatewayResultCodeDescription(String gatewayResultCodeDescription)
Parameters
-
gatewayResultCodeDescription:
Type: String
Description of the gateway result code. Provides additional context about the result code .
Return Value
Type: void
setSalesforceResultCodeInfo(salesforceResultCodeInfo)
Signature
global void setSalesforceResultCodeInfo(commercepayments.SalesforceResultCodeInfo salesforceResultCodeInfo)
Parameters
-
salesforceResultCodeInfo:
Type: SalesforceResultCodeInfo
Description of the Salesforce result code value.
Return Value
Type: void
setStatus(status)
Signature
global void setStatus(commercepayments.NotificationStatus status)
Parameters
-
status:
Type: NotificationStatus
Indicates whether the payments platform successfully received the notification from the payment gateway.
Return Value
Type: void