|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.broadleafcommerce.common.web.controller.BroadleafAbstractController
org.broadleafcommerce.core.web.controller.checkout.AbstractCheckoutController
org.broadleafcommerce.core.web.controller.checkout.BroadleafCheckoutController
org.broadleafcommerce.vendor.paypal.web.controller.BroadleafPayPalController
public class BroadleafPayPalController
Created with IntelliJ IDEA.
User: elbertbautista
Date: 6/13/12
Time: 4:41 PM
This is a default controller to handle the most common PayPal Express Checkout use cases.
This was created to make integration with PayPal seamless and a matter of configuring your properties file.
For custom implementations, this class should not be used. Re-implement and extend PayPalCheckoutService.
To use, this class must be auto-scanned in your application context.
This controller supports the following:
- Single Payment Type flow using the PayPal Express Checkout API
- Using Broadleaf to collect shipping information (default) or use PayPal to collect shipping information.
- Forward to a verification screen or order confirmation screen upon redirect from PayPal
This controller depends on the following properties being set:
- paypal.return.url = PayPal redirects the user back to here once the customer has completed everything on PayPal's side.
- paypal.order.verify.url = set this property in order to redirect to a Verification Page first before completing checkout
- paypal.order.confirm.url = set this to the location of the confirmation page
- paypal.order.confirm.identifier = this is the request parameter variable that you can pass to the confirmation page so it can look up your order.
- paypal.order.confirm.useOrderNumber = this is a boolean to use order.getOrderNumber() to pass to the confirmation page, otherwise it uses order.getOrderId()
| Field Summary | |
|---|---|
protected PayPalCheckoutService |
payPalCheckoutService
|
| Fields inherited from class org.broadleafcommerce.core.web.controller.checkout.BroadleafCheckoutController |
|---|
baseConfirmationView, cartPageRedirect, checkoutPageRedirect, checkoutView, multishipAddAddressSuccessView, multishipAddAddressView, multishipSuccessView, multishipView |
| Fields inherited from class org.broadleafcommerce.core.web.controller.checkout.AbstractCheckoutController |
|---|
addressService, billingInfoFormValidator, checkoutService, countryService, creditCardPaymentInfoFactory, customerAddressService, customerService, fulfillmentGroupService, fulfillmentOptionService, fulfillmentPricingService, multishipAddAddressFormValidator, orderInfoFormValidator, orderMultishipOptionService, orderService, securePaymentInfoService, shippingInfoFormValidator, stateService |
| Constructor Summary | |
|---|---|
BroadleafPayPalController()
|
|
| Method Summary | |
|---|---|
String |
paypalCheckout(javax.servlet.http.HttpServletRequest request)
The default endpoint to initiate a PayPal Express Checkout. |
String |
paypalProcess(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
String token,
String payerID)
The default endpoint that PayPal redirects to on callback. |
| Methods inherited from class org.broadleafcommerce.core.web.controller.checkout.BroadleafCheckoutController |
|---|
checkout, completeCheckout, completeSecureCreditCardCheckout, convertToSingleship, copyShippingAddressToBillingAddress, getBaseConfirmationView, getCartPageRedirect, getCheckoutPageRedirect, getCheckoutView, getConfirmationView, getMultishipAddAddressSuccessView, getMultishipAddAddressView, getMultishipSuccessView, getMultishipView, hasValidOrderInfo, hasValidShippingAddresses, initBinder, initializeOrderForCheckout, populateExpirationMonths, populateExpirationYears, populateModelWithShippingReferenceData, processFailedOrderCheckout, putFulfillmentOptionsAndEstimationOnModel, saveGlobalOrderDetails, saveMultiship, saveMultishipAddAddress, saveMultiShipInstruction, savePaymentForm, saveSingleShip, showMultiship, showMultishipAddAddress |
| Methods inherited from class org.broadleafcommerce.common.web.controller.BroadleafAbstractController |
|---|
isAjaxRequest |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected PayPalCheckoutService payPalCheckoutService
| Constructor Detail |
|---|
public BroadleafPayPalController()
| Method Detail |
|---|
public String paypalCheckout(javax.servlet.http.HttpServletRequest request)
throws org.broadleafcommerce.core.payment.service.exception.PaymentException
request - - The Http request
org.broadleafcommerce.core.payment.service.exception.PaymentException
public String paypalProcess(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
@RequestParam
String token,
@RequestParam(value="PayerID")
String payerID)
throws org.broadleafcommerce.core.checkout.service.exception.CheckoutException,
org.broadleafcommerce.core.pricing.service.exception.PricingException
request - - The Http requesttoken - - A PayPal variable sent back as a request parameterpayerID - - A PayPal variable sent back as a request parameter
org.broadleafcommerce.core.checkout.service.exception.CheckoutException
org.broadleafcommerce.core.pricing.service.exception.PricingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||