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 theTabbyCapturePaymentRequestto capture the payment.buildCreateSessionRequest(@NonNull TabbyPaymentRequest tabbyPaymentRequest) Builds theTabbyCheckoutSessionto create the checkout session.buildRefundPaymentRequest(@NonNull TabbyPaymentRequest tabbyPaymentRequest) Builds theTabbyRefundPaymentRequestto refund the payment.protected TabbyConfigurationPropertiesprotected StringgetMerchantCode(@NonNull TabbyPaymentRequest tabbyPaymentRequest) protected TabbyCheckoutSession.TabbyMerchantUrlsgetMerchantUrls(TabbyPaymentRequest tabbyPaymentRequest) getMetadata(@NonNull TabbyPayment tabbyPayment, @NonNull TabbyPaymentRequest tabbyPaymentRequest) protected com.fasterxml.jackson.databind.ObjectMapperprotected TabbyPaymentgetTabbyPayment(@NonNull TabbyPaymentRequest tabbyPaymentRequest) protected StringgetTransactionTotal(com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest) protected com.broadleafcommerce.common.extension.TypeFactoryprotected <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:TabbyRequestServiceBuilds theTabbyCheckoutSessionto create the checkout session.- Specified by:
buildCreateSessionRequestin interfaceTabbyRequestService- Parameters:
tabbyPaymentRequest- the payment request- Returns:
- the
TabbyCheckoutSessionto create the checkout session
-
buildCapturePaymentRequest
public TabbyCapturePaymentRequest buildCapturePaymentRequest(@NonNull @NonNull TabbyPaymentRequest tabbyPaymentRequest) Description copied from interface:TabbyRequestServiceBuilds theTabbyCapturePaymentRequestto capture the payment.- Specified by:
buildCapturePaymentRequestin interfaceTabbyRequestService- Parameters:
tabbyPaymentRequest- the payment request- Returns:
- the
TabbyCapturePaymentRequestto capture the payment
-
buildRefundPaymentRequest
public TabbyRefundPaymentRequest buildRefundPaymentRequest(@NonNull @NonNull TabbyPaymentRequest tabbyPaymentRequest) Description copied from interface:TabbyRequestServiceBuilds theTabbyRefundPaymentRequestto refund the payment.- Specified by:
buildRefundPaymentRequestin interfaceTabbyRequestService- Parameters:
tabbyPaymentRequest- the payment request- Returns:
- the
TabbyRefundPaymentRequestto 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()
-