@Controller(value="blPayPalCheckoutController")
@RequestMapping(value="/paypal-checkout")
public class BroadleafPayPalCheckoutController
extends org.broadleafcommerce.common.web.payment.controller.PaymentGatewayAbstractController
| Modifier and Type | Field and Description |
|---|---|
protected static String |
GATEWAY_CONTEXT_KEY |
protected org.broadleafcommerce.common.payment.service.PaymentGatewayConfiguration |
paymentGatewayConfiguration |
protected org.broadleafcommerce.common.payment.service.PaymentGatewayHostedService |
paymentGatewayHostedService |
protected org.broadleafcommerce.common.payment.service.PaymentGatewayWebResponseService |
paymentGatewayWebResponseService |
protected PayPalPaymentService |
paymentService |
baseCartRedirect, baseConfirmationRedirect, baseErrorView, baseOrderReviewRedirect, baseRedirect, cartReqAttributeNotProvidedMessage, PAYMENT_PROCESSING_ERROR, paymentGatewayCheckoutService, processingErrorMessage, webResponsePrintService| Constructor and Description |
|---|
BroadleafPayPalCheckoutController() |
| Modifier and Type | Method and Description |
|---|---|
String |
cancelEndpoint(org.springframework.ui.Model model,
javax.servlet.http.HttpServletRequest request,
org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes,
Map<String,String> pathVars) |
String |
completeCheckout()
Completes checkout for a PayPal
Order. |
Map<String,String> |
createOrder(Boolean performCheckout) |
String |
createOrderHostedJson(javax.servlet.http.HttpServletRequest request,
Boolean performCheckout) |
String |
errorEndpoint(org.springframework.ui.Model model,
javax.servlet.http.HttpServletRequest request,
org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes,
Map<String,String> pathVars) |
protected String |
getApprovalLink(com.paypal.orders.Order order) |
org.broadleafcommerce.common.payment.service.PaymentGatewayConfiguration |
getConfiguration() |
String |
getGatewayContextKey() |
org.broadleafcommerce.common.payment.service.PaymentGatewayWebResponseService |
getWebResponseService() |
void |
handleProcessingException(Exception e,
org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) |
void |
handleUnsuccessfulTransaction(org.springframework.ui.Model model,
org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes,
org.broadleafcommerce.common.payment.dto.PaymentResponseDTO responseDTO) |
String |
returnEndpoint(org.springframework.ui.Model model,
javax.servlet.http.HttpServletRequest request,
org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes,
Map<String,String> pathVars) |
applyPaymentToOrder, getBaseConfirmationRedirect, getCartReqAttributeNotProvidedMessage, getCartViewRedirect, getConfirmationViewRedirect, getErrorViewRedirect, getOrderReviewRedirect, getProcessingErrorMessage, initiateCheckout, lookupOrderNumberFromOrderId, processprotected static final String GATEWAY_CONTEXT_KEY
protected org.broadleafcommerce.common.payment.service.PaymentGatewayWebResponseService paymentGatewayWebResponseService
protected org.broadleafcommerce.common.payment.service.PaymentGatewayHostedService paymentGatewayHostedService
protected org.broadleafcommerce.common.payment.service.PaymentGatewayConfiguration paymentGatewayConfiguration
protected PayPalPaymentService paymentService
public void handleProcessingException(Exception e, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes) throws org.broadleafcommerce.common.vendor.service.exception.PaymentException
handleProcessingException in class org.broadleafcommerce.common.web.payment.controller.PaymentGatewayAbstractControllerorg.broadleafcommerce.common.vendor.service.exception.PaymentExceptionpublic void handleUnsuccessfulTransaction(org.springframework.ui.Model model,
org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes,
org.broadleafcommerce.common.payment.dto.PaymentResponseDTO responseDTO)
throws org.broadleafcommerce.common.vendor.service.exception.PaymentException
handleUnsuccessfulTransaction in class org.broadleafcommerce.common.web.payment.controller.PaymentGatewayAbstractControllerorg.broadleafcommerce.common.vendor.service.exception.PaymentExceptionpublic String getGatewayContextKey()
getGatewayContextKey in class org.broadleafcommerce.common.web.payment.controller.PaymentGatewayAbstractControllerpublic org.broadleafcommerce.common.payment.service.PaymentGatewayWebResponseService getWebResponseService()
getWebResponseService in class org.broadleafcommerce.common.web.payment.controller.PaymentGatewayAbstractControllerpublic org.broadleafcommerce.common.payment.service.PaymentGatewayConfiguration getConfiguration()
getConfiguration in class org.broadleafcommerce.common.web.payment.controller.PaymentGatewayAbstractController@RequestMapping(value="/return",
method=GET)
public String returnEndpoint(org.springframework.ui.Model model,
javax.servlet.http.HttpServletRequest request,
org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes,
@PathVariable
Map<String,String> pathVars)
throws org.broadleafcommerce.common.vendor.service.exception.PaymentException
returnEndpoint in class org.broadleafcommerce.common.web.payment.controller.PaymentGatewayAbstractControllerorg.broadleafcommerce.common.vendor.service.exception.PaymentException@RequestMapping(value="/error",
method=GET)
public String errorEndpoint(org.springframework.ui.Model model,
javax.servlet.http.HttpServletRequest request,
org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes,
@PathVariable
Map<String,String> pathVars)
throws org.broadleafcommerce.common.vendor.service.exception.PaymentException
errorEndpoint in class org.broadleafcommerce.common.web.payment.controller.PaymentGatewayAbstractControllerorg.broadleafcommerce.common.vendor.service.exception.PaymentException@RequestMapping(value="/cancel",
method=GET)
public String cancelEndpoint(org.springframework.ui.Model model,
javax.servlet.http.HttpServletRequest request,
org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes,
@PathVariable
Map<String,String> pathVars)
throws org.broadleafcommerce.common.vendor.service.exception.PaymentException
org.broadleafcommerce.common.vendor.service.exception.PaymentException@RequestMapping(value="/checkout/complete",
method=POST)
public String completeCheckout()
throws org.broadleafcommerce.common.vendor.service.exception.PaymentException
Order. If there's already a PayPal Order we go ahead and make sure the details
of the Order are updated to all of the forms filled out by the customer since they could've updated shipping
information, added a promotion, or other various things to the order.org.broadleafcommerce.common.vendor.service.exception.PaymentException@RequestMapping(value="/create-order",
method=POST)
@ResponseBody
public Map<String,String> createOrder(@RequestParam(value="performCheckout")
Boolean performCheckout)
throws org.broadleafcommerce.common.vendor.service.exception.PaymentException
org.broadleafcommerce.common.vendor.service.exception.PaymentException@RequestMapping(value="/hosted/create-order",
method=POST)
public String createOrderHostedJson(javax.servlet.http.HttpServletRequest request,
@RequestParam(value="performCheckout")
Boolean performCheckout)
throws org.broadleafcommerce.common.vendor.service.exception.PaymentException
org.broadleafcommerce.common.vendor.service.exception.PaymentExceptionprotected String getApprovalLink(com.paypal.orders.Order order)
Copyright © 2021. All rights reserved.