Class DefaultCheckoutComFlowSessionService
java.lang.Object
com.broadleafcommerce.vendor.checkoutcom.service.session.flow.DefaultCheckoutComFlowSessionService
- All Implemented Interfaces:
CheckoutComFlowSessionService
public class DefaultCheckoutComFlowSessionService
extends Object
implements CheckoutComFlowSessionService
Default implementation of
CheckoutComFlowSessionService.-
Constructor Summary
ConstructorsConstructorDescriptionDefaultCheckoutComFlowSessionService(CheckoutApiInitService checkoutApiInitService, CheckoutComRequestResponseTransformer requestResponseTransformer, CheckoutConfigurationProperties properties, com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected com.checkout.handlepaymentsandpayouts.flow.requests.PaymentSessionCreateRequestbuildCreateRequest(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest request, boolean isCapture) protected com.broadleafcommerce.paymentgateway.domain.PaymentResponsebuildPaymentResponse(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest request, @NonNull com.checkout.handlepaymentsandpayouts.flow.responses.PaymentSessionResponse response, boolean isCapture) com.broadleafcommerce.paymentgateway.domain.PaymentResponsecreatePaymentSession(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, boolean isCapture) Creates a PaymentSession with Checkout.com to initiate the Flow UI.protected CheckoutApiInitServiceprotected CheckoutConfigurationPropertiesprotected CheckoutComRequestResponseTransformerprotected com.broadleafcommerce.common.extension.TypeFactory
-
Constructor Details
-
DefaultCheckoutComFlowSessionService
public DefaultCheckoutComFlowSessionService(CheckoutApiInitService checkoutApiInitService, CheckoutComRequestResponseTransformer requestResponseTransformer, CheckoutConfigurationProperties properties, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
-
Method Details
-
createPaymentSession
public com.broadleafcommerce.paymentgateway.domain.PaymentResponse createPaymentSession(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, boolean isCapture) Description copied from interface:CheckoutComFlowSessionServiceCreates a PaymentSession with Checkout.com to initiate the Flow UI. The PaymentSession is added to thePaymentResponse.getNextAction()and returned.- Specified by:
createPaymentSessionin interfaceCheckoutComFlowSessionService- Parameters:
paymentRequest- the payment details to build the PaymentSession requestisCapture- whether or capture should be executed immediately after authorization- Returns:
- returns the PaymentResponse with the PaymentSession hydrated as the
NextAction
-
buildCreateRequest
protected com.checkout.handlepaymentsandpayouts.flow.requests.PaymentSessionCreateRequest buildCreateRequest(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest request, boolean isCapture) -
buildPaymentResponse
protected com.broadleafcommerce.paymentgateway.domain.PaymentResponse buildPaymentResponse(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest request, @NonNull @NonNull com.checkout.handlepaymentsandpayouts.flow.responses.PaymentSessionResponse response, boolean isCapture) -
getCheckoutApiInitService
-
getRequestResponseTransformer
-
getProperties
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
-