Class DefaultTabbyRequestService
java.lang.Object
com.broadleafcommerce.tabby.service.requestresponse.DefaultTabbyRequestService
- All Implemented Interfaces:
TabbyRequestService
The default implementation for
TabbyRequestService
.- Author:
- Dima Myroniuk (dmyroniuk)
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultTabbyRequestService
(com.fasterxml.jackson.databind.ObjectMapper objectMapper, TabbyConfigurationProperties configProperties, com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
Method Summary
Modifier and TypeMethodDescriptionbuildCapturePaymentRequest
(@NonNull TabbyPaymentRequest tabbyPaymentRequest) Builds theTabbyCapturePaymentRequest
to capture the payment.buildCreateSessionRequest
(@NonNull TabbyPaymentRequest tabbyPaymentRequest) Builds theTabbyCheckoutSession
to create the checkout session.buildRefundPaymentRequest
(@NonNull TabbyPaymentRequest tabbyPaymentRequest) Builds theTabbyRefundPaymentRequest
to refund the payment.protected TabbyConfigurationProperties
protected String
getMerchantCode
(@NonNull TabbyPaymentRequest tabbyPaymentRequest) protected TabbyCheckoutSession.TabbyMerchantUrls
getMerchantUrls
(TabbyPaymentRequest tabbyPaymentRequest) getMetadata
(@NonNull TabbyPayment tabbyPayment, @NonNull TabbyPaymentRequest tabbyPaymentRequest) protected com.fasterxml.jackson.databind.ObjectMapper
protected TabbyPayment
getTabbyPayment
(@NonNull TabbyPaymentRequest tabbyPaymentRequest) protected String
getTransactionTotal
(com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest) protected com.broadleafcommerce.common.extension.TypeFactory
protected <T> T
-
Constructor Details
-
DefaultTabbyRequestService
public DefaultTabbyRequestService(com.fasterxml.jackson.databind.ObjectMapper objectMapper, TabbyConfigurationProperties configProperties, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
-
Method Details
-
buildCreateSessionRequest
public TabbyCheckoutSession buildCreateSessionRequest(@NonNull @NonNull TabbyPaymentRequest tabbyPaymentRequest) Description copied from interface:TabbyRequestService
Builds theTabbyCheckoutSession
to create the checkout session.- Specified by:
buildCreateSessionRequest
in interfaceTabbyRequestService
- Parameters:
tabbyPaymentRequest
- the payment request- Returns:
- the
TabbyCheckoutSession
to create the checkout session
-
buildCapturePaymentRequest
public TabbyCapturePaymentRequest buildCapturePaymentRequest(@NonNull @NonNull TabbyPaymentRequest tabbyPaymentRequest) Description copied from interface:TabbyRequestService
Builds theTabbyCapturePaymentRequest
to capture the payment.- Specified by:
buildCapturePaymentRequest
in interfaceTabbyRequestService
- Parameters:
tabbyPaymentRequest
- the payment request- Returns:
- the
TabbyCapturePaymentRequest
to capture the payment
-
buildRefundPaymentRequest
public TabbyRefundPaymentRequest buildRefundPaymentRequest(@NonNull @NonNull TabbyPaymentRequest tabbyPaymentRequest) Description copied from interface:TabbyRequestService
Builds theTabbyRefundPaymentRequest
to refund the payment.- Specified by:
buildRefundPaymentRequest
in interfaceTabbyRequestService
- Parameters:
tabbyPaymentRequest
- the payment request- Returns:
- the
TabbyRefundPaymentRequest
to refund the payment
-
getTransactionTotal
protected String getTransactionTotal(com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest) -
getMerchantCode
-
getTabbyPayment
-
getMerchantUrls
@Nullable protected TabbyCheckoutSession.TabbyMerchantUrls getMerchantUrls(TabbyPaymentRequest tabbyPaymentRequest) -
getMetadata
protected Map<String,Object> getMetadata(@NonNull @NonNull TabbyPayment tabbyPayment, @NonNull @NonNull TabbyPaymentRequest tabbyPaymentRequest) -
readValue
-
getObjectMapper
protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper() -
getConfigProperties
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
-