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.
NotificationClient 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.NotificationClient ntc = new CommercePayments.NotificationClient();This class is used in asynchronous payment gateway adapters. The notification client contains API for communicating with the payments platform regarding the gateway’s notification. When the gateway sends a notification, the gateway adapter invokes the record method in NotificationClient to request that the platform updates notification details.
Example
The NotificationSaveResult class creates a saveResult object to store the result of the save request made to the payment gateway.
commercepayments.NotificationSaveResult saveResult = commercepayments.NotificationClient.record(notification);NotificationClient Methods
The following are methods for NotificationClient.
record(notification)
Signature
global static commercepayments.NotificationSaveResult record(commercepayments.BaseNotification notification)
Parameters
- notification:
Return Value
Type: NotificationSaveResult