Class DefaultTabbyExternalCallService

java.lang.Object
com.broadleafcommerce.paymentgateway.service.AbstractExternalPaymentGatewayCall<TabbyPaymentRequest,com.broadleafcommerce.paymentgateway.domain.PaymentResponse>
com.broadleafcommerce.tabby.service.DefaultTabbyExternalCallService
All Implemented Interfaces:
com.broadleafcommerce.paymentgateway.service.FailureCountExposable, com.broadleafcommerce.paymentgateway.vendor.service.monitor.ServiceStatusDetectable<TabbyPaymentRequest>, TabbyExternalCallService

public class DefaultTabbyExternalCallService extends com.broadleafcommerce.paymentgateway.service.AbstractExternalPaymentGatewayCall<TabbyPaymentRequest,com.broadleafcommerce.paymentgateway.domain.PaymentResponse> implements TabbyExternalCallService
The default implementation for TabbyExternalCallService.
  • Constructor Details

  • Method Details

    • call

      public com.broadleafcommerce.paymentgateway.domain.PaymentResponse call(@NonNull @NonNull TabbyPaymentRequest tabbyPaymentRequest)
      Description copied from interface: TabbyExternalCallService
      Executes the payment request to the Tabby API.
      Specified by:
      call in interface TabbyExternalCallService
      Parameters:
      tabbyPaymentRequest - the payment request that should be executed for the specified transaction type.
      Returns:
      the payment response
    • getServiceName

      public String getServiceName()
      Specified by:
      getServiceName in interface com.broadleafcommerce.paymentgateway.vendor.service.monitor.ServiceStatusDetectable<TabbyPaymentRequest>
    • communicateWithVendor

      public com.broadleafcommerce.paymentgateway.domain.PaymentResponse communicateWithVendor(@NonNull @NonNull TabbyPaymentRequest tabbyPaymentRequest)
      Specified by:
      communicateWithVendor in class com.broadleafcommerce.paymentgateway.service.AbstractExternalPaymentGatewayCall<TabbyPaymentRequest,com.broadleafcommerce.paymentgateway.domain.PaymentResponse>
    • getFailureReportingThreshold

      public Integer getFailureReportingThreshold()
      Specified by:
      getFailureReportingThreshold in interface com.broadleafcommerce.paymentgateway.service.FailureCountExposable
      Specified by:
      getFailureReportingThreshold in class com.broadleafcommerce.paymentgateway.service.AbstractExternalPaymentGatewayCall<TabbyPaymentRequest,com.broadleafcommerce.paymentgateway.domain.PaymentResponse>
    • buildPaymentResponse

      protected com.broadleafcommerce.paymentgateway.domain.PaymentResponse buildPaymentResponse(@NonNull @NonNull TabbyPaymentRequest tabbyPaymentRequest)
    • getGatewayTransactionType

      protected String getGatewayTransactionType(@NonNull @NonNull TabbyPaymentRequest tabbyPaymentRequest)
    • executeRequest

      protected com.broadleafcommerce.paymentgateway.domain.PaymentResponse executeRequest(@NonNull @NonNull TabbyPaymentRequest tabbyPaymentRequest, @NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse)
    • executeAuthorizeRequest

      protected com.broadleafcommerce.paymentgateway.domain.PaymentResponse executeAuthorizeRequest(@NonNull @NonNull TabbyPaymentRequest tabbyPaymentRequest, @NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse)
    • executeReverseAuthorizeRequest

      protected com.broadleafcommerce.paymentgateway.domain.PaymentResponse executeReverseAuthorizeRequest(@NonNull @NonNull TabbyPaymentRequest tabbyPaymentRequest, @NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse)
    • executeCaptureRequest

      protected com.broadleafcommerce.paymentgateway.domain.PaymentResponse executeCaptureRequest(@NonNull @NonNull TabbyPaymentRequest tabbyPaymentRequest, @NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse)
    • executeRefundRequest

      protected com.broadleafcommerce.paymentgateway.domain.PaymentResponse executeRefundRequest(@NonNull @NonNull TabbyPaymentRequest tabbyPaymentRequest, @NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse)
    • processProviderApiException

      protected com.broadleafcommerce.paymentgateway.domain.PaymentResponse processProviderApiException(@NonNull @NonNull ProviderApiException apiException, @NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, @NonNull @NonNull TabbyPaymentRequest tabbyPaymentRequest)
    • convertFromErrorJson

      public TabbyErrorResponse convertFromErrorJson(@NonNull @NonNull org.springframework.web.reactive.function.client.WebClientResponseException ex)
    • getErrorCode

      @Nullable protected String getErrorCode(TabbyErrorResponse errorResponse)
    • handleWebClientException

      protected void handleWebClientException(ProviderApiException apiException, com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, TabbyErrorResponse errorResponse)
    • identifyFailureType

      protected String identifyFailureType(@Nullable String errorCode, @Nullable String transactionReferenceId)
    • getErrorMessage

      protected String getErrorMessage(@NonNull @NonNull TabbyErrorResponse errorResponse)
    • handleExecuteCustomRequest

      protected com.broadleafcommerce.paymentgateway.domain.PaymentResponse handleExecuteCustomRequest(@NonNull @NonNull TabbyPaymentRequest tabbyPaymentRequest, @NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse)
    • getPaymentResponseUtil

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

      protected TabbyProvider getTabbyProvider()
    • getProperties

      protected ExternalTabbyProviderProperties getProperties()
    • getTabbyConfigurationProperties

      protected TabbyConfigurationProperties getTabbyConfigurationProperties()
    • getTabbyResponseService

      protected TabbyResponseService getTabbyResponseService()
    • getTabbyRequestService

      protected TabbyRequestService getTabbyRequestService()
    • getMapper

      protected com.fasterxml.jackson.databind.ObjectMapper getMapper()
    • getTypeFactory

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