PaymentGatewayContext Class

Wraps the information related to a payment request.

Namespace

commercepayments

PaymentGatewayContext Constructors

The following are constructors for PaymentGatewayContext.

PaymentGatewayContext(request, requestType)

Constructor to enable instance creation. Use for testing only.

Signature

global PaymentGatewayContext(commercepayments.PaymentGatewayRequest request, String requestType)

Parameters

request
Type: commercepayments.PaymentGatewayRequest
Raw payload. Sensitive attributes are masked to ensure PCI compliance.
requestType
Type: String
Defines the type of request made to the gateway

PaymentGatewayContext Methods

The following are methods for PaymentGatewayContext.

getPaymentRequest()

Returns the payment request object.

Signature

global commercepayments.PaymentGatewayRequest getPaymentRequest()

Return Value

Type: PaymentGatewayRequest

getPaymentRequestType()

Returns the payment request type.

Signature

global String getPaymentRequestType()

Return Value

Type: String