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 StringbuildGatewayTransactionId(@NonNull TabbyPayment tabbyPayment, @NonNull TabbyPaymentRequest tabbyPaymentRequest) protected com.broadleafcommerce.paymentgateway.domain.NextActionbuildNextAction(@NonNull TabbyCheckoutSession checkoutSessionResponse, @NonNull TabbyPaymentRequest tabbyPaymentRequest) protected com.fasterxml.jackson.databind.ObjectMapperprotected com.broadleafcommerce.common.extension.TypeFactoryprotected booleanisSuccessful(@NonNull TabbyCheckoutSession checkoutSessionResponse, @NonNull TabbyPaymentRequest tabbyPaymentRequest) protected booleanisSuccessful(@NonNull TabbyPayment tabbyPayment, @NonNull TabbyPaymentRequest tabbyPaymentRequest) protected InstantparsePaymentCreatedAt(@NonNull TabbyPayment tabbyPayment) com.broadleafcommerce.paymentgateway.domain.PaymentResponsepopulatePaymentResponse(@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.PaymentResponsepopulatePaymentResponse(@NonNull TabbyPayment tabbyPayment, @NonNull TabbyPaymentRequest tabbyPaymentRequest, @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse) Populates the payment response based on the provided Tabby payment responseprotected voidpopulateRawResponse(@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:TabbyResponseServicePopulates the payment response based on the provided checkout session response- Specified by:
populatePaymentResponsein 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:TabbyResponseServicePopulates the payment response based on the provided Tabby payment response- Specified by:
populatePaymentResponsein 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()
-