Class CheckoutEndpoint
java.lang.Object
com.broadleafcommerce.rest.api.endpoint.BaseEndpoint
com.broadleafcommerce.rest.api.endpoint.checkout.CheckoutEndpoint
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.context.MessageSourceAware
@FrameworkRestController
@FrameworkMapping(value="/cart/checkout",
produces={"application/json","application/xml"})
public class CheckoutEndpoint
extends BaseEndpoint
This endpoint depends on JAX-RS to provide checkout services. It should be extended by components that actually wish
to provide an endpoint. The annotations such as @Path, @Scope, @Context, @PathParam, @QueryParam,
- Author:
- Jay Aisenbrey (cja769)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.broadleafcommerce.core.checkout.service.CheckoutServiceprotected org.broadleafcommerce.profile.core.service.CustomerPaymentServiceprotected org.broadleafcommerce.core.payment.service.OrderPaymentServiceprotected org.broadleafcommerce.core.order.service.OrderServiceFields inherited from class com.broadleafcommerce.rest.api.endpoint.BaseEndpoint
context, messageSource -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddOrderPaymentTransaction(jakarta.servlet.http.HttpServletRequest request, Long orderPaymentId, PaymentTransactionWrapper wrapper, Long cartId) addPaymentToOrder(jakarta.servlet.http.HttpServletRequest request, OrderPaymentWrapper wrapper, Long cartId) addPaymentToOrderById(jakarta.servlet.http.HttpServletRequest request, Double amount, String currencyCode, Long customerPaymentId, Long cartId) findPaymentsForOrder(jakarta.servlet.http.HttpServletRequest request, Long cartId) performCheckout(jakarta.servlet.http.HttpServletRequest request, Long cartId) removePaymentFromOrder(jakarta.servlet.http.HttpServletRequest request, OrderPaymentWrapper wrapper, Long cartId) removePaymentFromOrderById(jakarta.servlet.http.HttpServletRequest request, Long paymentId, Long cartId) Methods inherited from class com.broadleafcommerce.rest.api.endpoint.BaseEndpoint
getApplicationContext, getMessageSource, setApplicationContext, setMessageSource
-
Field Details
-
checkoutService
protected org.broadleafcommerce.core.checkout.service.CheckoutService checkoutService -
orderService
protected org.broadleafcommerce.core.order.service.OrderService orderService -
orderPaymentService
protected org.broadleafcommerce.core.payment.service.OrderPaymentService orderPaymentService -
customerPaymentService
protected org.broadleafcommerce.profile.core.service.CustomerPaymentService customerPaymentService
-
-
Constructor Details
-
CheckoutEndpoint
public CheckoutEndpoint()
-
-
Method Details
-
findPaymentsForOrder
@FrameworkMapping(value="/payments", method=GET) public List<OrderPaymentWrapper> findPaymentsForOrder(jakarta.servlet.http.HttpServletRequest request, @RequestParam("cartId") Long cartId) -
addPaymentToOrderById
@FrameworkMapping(value="/payment/{customerPaymentId}", method=POST) public OrderPaymentWrapper addPaymentToOrderById(jakarta.servlet.http.HttpServletRequest request, @RequestParam("amount") Double amount, @RequestParam("currency") String currencyCode, @PathVariable("customerPaymentId") Long customerPaymentId, @RequestParam("cartId") Long cartId) -
addPaymentToOrder
@FrameworkMapping(value="/payment", method=POST, consumes={"application/json","application/xml"}) public OrderPaymentWrapper addPaymentToOrder(jakarta.servlet.http.HttpServletRequest request, @RequestBody OrderPaymentWrapper wrapper, @RequestParam("cartId") Long cartId) -
removePaymentFromOrder
public OrderWrapper removePaymentFromOrder(jakarta.servlet.http.HttpServletRequest request, OrderPaymentWrapper wrapper, Long cartId) -
removePaymentFromOrderById
@FrameworkMapping(value="/payment/{paymentId}", method=DELETE) public OrderWrapper removePaymentFromOrderById(jakarta.servlet.http.HttpServletRequest request, @PathVariable("paymentId") Long paymentId, @RequestParam("cartId") Long cartId) -
addOrderPaymentTransaction
@FrameworkMapping(value="/payment/{paymentId}/transaction", method=PUT, consumes={"application/json","application/xml"}) public OrderPaymentWrapper addOrderPaymentTransaction(jakarta.servlet.http.HttpServletRequest request, @PathVariable("paymentId") Long orderPaymentId, @RequestBody PaymentTransactionWrapper wrapper, @RequestParam("cartId") Long cartId) -
performCheckout
@FrameworkMapping(method=POST) public OrderWrapper performCheckout(jakarta.servlet.http.HttpServletRequest request, @RequestParam("cartId") Long cartId)
-