Class DefaultMyFatoorahTransactionService

java.lang.Object
com.broadleafcommerce.myfatoorah.service.DefaultMyFatoorahTransactionService
All Implemented Interfaces:
MyFatoorahTransactionService, com.broadleafcommerce.paymentgateway.service.PaymentGatewayTransactionService, com.broadleafcommerce.paymentgateway.service.PaymentGatewayTypeAware

public class DefaultMyFatoorahTransactionService extends Object implements MyFatoorahTransactionService
Author:
Dima Myroniuk (dmyroniuk)
  • Constructor Summary

    Constructors
    Constructor
    Description
    DefaultMyFatoorahTransactionService(MyFatoorahExternalCallService myFatoorahExternalCallService, com.broadleafcommerce.paymentgateway.util.PaymentResponseUtil paymentResponseUtil, com.broadleafcommerce.common.extension.TypeFactory typeFactory, MyFatoorahConfigurationProperties configProperties)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.broadleafcommerce.paymentgateway.domain.PaymentResponse
    authorize(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
     
    com.broadleafcommerce.paymentgateway.domain.PaymentResponse
    authorizeAndCapture(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
     
    com.broadleafcommerce.paymentgateway.domain.PaymentResponse
    capture(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
     
    protected String
     
     
    protected String
    getErrorMessage(Exception e, com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse)
     
     
    protected String
    getInvoiceId(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
     
     
    protected String
    getPaymentMethodId(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
     
    protected com.broadleafcommerce.paymentgateway.util.PaymentResponseUtil
     
    protected String
    getSessionId(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
     
    protected com.broadleafcommerce.common.extension.TypeFactory
     
    protected com.broadleafcommerce.paymentgateway.domain.PaymentResponse
    handleUnexpectedException(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, @NonNull com.broadleafcommerce.paymentgateway.domain.enums.TransactionType transactionType, @NonNull Exception e)
     
    com.broadleafcommerce.paymentgateway.domain.PaymentResponse
    refund(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
     
    com.broadleafcommerce.paymentgateway.domain.PaymentResponse
    reverseAuthorize(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
     
    protected void
    validateAuthorizeAndCaptureRequest(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
     
    protected void
    validateAuthorizeRequest(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
     
    protected void
    validateCaptureRequest(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
     
    protected void
    validateCurrency(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
     
    protected void
    validateRefundRequest(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
     
    protected void
    validateReverseAuthorizeRequest(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.broadleafcommerce.paymentgateway.service.PaymentGatewayTransactionService

    detachedCredit, identifyParentTransactionReferenceIfExists, identifyTransactionTypeFromTransactionResults
  • Constructor Details

    • DefaultMyFatoorahTransactionService

      public DefaultMyFatoorahTransactionService(MyFatoorahExternalCallService myFatoorahExternalCallService, com.broadleafcommerce.paymentgateway.util.PaymentResponseUtil paymentResponseUtil, com.broadleafcommerce.common.extension.TypeFactory typeFactory, MyFatoorahConfigurationProperties configProperties)
  • Method Details

    • authorize

      public com.broadleafcommerce.paymentgateway.domain.PaymentResponse authorize(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
      Specified by:
      authorize in interface com.broadleafcommerce.paymentgateway.service.PaymentGatewayTransactionService
    • reverseAuthorize

      public com.broadleafcommerce.paymentgateway.domain.PaymentResponse reverseAuthorize(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
      Specified by:
      reverseAuthorize in interface com.broadleafcommerce.paymentgateway.service.PaymentGatewayTransactionService
    • authorizeAndCapture

      public com.broadleafcommerce.paymentgateway.domain.PaymentResponse authorizeAndCapture(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
      Specified by:
      authorizeAndCapture in interface com.broadleafcommerce.paymentgateway.service.PaymentGatewayTransactionService
    • capture

      public com.broadleafcommerce.paymentgateway.domain.PaymentResponse capture(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
      Specified by:
      capture in interface com.broadleafcommerce.paymentgateway.service.PaymentGatewayTransactionService
    • refund

      public com.broadleafcommerce.paymentgateway.domain.PaymentResponse refund(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
      Specified by:
      refund in interface com.broadleafcommerce.paymentgateway.service.PaymentGatewayTransactionService
    • getGatewayType

      public String getGatewayType()
      Specified by:
      getGatewayType in interface com.broadleafcommerce.paymentgateway.service.PaymentGatewayTypeAware
    • validateAuthorizeRequest

      protected void validateAuthorizeRequest(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
    • validateReverseAuthorizeRequest

      protected void validateReverseAuthorizeRequest(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
    • validateAuthorizeAndCaptureRequest

      protected void validateAuthorizeAndCaptureRequest(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
    • validateCaptureRequest

      protected void validateCaptureRequest(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
    • validateRefundRequest

      protected void validateRefundRequest(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
    • validateCurrency

      protected void validateCurrency(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
    • getSessionId

      protected String getSessionId(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
    • getInvoiceId

      protected String getInvoiceId(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
    • getPaymentMethodId

      protected String getPaymentMethodId(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
    • handleUnexpectedException

      protected com.broadleafcommerce.paymentgateway.domain.PaymentResponse handleUnexpectedException(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, @NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.enums.TransactionType transactionType, @NonNull @NonNull Exception e)
    • getErrorMessage

      protected String getErrorMessage(Exception e, com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse)
    • determineFailureType

      protected String determineFailureType(Exception e)
    • getMyFatoorahExternalCallService

      protected MyFatoorahExternalCallService getMyFatoorahExternalCallService()
    • getPaymentResponseUtil

      protected com.broadleafcommerce.paymentgateway.util.PaymentResponseUtil getPaymentResponseUtil()
    • getTypeFactory

      protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
    • getConfigProperties

      protected MyFatoorahConfigurationProperties getConfigProperties()