Class PaymentGatewayRequestType

java.lang.Object
org.broadleafcommerce.common.payment.PaymentGatewayRequestType
All Implemented Interfaces:
Serializable, BroadleafEnumerationType

public class PaymentGatewayRequestType extends Object implements Serializable, BroadleafEnumerationType

Gateways/processors support a vast array of different features, and in some cases a single API will perform several different functions based on the state of the request. To fully support this and maintain a consistent API, this extensible enumeration of request types are provided to aid the gateway's implementations determination of the correct request to construct (in the case that the current implementation supports it).

For example: 1. Certain gateways support the idea of a "Transparent Redirect" request. Within that set, only certain ones support the idea of a transparent redirect tokenization only request. In order to utilize the same PaymentGatewayTransparentRedirectService, a particular request type, (e.g. CREATE_CUSTOMER_PAYMENT_TR can be put on the PaymentRequestDTO to distinguish which request to construct. 2. Certain gateways support the idea of a "Detached Credit" also referred to as a "blind credit" In some cases, the gateways implementation utilizes the same "refund" api as a normal credit. DETACHED_CREDIT_REFUND can be passed to an implementation's PaymentGatewayTransactionService.refund(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO) method to distinguish what type of refund to construct. 3. Some gateway implementations allow you to pass a manual authorization code received from the bank. For example, a customer service representative can take orders over the phone and call the bank directly to get an authorization code for the customer's card. In this scenario, if your gateway supports this, MANUAL_AUTHORIZATION can be passed into an implementation's PaymentGatewayTransactionService.authorize(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO) method to distinguish what type of authorization to construct.

Author:
Elbert Bautista (elbertbautista)
See Also: