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.-
Field Summary
Fields inherited from class com.broadleafcommerce.paymentgateway.service.AbstractExternalPaymentGatewayCall
failureCount, isUp -
Constructor Summary
ConstructorsConstructorDescriptionDefaultTabbyExternalCallService(com.broadleafcommerce.paymentgateway.util.PaymentResponseUtil paymentResponseUtil, TabbyProvider tabbyProvider, ExternalTabbyProviderProperties properties, TabbyConfigurationProperties tabbyConfigurationProperties, TabbyResponseService tabbyResponseService, TabbyRequestService tabbyRequestService, com.fasterxml.jackson.databind.ObjectMapper mapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected com.broadleafcommerce.paymentgateway.domain.PaymentResponsebuildPaymentResponse(@NonNull TabbyPaymentRequest tabbyPaymentRequest) com.broadleafcommerce.paymentgateway.domain.PaymentResponsecall(@NonNull TabbyPaymentRequest tabbyPaymentRequest) Executes the payment request to the Tabby API.com.broadleafcommerce.paymentgateway.domain.PaymentResponsecommunicateWithVendor(@NonNull TabbyPaymentRequest tabbyPaymentRequest) convertFromErrorJson(@NonNull org.springframework.web.reactive.function.client.WebClientResponseException ex) protected com.broadleafcommerce.paymentgateway.domain.PaymentResponseexecuteAuthorizeRequest(@NonNull TabbyPaymentRequest tabbyPaymentRequest, @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse) protected com.broadleafcommerce.paymentgateway.domain.PaymentResponseexecuteCaptureRequest(@NonNull TabbyPaymentRequest tabbyPaymentRequest, @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse) protected com.broadleafcommerce.paymentgateway.domain.PaymentResponseexecuteRefundRequest(@NonNull TabbyPaymentRequest tabbyPaymentRequest, @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse) protected com.broadleafcommerce.paymentgateway.domain.PaymentResponseexecuteRequest(@NonNull TabbyPaymentRequest tabbyPaymentRequest, @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse) protected com.broadleafcommerce.paymentgateway.domain.PaymentResponseexecuteReverseAuthorizeRequest(@NonNull TabbyPaymentRequest tabbyPaymentRequest, @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse) protected StringgetErrorCode(TabbyErrorResponse errorResponse) protected StringgetErrorMessage(@NonNull TabbyErrorResponse errorResponse) protected StringgetGatewayTransactionType(@NonNull TabbyPaymentRequest tabbyPaymentRequest) protected com.fasterxml.jackson.databind.ObjectMapperprotected com.broadleafcommerce.paymentgateway.util.PaymentResponseUtilprotected ExternalTabbyProviderPropertiesprotected TabbyConfigurationPropertiesprotected TabbyProviderprotected TabbyRequestServiceprotected TabbyResponseServiceprotected com.broadleafcommerce.common.extension.TypeFactoryprotected com.broadleafcommerce.paymentgateway.domain.PaymentResponsehandleExecuteCustomRequest(@NonNull TabbyPaymentRequest tabbyPaymentRequest, @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse) protected voidhandleWebClientException(ProviderApiException apiException, com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, TabbyErrorResponse errorResponse) protected StringidentifyFailureType(String errorCode, String transactionReferenceId) protected com.broadleafcommerce.paymentgateway.domain.PaymentResponseprocessProviderApiException(@NonNull ProviderApiException apiException, @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, @NonNull TabbyPaymentRequest tabbyPaymentRequest) Methods inherited from class com.broadleafcommerce.paymentgateway.service.AbstractExternalPaymentGatewayCall
clearStatus, getServiceStatus, incrementFailure, process
-
Constructor Details
-
DefaultTabbyExternalCallService
public DefaultTabbyExternalCallService(com.broadleafcommerce.paymentgateway.util.PaymentResponseUtil paymentResponseUtil, TabbyProvider tabbyProvider, ExternalTabbyProviderProperties properties, TabbyConfigurationProperties tabbyConfigurationProperties, TabbyResponseService tabbyResponseService, TabbyRequestService tabbyRequestService, com.fasterxml.jackson.databind.ObjectMapper mapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
-
Method Details
-
call
public com.broadleafcommerce.paymentgateway.domain.PaymentResponse call(@NonNull @NonNull TabbyPaymentRequest tabbyPaymentRequest) Description copied from interface:TabbyExternalCallServiceExecutes the payment request to the Tabby API.- Specified by:
callin interfaceTabbyExternalCallService- Parameters:
tabbyPaymentRequest- the payment request that should be executed for the specifiedtransaction type.- Returns:
- the payment response
-
getServiceName
- Specified by:
getServiceNamein interfacecom.broadleafcommerce.paymentgateway.vendor.service.monitor.ServiceStatusDetectable<TabbyPaymentRequest>
-
communicateWithVendor
public com.broadleafcommerce.paymentgateway.domain.PaymentResponse communicateWithVendor(@NonNull @NonNull TabbyPaymentRequest tabbyPaymentRequest) - Specified by:
communicateWithVendorin classcom.broadleafcommerce.paymentgateway.service.AbstractExternalPaymentGatewayCall<TabbyPaymentRequest,com.broadleafcommerce.paymentgateway.domain.PaymentResponse>
-
getFailureReportingThreshold
- Specified by:
getFailureReportingThresholdin interfacecom.broadleafcommerce.paymentgateway.service.FailureCountExposable- Specified by:
getFailureReportingThresholdin classcom.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
-
handleWebClientException
protected void handleWebClientException(ProviderApiException apiException, com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, TabbyErrorResponse errorResponse) -
identifyFailureType
-
getErrorMessage
-
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
-
getProperties
-
getTabbyConfigurationProperties
-
getTabbyResponseService
-
getTabbyRequestService
-
getMapper
protected com.fasterxml.jackson.databind.ObjectMapper getMapper() -
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
-