PaymentGatewayContext Class
Wraps the information related to a payment request.
The constructor of this class takes no arguments. For example:
CommercePayments.PaymentGatewayContext pgc = new CommercePayments.PaymentGatewayContext();
The following are constructors for PaymentGatewayContext.
-
PaymentGatewayContext(request, requestType)
Constructor to enable instance creation. This constructor is intended for test usage and throws an exception if used outside of the Apex test context.
Constructor to enable instance creation. This constructor is intended for test usage and throws an exception if used outside of the Apex test context.
global PaymentGatewayContext(commercepayments.PaymentGatewayRequest request, String requestType)
- request: Type: commercepayments.PaymentGatewayRequest Raw payload. Sensitive attributes are masked to ensure PCI compliance.
- requestType: Type: commercepayments.RequestType Enum Defines the type of request made to the gateway
The following are methods for PaymentGatewayContext.
-
Returns the payment request object.
-
Returns the payment request type.
Returns the payment request object.
global commercepayments.PaymentGatewayRequest getPaymentRequest()
Type: PaymentGatewayRequest
Returns the payment request type.
global String getPaymentRequestType()
Type: String