Class DefaultTabbyResponseService

java.lang.Object
com.broadleafcommerce.tabby.service.requestresponse.DefaultTabbyResponseService
All Implemented Interfaces:
TabbyResponseService

public class DefaultTabbyResponseService extends Object implements TabbyResponseService
The default implementation for the TabbyResponseService.
Author:
Dima Myroniuk (dmyroniuk)
  • 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 interface TabbyResponseService
      Parameters:
      checkoutSessionResponse - the checkout session response
      tabbyPaymentRequest - the tabby payment request
      paymentResponse - 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 interface TabbyResponseService
      Parameters:
      tabbyPayment - the Tabby payment response
      tabbyPaymentRequest - the tabby payment request
      paymentResponse - 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

      protected Instant parsePaymentCreatedAt(@NonNull @NonNull TabbyPayment tabbyPayment)
    • 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()