Class NullIntegrationGatewayTransactionServiceImpl

java.lang.Object
org.broadleafcommerce.common.payment.service.AbstractPaymentGatewayTransactionService
org.broadleafcommerce.core.payment.service.NullIntegrationGatewayTransactionServiceImpl
All Implemented Interfaces:
org.broadleafcommerce.common.payment.service.FailureCountExposable, org.broadleafcommerce.common.payment.service.PaymentGatewayTransactionService

@Service("blNullIntegrationGatewayTransactionService") public class NullIntegrationGatewayTransactionServiceImpl extends org.broadleafcommerce.common.payment.service.AbstractPaymentGatewayTransactionService implements org.broadleafcommerce.common.payment.service.FailureCountExposable
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Integer
     
    protected Boolean
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.broadleafcommerce.common.payment.dto.PaymentResponseDTO
    authorize(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequestDTO)
     
    org.broadleafcommerce.common.payment.dto.PaymentResponseDTO
    authorizeAndCapture(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequestDTO)
     
    org.broadleafcommerce.common.payment.dto.PaymentResponseDTO
    capture(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequestDTO)
    for the test implementation, and in order to test different failed response scenarios, check for the presence of a "desired outcome" entry in the request's additional fields
    void
     
    protected org.broadleafcommerce.common.payment.dto.PaymentResponseDTO
    commonCreditCardProcessing(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO requestDTO, org.broadleafcommerce.common.payment.PaymentTransactionType paymentTransactionType)
    Does minimal Credit Card Validation (luhn check and expiration date is after today).
     
    org.broadleafcommerce.common.vendor.service.type.ServiceStatusType
     
    void
    arbitrarily set a failure threshold value of "3"
    org.broadleafcommerce.common.payment.dto.PaymentResponseDTO
    refund(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequestDTO)
     
    org.broadleafcommerce.common.payment.dto.PaymentResponseDTO
    reverseAuthorize(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequestDTO)
     
    org.broadleafcommerce.common.payment.dto.PaymentResponseDTO
    voidPayment(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequestDTO)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • failureCount

      protected Integer failureCount
    • isUp

      protected Boolean isUp
  • Constructor Details

    • NullIntegrationGatewayTransactionServiceImpl

      public NullIntegrationGatewayTransactionServiceImpl()
  • Method Details

    • authorize

      public org.broadleafcommerce.common.payment.dto.PaymentResponseDTO authorize(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequestDTO) throws org.broadleafcommerce.common.vendor.service.exception.PaymentException
      Specified by:
      authorize in interface org.broadleafcommerce.common.payment.service.PaymentGatewayTransactionService
      Overrides:
      authorize in class org.broadleafcommerce.common.payment.service.AbstractPaymentGatewayTransactionService
      Throws:
      org.broadleafcommerce.common.vendor.service.exception.PaymentException
    • capture

      public org.broadleafcommerce.common.payment.dto.PaymentResponseDTO capture(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequestDTO) throws org.broadleafcommerce.common.vendor.service.exception.PaymentException
      for the test implementation, and in order to test different failed response scenarios, check for the presence of a "desired outcome" entry in the request's additional fields
      Specified by:
      capture in interface org.broadleafcommerce.common.payment.service.PaymentGatewayTransactionService
      Overrides:
      capture in class org.broadleafcommerce.common.payment.service.AbstractPaymentGatewayTransactionService
      Throws:
      org.broadleafcommerce.common.vendor.service.exception.PaymentException
    • authorizeAndCapture

      public org.broadleafcommerce.common.payment.dto.PaymentResponseDTO authorizeAndCapture(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequestDTO) throws org.broadleafcommerce.common.vendor.service.exception.PaymentException
      Specified by:
      authorizeAndCapture in interface org.broadleafcommerce.common.payment.service.PaymentGatewayTransactionService
      Overrides:
      authorizeAndCapture in class org.broadleafcommerce.common.payment.service.AbstractPaymentGatewayTransactionService
      Throws:
      org.broadleafcommerce.common.vendor.service.exception.PaymentException
    • reverseAuthorize

      public org.broadleafcommerce.common.payment.dto.PaymentResponseDTO reverseAuthorize(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequestDTO) throws org.broadleafcommerce.common.vendor.service.exception.PaymentException
      Specified by:
      reverseAuthorize in interface org.broadleafcommerce.common.payment.service.PaymentGatewayTransactionService
      Overrides:
      reverseAuthorize in class org.broadleafcommerce.common.payment.service.AbstractPaymentGatewayTransactionService
      Throws:
      org.broadleafcommerce.common.vendor.service.exception.PaymentException
    • refund

      public org.broadleafcommerce.common.payment.dto.PaymentResponseDTO refund(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequestDTO) throws org.broadleafcommerce.common.vendor.service.exception.PaymentException
      Specified by:
      refund in interface org.broadleafcommerce.common.payment.service.PaymentGatewayTransactionService
      Overrides:
      refund in class org.broadleafcommerce.common.payment.service.AbstractPaymentGatewayTransactionService
      Throws:
      org.broadleafcommerce.common.vendor.service.exception.PaymentException
    • voidPayment

      public org.broadleafcommerce.common.payment.dto.PaymentResponseDTO voidPayment(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO paymentRequestDTO) throws org.broadleafcommerce.common.vendor.service.exception.PaymentException
      Specified by:
      voidPayment in interface org.broadleafcommerce.common.payment.service.PaymentGatewayTransactionService
      Overrides:
      voidPayment in class org.broadleafcommerce.common.payment.service.AbstractPaymentGatewayTransactionService
      Throws:
      org.broadleafcommerce.common.vendor.service.exception.PaymentException
    • commonCreditCardProcessing

      protected org.broadleafcommerce.common.payment.dto.PaymentResponseDTO commonCreditCardProcessing(org.broadleafcommerce.common.payment.dto.PaymentRequestDTO requestDTO, org.broadleafcommerce.common.payment.PaymentTransactionType paymentTransactionType)
      Does minimal Credit Card Validation (luhn check and expiration date is after today). Mimics the Response of a real Payment Gateway.
    • clearStatus

      public void clearStatus()
      Specified by:
      clearStatus in interface org.broadleafcommerce.common.payment.service.FailureCountExposable
    • incrementFailure

      public void incrementFailure()
      arbitrarily set a failure threshold value of "3"
      Specified by:
      incrementFailure in interface org.broadleafcommerce.common.payment.service.FailureCountExposable
    • getServiceStatus

      public org.broadleafcommerce.common.vendor.service.type.ServiceStatusType getServiceStatus()
      Specified by:
      getServiceStatus in interface org.broadleafcommerce.common.payment.service.FailureCountExposable
    • getFailureReportingThreshold

      public Integer getFailureReportingThreshold()
      Specified by:
      getFailureReportingThreshold in interface org.broadleafcommerce.common.payment.service.FailureCountExposable