Documentation Home

PayPal Express Checkout Environment Setup

Prerequisites

Once you have established an account with PayPal, begin by including the PayPal Module dependency to your main pom.xml.

<dependency>
    <groupId>org.broadleafcommerce</groupId>
    <artifactId>broadleaf-paypal</artifactId>
    <version>2.7.0-GA</version>
</dependency>

Make sure to include the dependency in your site AND admin pom.xml as well (or just in the shared core project):

<dependency>
    <groupId>org.broadleafcommerce</groupId>
    <artifactId>broadleaf-paypal</artifactId>
</dependency>

Broadleaf allows you to create your own property files per environment (e.g. common.properties, local.properties, development.properties, integrationdev.properties, integrationqa.properties, staging.properties, and production.properties)
You will need to enter the following key/value pairs in the appropriate locations and replace the "?" with your paypal api account details:

You can also store these configs in the Database by utilizing the blSystemPropertiesService. See the java docs for more details.

Properties File Config

Note - This module comes pre-configured with a Spring MVC controller with URL endpoints to handle:
Enable these with your component scan if you would like to use these in your implementation.

  • /paypal-express/return
  • /paypal-express/cancel

Note - Shipping Display Type

  • gateway.paypal.expressCheckout.shippingDisplayType: (0 - PayPal displays the shipping address passed in, 1 - PayPal does not display the shipping fields at all. (Default), 2 - PayPal will obtain the shipping address from the buyer's profile.)

Production Property Config

Now that you have your environment set up, let's begin setting up the [[PayPal Module]].