Newer Version Available

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

PaymentGatewayAsyncAdapter Interface

Implement the interface to allow customers to process payments asynchronously.

Namespace

CommercePayments

Usage

Implementing an asynchronous adapter also requires the processNotification method from the GatewayNotificationResponse class.

Example

PaymentGatewayAsyncAdapter Methods

The following are methods for PaymentGatewayAsyncAdapter.

processNotification(paymentGatewayNotificationContext)

Entry point for processing notifications from payment gateways.

Signature

global commercepayments.GatewayNotificationResponse processNotification(commercepayments.PaymentGatewayNotificationContext var1)

Parameters

paymentGatewayNotificationContext
Type: PaymentGatewayNotificationContext
The PaymentGatewayNotificationContext object wraps all the information related to a gateway notification.

Return Value

Type: GatewayNotificationResponse

When the payment gateway sends a notification to the payments platform, the platform responds with a GatewayNotificationResponse indicating whether the platform succeeded or failed at receiving the notification.

PaymentGatewayAsyncAdapter Example Implementation

This is a sample implementation of the commercepayments.PaymentGatewayAsyncAdapter interface.