Class DefaultTabbyResponseService
java.lang.Object
com.broadleafcommerce.tabby.service.requestresponse.DefaultTabbyResponseService
- All Implemented Interfaces:
TabbyResponseService
The default implementation for the
TabbyResponseService
.- Author:
- Dima Myroniuk (dmyroniuk)
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultTabbyResponseService
(com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected String
buildGatewayTransactionId
(@NonNull TabbyPayment tabbyPayment, @NonNull TabbyPaymentRequest tabbyPaymentRequest) protected com.broadleafcommerce.paymentgateway.domain.NextAction
buildNextAction
(@NonNull TabbyCheckoutSession checkoutSessionResponse, @NonNull TabbyPaymentRequest tabbyPaymentRequest) protected com.fasterxml.jackson.databind.ObjectMapper
protected com.broadleafcommerce.common.extension.TypeFactory
protected boolean
isSuccessful
(@NonNull TabbyCheckoutSession checkoutSessionResponse, @NonNull TabbyPaymentRequest tabbyPaymentRequest) protected boolean
isSuccessful
(@NonNull TabbyPayment tabbyPayment, @NonNull TabbyPaymentRequest tabbyPaymentRequest) protected Instant
parsePaymentCreatedAt
(@NonNull TabbyPayment tabbyPayment) com.broadleafcommerce.paymentgateway.domain.PaymentResponse
populatePaymentResponse
(@NonNull TabbyCheckoutSession checkoutSessionResponse, @NonNull TabbyPaymentRequest tabbyPaymentRequest, @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse) Populates the payment response based on the provided checkout session responsecom.broadleafcommerce.paymentgateway.domain.PaymentResponse
populatePaymentResponse
(@NonNull TabbyPayment tabbyPayment, @NonNull TabbyPaymentRequest tabbyPaymentRequest, @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse) Populates the payment response based on the provided Tabby payment responseprotected void
populateRawResponse
(@NonNull Object tabbyResponse, @NonNull TabbyPaymentRequest tabbyPaymentRequest, @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse)
-
Constructor Details
-
DefaultTabbyResponseService
public DefaultTabbyResponseService(com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
-
Method Details
-
populatePaymentResponse
public com.broadleafcommerce.paymentgateway.domain.PaymentResponse populatePaymentResponse(@NonNull @NonNull TabbyCheckoutSession checkoutSessionResponse, @NonNull @NonNull TabbyPaymentRequest tabbyPaymentRequest, @NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse) Description copied from interface:TabbyResponseService
Populates the payment response based on the provided checkout session response- Specified by:
populatePaymentResponse
in interfaceTabbyResponseService
- Parameters:
checkoutSessionResponse
- the checkout session responsetabbyPaymentRequest
- the tabby payment requestpaymentResponse
- the payment response to populate- Returns:
- the populated payment response for the provided checkout session response
-
populatePaymentResponse
public com.broadleafcommerce.paymentgateway.domain.PaymentResponse populatePaymentResponse(@NonNull @NonNull TabbyPayment tabbyPayment, @NonNull @NonNull TabbyPaymentRequest tabbyPaymentRequest, @NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse) Description copied from interface:TabbyResponseService
Populates the payment response based on the provided Tabby payment response- Specified by:
populatePaymentResponse
in interfaceTabbyResponseService
- Parameters:
tabbyPayment
- the Tabby payment responsetabbyPaymentRequest
- the tabby payment requestpaymentResponse
- the payment response to populate- Returns:
- the populated payment response for the provided checkout session response
-
isSuccessful
protected boolean isSuccessful(@NonNull @NonNull TabbyCheckoutSession checkoutSessionResponse, @NonNull @NonNull TabbyPaymentRequest tabbyPaymentRequest) -
isSuccessful
protected boolean isSuccessful(@NonNull @NonNull TabbyPayment tabbyPayment, @NonNull @NonNull TabbyPaymentRequest tabbyPaymentRequest) -
buildNextAction
protected com.broadleafcommerce.paymentgateway.domain.NextAction buildNextAction(@NonNull @NonNull TabbyCheckoutSession checkoutSessionResponse, @NonNull @NonNull TabbyPaymentRequest tabbyPaymentRequest) -
populateRawResponse
protected void populateRawResponse(@NonNull @NonNull Object tabbyResponse, @NonNull @NonNull TabbyPaymentRequest tabbyPaymentRequest, @NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse) -
parsePaymentCreatedAt
-
buildGatewayTransactionId
protected String buildGatewayTransactionId(@NonNull @NonNull TabbyPayment tabbyPayment, @NonNull @NonNull TabbyPaymentRequest tabbyPaymentRequest) -
getObjectMapper
protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper() -
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
-