Enum DefaultTransactionTypes

java.lang.Object
java.lang.Enum<DefaultTransactionTypes>
com.broadleafcommerce.paymentgateway.domain.enums.DefaultTransactionTypes
All Implemented Interfaces:
TransactionType, Serializable, Comparable<DefaultTransactionTypes>

public enum DefaultTransactionTypes extends Enum<DefaultTransactionTypes> implements TransactionType
The TransactionType is used to represent the types of operations/transactions that could occur against a single payment.
Author:
Elbert Bautista (elbertbautista), Chris Kittrell (ckittrell)
  • Enum Constant Details

    • AUTHORIZE

      public static final DefaultTransactionTypes AUTHORIZE
      Funds have been authorized for capture. This might appear as a 'pending' transaction on a customer's credit card statement
    • REVERSE_AUTH

      public static final DefaultTransactionTypes REVERSE_AUTH
      The reverse of an AUTHORIZE transaction. This can only occur after funds have been authorized and before funds have been captured.
    • CAPTURE

      public static final DefaultTransactionTypes CAPTURE
      Funds have been charged/submitted/debited from the customer and payment is complete. Can ONLY occur after an amount has been authorized (AUTHORIZE).
    • AUTHORIZE_AND_CAPTURE

      public static final DefaultTransactionTypes AUTHORIZE_AND_CAPTURE

      Funds have been captured/authorized all at once. While this might be the simplest to implement from an order management perspective, the recommended approach is to AUTHORIZE and then CAPTURE in separate transactions and at separate times. For instance, an AUTHORIZE would happen once the order has completed checkout but then a CAPTURE would happen once the order has shipped.

      NOTE: Many gateways like to refer to this as also a SALE transaction.

      This should be treated the exact same as a CAPTURE.

    • REFUND

      public static final DefaultTransactionTypes REFUND

      Funds have been refunded/credited. This can ONLY occur after funds have been captured. This should only be used when money goes back to a customer. This assumes that there will be a parent AUTHORIZE_AND_CAPTURE or CAPTURE transaction that this can be tied back to.

      NOTE: This can also be referred to as a "follow-on credit"

    • DETACHED_CREDIT

      public static final DefaultTransactionTypes DETACHED_CREDIT

      Some payment processors allow you to issue credit to a customer that is not tied to an initial AUTHORIZE or AUTHORIZE_AND_CAPTURE transaction. Most payment gateways disable this feature by default because it is against card association (e.g. Visa, MasterCard) rules. However, there may be legitimate instances where you had a sale transaction but are not able to issue a refund (e.g. closed account of original payment etc...) Please contact your payment gateway provider to see how to enable this feature.

      NOTE: This can also be referred to as a "blind credit" or "stand-alone credit"

  • Method Details

    • values

      public static DefaultTransactionTypes[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static DefaultTransactionTypes valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • isAuthorize

      public static boolean isAuthorize(String transactionType)
    • isReverseAuth

      public static boolean isReverseAuth(String transactionType)
    • isCapture

      public static boolean isCapture(String transactionType)
    • isAuthorizeAndCapture

      public static boolean isAuthorizeAndCapture(String transactionType)
    • isRefund

      public static boolean isRefund(String transactionType)
    • isDetachedCredit

      public static boolean isDetachedCredit(String transactionType)