How to Setup PayPal Express Checkout for OpenCart and Make a Test Transaction in the Sandbox

The purpose of this guide is to provide step-by-step instructions on how to install and configure PayPal Express Checkout extension for OpenCart and complete an end-to-end transaction using PayPal’s Sandbox mode in the PayPal Developer account.

Before you begin, make sure that you have the following set up:

Step 1: Activate PayPal Express Checkout Extension in OpenCart

The latest version of OpenCart comes with PayPal Express Checkout extension pre-installed. The only thing you’ll need to do is to activate and configure it.

In your Admin panel, go to Extensions, and under “Choose the extension type” select “Payments” in the drop-down box. You’ll see a long list of available payment extensions. Scroll down and locate the “PayPal Express Checkout” extension. Click the “Install” button to activate it:

PayPal Express Checkout OpenCart Extension Install
]3 PayPal Express Checkout OpenCart Extension Install

Next, click on the “Edit” button (the blue button to the left of the “Install” button). You’ll be presented with a screen where you can fill out the configuration options.

API Details:

The first tab is “API Details”. You can get them from PayPal:

  1. Log into your PayPal Business account
  2. Go to “Profile”
  3. In the left nav, select “My selling tools”
  4. Find “API access” and click “Update”

    PayPal Business Account Profile API Access
    ]4 PayPal Business Account Profile API Access
  5. In the “NVP/SOAP API integration” section, click on “View API Signature”:

    PayPal Business Account Profile API Access View API Signature
    ]5 PayPal Business Account Profile API Access View API Signature
  6. Click “show” and copy the API Username, API Password, and Signature:

    PayPal Business Account Profile API Access View API Signature Step 2
    ]6 PayPal Business Account Profile API Access View API Signature Step 2
  7. Paste the API credentials into your OpenCart PayPal settings:

    PayPal Express Checkout OpenCart Extension Settings for API
    PayPal Express Checkout OpenCart Extension Settings for API
  8. In the “General” tab, make selections based on your store preferences, for example, your default currency. Don’t forget to set the “Status” field to “Enabled”:

    PayPal Express Checkout OpenCart Extension Settings General
    PayPal Express Checkout OpenCart Extension Settings General
  9. In the “Order Status” tab, make selections as it fits your store, for example:

    PayPal Express Checkout OpenCart Extension Settings Order Status
    PayPal Express Checkout OpenCart Extension Settings Order Status
  10. Optionally, you can add your custom logo at the “Checkout” tab.
  11. When all done, don’t forget to hit the “save” button to save your settings.

Step 2: Activate the Checkout with PayPal Button

Your PayPal extension is all set up, but for the PayPal button to appear on your checkout page, you need to activate it first.

  1. In your OpenCart Admin, go to “Extensions” – “Extensions”, and select “Modules” from the drop-down menu
  2. Scroll down and locate the “PayPal Express Checkout” option, and click “Install”. When installed, click the “Edit” button, and change the Status field to “Enabled”. Click “Save”.
  3. In your OpenCart Admin, go to “Design” – “Layouts”, locate the Checkout layout, and click the “Edit” button:

    PayPal Express Checkout OpenCart Extension Layouts Checkout
    PayPal Express Checkout OpenCart Extension Layouts Checkout
  4.  The fields in this view will look different depending on the theme you use. Locate a position where you want the PayPal button to appear, open up the drop-down and select “PayPal Express Checkout Button” in the long list of options. After that, click the “plus” icon to add the module:The fields in this view will look different depending on the theme you use. Locate a position where you want the PayPal button to appear, and
  5. Next, click the “Edit” icon, and set the Status field to “Enabled”.
  6.  To test, add a product to your cart, and go to the checkout page. You should see the “Check out with PayPal” button. The position of the button will be different depending on your theme and where you decided to place it:

    PayPal Express Checkout OpenCart Extension Shopping Cart Button
    PayPal Express Checkout OpenCart Extension Shopping Cart Button

Step 3: Make a Test Transaction in the Sandbox

  • Go to developer.paypal.com
  • Log into your developer account using your PayPal Business account credentials
  • Click to enter the dashboard (on developer.paypal.com)
  • Find the “Sandbox” section
  • Click the “Accounts” link
PayPal Sandbox Test Accounts Screen
]3 PayPal Sandbox Test Accounts Screen

You will see two pre-configured test accounts:

  1. A seller account (type: business)
  2. A buyer account (type: personal)

You can use these two accounts to simulate a purchase. You can also create a new business or personal test account.

  • Click to expand the business account, and select “Profile”
  • Select the “API Credentials” tab:
PayPal Sandbox Test Business Account API Credentials
]4 PayPal Sandbox Test Business Account API Credentials
  • Copy the username, password, and signature. Go to your OpenCart Administration, Extensions – Payments – PalPal Express Checkout. Click “edit”. In the “API Details” tab, paste the credentials into the Sandbox section:
PayPal Express Checkout OpenCart Extension Settings for Sandbox API
PayPal Express Checkout OpenCart Extension Settings for Sandbox API
  • Go to the “General” tab, and enable the Sandbox mode:
PayPal Express Checkout OpenCart Extension Settings Enable Sandbox
]6 PayPal Express Checkout OpenCart Extension Settings Enable Sandbox

Time to Make a Test Purchase

  • Go to your store, and log out of your administrator account if you are logged in. Add a product to the shopping cart, and proceed to checkout. Select “Checkout with PayPal”.
  • When prompted for login, enter the credentials for the “personal” test account in your Sandbox: “paypal-buyer@yourdomain.com”. Follow the prompts through the checkout process:
PayPal Express Checkout OpenCart Extension Sandbox Step 1
]7 PayPal Express Checkout OpenCart Extension Sandbox Step 1
  • Eventually, you’ll be redirected back to your store, with the option to complete the transaction:
PayPal Express Checkout OpenCart Extension Sandbox Step 2 Confirm Order
]8 PayPal Express Checkout OpenCart Extension Sandbox Step 2 Confirm Order

When you are satisfied with your testing and are ready to start receiving live orders, turn off the “Sandbox” mode in the “General” settings.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top