Newer Version Available

This content describes an older version of this product. View Latest

NotificationClient Class

Communicates with the payment platform regarding the gateway’s notification.

Namespace

CommercePayments

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)

Stores the results of a notification request.

Signature

global static commercepayments.NotificationSaveResult record(commercepayments.BaseNotification notification)

Parameters

notification
Type: BaseNotification

Return Value

Type: NotificationSaveResult