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.PaymentResponse
buildPaymentResponse
(@NonNull TabbyPaymentRequest tabbyPaymentRequest) com.broadleafcommerce.paymentgateway.domain.PaymentResponse
call
(@NonNull TabbyPaymentRequest tabbyPaymentRequest) Executes the payment request to the Tabby API.com.broadleafcommerce.paymentgateway.domain.PaymentResponse
communicateWithVendor
(@NonNull TabbyPaymentRequest tabbyPaymentRequest) convertFromErrorJson
(@NonNull org.springframework.web.reactive.function.client.WebClientResponseException ex) protected com.broadleafcommerce.paymentgateway.domain.PaymentResponse
executeAuthorizeRequest
(@NonNull TabbyPaymentRequest tabbyPaymentRequest, @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse) protected com.broadleafcommerce.paymentgateway.domain.PaymentResponse
executeCaptureRequest
(@NonNull TabbyPaymentRequest tabbyPaymentRequest, @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse) protected com.broadleafcommerce.paymentgateway.domain.PaymentResponse
executeRefundRequest
(@NonNull TabbyPaymentRequest tabbyPaymentRequest, @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse) protected com.broadleafcommerce.paymentgateway.domain.PaymentResponse
executeRequest
(@NonNull TabbyPaymentRequest tabbyPaymentRequest, @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse) protected com.broadleafcommerce.paymentgateway.domain.PaymentResponse
executeReverseAuthorizeRequest
(@NonNull TabbyPaymentRequest tabbyPaymentRequest, @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse) protected String
getErrorCode
(TabbyErrorResponse errorResponse) protected String
getErrorMessage
(@NonNull TabbyErrorResponse errorResponse) protected String
getGatewayTransactionType
(@NonNull TabbyPaymentRequest tabbyPaymentRequest) protected com.fasterxml.jackson.databind.ObjectMapper
protected com.broadleafcommerce.paymentgateway.util.PaymentResponseUtil
protected ExternalTabbyProviderProperties
protected TabbyConfigurationProperties
protected TabbyProvider
protected TabbyRequestService
protected TabbyResponseService
protected com.broadleafcommerce.common.extension.TypeFactory
protected com.broadleafcommerce.paymentgateway.domain.PaymentResponse
handleExecuteCustomRequest
(@NonNull TabbyPaymentRequest tabbyPaymentRequest, @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse) protected void
handleWebClientException
(ProviderApiException apiException, com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, TabbyErrorResponse errorResponse) protected String
identifyFailureType
(String errorCode, String transactionReferenceId) protected com.broadleafcommerce.paymentgateway.domain.PaymentResponse
processProviderApiException
(@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:TabbyExternalCallService
Executes the payment request to the Tabby API.- Specified by:
call
in interfaceTabbyExternalCallService
- Parameters:
tabbyPaymentRequest
- the payment request that should be executed for the specifiedtransaction type
.- Returns:
- the payment response
-
getServiceName
- Specified by:
getServiceName
in interfacecom.broadleafcommerce.paymentgateway.vendor.service.monitor.ServiceStatusDetectable<TabbyPaymentRequest>
-
communicateWithVendor
public com.broadleafcommerce.paymentgateway.domain.PaymentResponse communicateWithVendor(@NonNull @NonNull TabbyPaymentRequest tabbyPaymentRequest) - Specified by:
communicateWithVendor
in classcom.broadleafcommerce.paymentgateway.service.AbstractExternalPaymentGatewayCall<TabbyPaymentRequest,
com.broadleafcommerce.paymentgateway.domain.PaymentResponse>
-
getFailureReportingThreshold
- Specified by:
getFailureReportingThreshold
in interfacecom.broadleafcommerce.paymentgateway.service.FailureCountExposable
- Specified by:
getFailureReportingThreshold
in 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()
-