public enum PaymentGatewayRequestType extends Enum<PaymentGatewayRequestType> implements Serializable
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 enumeration of request types is 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 some gateways support the idea of a transparent redirect tokenization only request. In order to utilize the samePaymentGatewayTransparentRedirectService
, a
particular request type, (e.g. CREATE_CUSTOMER_PAYMENT_TR
can be put on the
PaymentRequest
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(PaymentRequest)
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(PaymentRequest)
method to
distinguish what type of authorization to construct.Enum Constant and Description |
---|
CREATE_CUSTOMER_PAYMENT_TR |
DETACHED_CREDIT_REFUND |
MANUAL_AUTHORIZATION |
UPDATE_CUSTOMER_PAYMENT_TR |
Modifier and Type | Method and Description |
---|---|
String |
getFriendlyName() |
static PaymentGatewayRequestType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PaymentGatewayRequestType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PaymentGatewayRequestType CREATE_CUSTOMER_PAYMENT_TR
public static final PaymentGatewayRequestType UPDATE_CUSTOMER_PAYMENT_TR
public static final PaymentGatewayRequestType DETACHED_CREDIT_REFUND
public static final PaymentGatewayRequestType MANUAL_AUTHORIZATION
public static PaymentGatewayRequestType[] values()
for (PaymentGatewayRequestType c : PaymentGatewayRequestType.values()) System.out.println(c);
public static PaymentGatewayRequestType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getFriendlyName()
Copyright © 2021. All rights reserved.