Back

VibeFox PayPal for OpenCart — Help

Requirements

OpenCart: 3.0.x (tested on 3.0.5.0) or 4.0.2 and later (tested on 4.1.0.3).

PHP: 8.0 or later.

PayPal account: a PayPal Business account with a REST API app in the PayPal Developer Dashboard. You need the Client ID and the Secret of the app. Sandbox and live apps have different credentials. No webhook is needed: the extension confirms each payment on your server while the customer is at the checkout.

Currency: one of the currencies PayPal supports: AUD, BRL, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HKD, HUF, ILS, JPY, MXN, MYR, NOK, NZD, PHP, PLN, SEK, SGD, THB, TWD or USD.

VibeFox license key: bought on vibefox.net. One key works on one domain.

Installation

The download is one zip file with the packages for both OpenCart versions. Unpack it on your computer. It contains README.txt, the OpenCart 3 package wcp_paypal_gateway-oc3-(version).ocmod.zip and the OpenCart 4 package wcp_paypal_gateway.ocmod.zip. Install only the package for your OpenCart version. The license key is the same for both versions.

OpenCart 3

1. In the admin go to Extensions > Installer, click Upload and choose the file wcp_paypal_gateway-oc3-(version).ocmod.zip. The extension has no OCMOD modifications, so Extensions > Modifications does not need a refresh. Instead of the installer you can copy the contents of the upload folder of this package into the root folder of your store.

2. Go to Extensions > Extensions and choose the type Payments. Find VibeFox PayPal Gateway and click Install (the green + button). Your admin user needs the right to modify the payment extensions list.

3. Click Edit (the pencil button) to open the settings page. Paste your VibeFox license key into License key in the license block at the top of the page and click Activate (see License key).

4. In the PayPal Developer Dashboard create a REST API app (sandbox and/or live) and copy its Client ID and Secret into the API credentials section.

5. Choose Capture or Authorize, turn on Enable/Disable and click Save.

6. Test with a PayPal sandbox buyer account, then turn off Sandbox mode and enter the live credentials.

OpenCart 4

1. In the admin go to Extensions > Installer, click Upload and choose the file wcp_paypal_gateway.ocmod.zip. Do not rename the file: OpenCart 4 takes the extension code from the file name, and a renamed package does not work.

2. The package appears in the list of installed extensions on the same page. Click Install (the green + button) next to it.

3. Go to Extensions > Extensions and choose the type Payments. Find VibeFox PayPal Gateway, click Install (the green + button), then Edit (the pencil button).

4. Enter the license key, the PayPal credentials and the payment action as in steps 3 to 6 for OpenCart 3. The settings page and its fields are the same in both versions. The extension does not touch the PayPal extension that comes with OpenCart 4: both can be installed in the same store.

A new install starts with the payment method turned off and sandbox mode on.

Configuration

All settings are on the extension page: Extensions > Extensions > Payments > VibeFox PayPal Gateway > Edit. The sections are listed on the left; the Save button under the list saves the whole page. Above the settings the page warns you when the payment method is enabled but the Client ID or Secret of the selected mode is empty, and when PayPal does not support the default currency of the store. In both cases the payment method is hidden at checkout. While sandbox mode is on, the page shows Sandbox mode is on: payments go to the PayPal sandbox, no real money is moved. Without the right to modify the extension the page shows the settings but cannot save them.

When you save, Title must not be empty (up to 128 characters), Sort Order must be a whole number (negative numbers are allowed), Total a number, 0 or greater, and the order statuses must exist. If any check fails, nothing is saved and the page lists the errors. Saving the settings drops the cached PayPal access tokens, so new credentials are used at once.

General

Enable/Disable: Enable PayPal Gateway turns the payment method on or off. Default: off.

Title: the payment method name customers see at checkout. It is also the payment method name stored in the order. Default: PayPal. Required, up to 128 characters.

Description: the text shown to the customer on the Confirm Order step, above the PayPal button. Default: Pay with your PayPal account or a card via PayPal.

Sort Order: the position of PayPal among the payment methods at checkout. Leave it empty or enter a whole number.

Geo Zone: offer PayPal only for payment addresses in the selected geo zone. Default: All zones. Geo zones are set up in System > Localisation > Geo Zones.

Total: the checkout total, in the default currency of the store, that an order must reach before PayPal is offered. Leave it empty to offer PayPal for any total.

API credentials

Create a REST API app in the PayPal Developer Dashboard and copy its Client ID and Secret. The section has links to the sandbox apps and the live apps. Only the fields of the selected mode are shown; the credentials of both modes stay saved.

Sandbox mode: payments go to the PayPal sandbox with the sandbox credentials; no real money is moved. Default: on. Turn it off to accept live payments. Captures, voids and refunds always use the environment the order was paid in. While it is on, customers see Sandbox mode: pay with a PayPal sandbox buyer account — no real money is charged. at the Confirm Order step.

Sandbox Client ID: the Client ID of your sandbox REST API app.

Sandbox Secret: the Secret of your sandbox REST API app.

Live Client ID: the Client ID of your live REST API app.

Live Secret: the Secret of your live REST API app.

Saved secrets are never shown again. The field stays empty and shows Saved — leave empty to keep it. Type a new value only to change it. To remove a saved secret, tick Clear the saved secret on save under the field and click Save.

Payment

Payment action: what happens when the customer approves the payment. Default: Capture.

Capture: the customer is charged immediately and the order gets the Order Status After Payment.
Authorize: the funds are only reserved and the order gets the Authorized Status. Capture or void the payment in the VibeFox PayPal Gateway tab of the order page. PayPal authorizations can be captured within 29 days.

Orders

OpenCart creates the order at the Confirm Order step without a status (a missing order). The order gets a status only after PayPal has answered the capture or authorization on your server. A declined payment leaves the order without a status, and the customer stays at the Confirm Order step. Each field below lists your OpenCart order statuses.

Order Status After Payment: the capture is completed, also when an authorization is captured or a pending capture is completed in the order tab. Default: Processing.

Awaiting Payment Status: the capture is PENDING at PayPal (payment review, funds not cleared yet). Default: Pending.

Authorized Status: payment action Authorize: the funds are reserved, not paid yet. Default: Pending.

On Hold (Review) Status: PayPal took money, but the payment could not be read or the amount or currency does not match the order. A note explains what to check. Default: Pending, because OpenCart has no On hold status. You can create your own statuses in System > Localisation > Order Statuses and select them here.

Voided Status: the authorization was voided in the order tab and the reserved funds were released. Default: Canceled.

Refunded Status: the payment is fully refunded. Partial refunds only add a note. Default: Refunded.

Failed Status: a pending capture was declined by PayPal. Default: Failed.

Advanced

Debug log: logs API requests to wc_plg_debug.log.php in the OpenCart logs folder (storage/logs). The file cannot be opened from the web, and at 5 MB it is moved to wc_plg_debug.old.log.php. Errors and warnings are always logged, even when this switch is off. Credentials, tokens and buyer data are never logged. Default: off.

Log: shows the size and the latest entries of the log. Click Clear log to empty it.

Delete data on uninstall: when on, uninstalling the extension removes the gateway settings and the log. The cached tokens are always removed. Order payment data (PayPal IDs of the orders, refunds) is always kept, so orders paid before can still be refunded, captured or voided after a re-install. Default: off.

Import / Export

Export: Download JSON saves the settings as a JSON file. Secrets are not exported.

Import: paste previously exported JSON and click Import to restore the settings. Saved secrets are kept.

Checkout

At the Payment Method step the customer chooses the payment method (by default PayPal). OpenCart creates the order at the Confirm Order step, still without a status. There the customer sees your description and the PayPal button. A click on the button creates a PayPal order on your server for the order total in the order currency. The amount is always calculated on the server, never in the browser. On OpenCart 4 the customer picks the payment method with the Choose button of the payment method block, in the window Payment method options; the description and the PayPal button then appear in the confirm block at the bottom of the checkout page, with the Confirm Order button.

The customer approves the payment in the PayPal window with a PayPal account or another funding source PayPal offers. The checkout then shows PayPal payment approved. Completing your order… and completes the order by itself. If the customer clicks Confirm Order without approving a payment, the message is Please click the PayPal button and approve the payment first.

Your server then reads the PayPal order and checks that it is approved, that it was created in this checkout, that it does not belong to another order and that its amount and currency match the order. Only then the payment is captured (or authorized). The order is marked paid only after PayPal confirms it. The order then gets its status the standard OpenCart way, with the usual order e-mails and stock update, the cart is emptied and the customer sees the OpenCart order success page.

If the order total changed after the approval, nothing is captured. The customer sees The order total changed after you approved the payment in PayPal. Please click the PayPal button again to approve the new total. If PayPal declines the payment, the order stays without a status and the customer is asked to click the PayPal button and choose another way to pay. If the customer closes the PayPal window, the checkout shows You cancelled the PayPal payment.

If PayPal does not answer during the capture, the customer sees We could not confirm your PayPal payment yet. Please try again in a moment — you will not be charged twice. The approval is kept for this cart, also after a page reload: the checkout shows PayPal payment approved. Click "Confirm Order" to complete it. and Confirm Order uses it again. If PayPal had completed the earlier attempt, that payment is used and a new approval is not captured. If the payment was taken but the order status could not be set, the customer sees Your payment was received, but the order could not be completed automatically. Please contact us — do not pay again. The next attempt sets the status from the stored payment without charging again.

OpenCart 3 creates a new order every time the Confirm Order step is shown, and OpenCart 4 updates the order of the checkout, so the payment belongs to the cart: an approval made for an earlier order of the same cart pays the current order if the total is the same, and a cart that is already paid is never charged again. A change of the cart, including a new quantity, counts as a new cart that needs its own payment. The PayPal script is loaded from PayPal only at the Confirm Order step and in its own namespace, so it does not clash with another PayPal extension on the page.

OpenCart 4 keeps the order in the checkout until the success page is shown. If that order was closed meanwhile (for example you cancelled it or the pending capture was declined), or it was already paid for an earlier cart, the customer sees Your previous order of this checkout is already closed or paid. Please refresh the page and confirm the order again — a new order will be created. After the page reload the next payment pays a new order. A paid order is never shown as paid for a different cart.

The extension has no PayPal webhooks, no Pay Later messages, no card fields, Venmo, Apple Pay, Google Pay or Fastlane, no saved payment methods or subscriptions and no buttons on product or cart pages. The addresses entered in the OpenCart checkout are used, not an address from PayPal.

Orders and refunds

Order statuses

No status (missing order): the customer has not approved the payment, or PayPal declined it. In Sales > Orders such orders are shown only with the filter Order Status set to Missing Orders.

Order Status After Payment (default Processing): the capture is completed. A note shows the amount, the PayPal order and the capture.

Authorized Status (default Pending): the payment was authorized and waits for capture (payment action Authorize).

Awaiting Payment Status (default Pending): the capture is PENDING at PayPal, for example under payment review.

On Hold (Review) Status (default Pending): the paid amount or currency differs from the order, or the payment could not be read from the PayPal answer. The note explains it. Check the order and fulfil it or refund the payment.

Voided Status (default Canceled): the authorization was voided with Void PayPal authorization.

Failed Status (default Failed): a pending capture was declined or failed.

Refunded Status (default Refunded): the payment was fully refunded through the extension.

If a second payment arrives for a cart that is already paid, the paid order is not changed. A note asks you to check it in your PayPal account and refund it.

Notes are entries in the order History that the customer does not see. Status changes made in the order tab (capture, void, status check, refund) are written directly, without notifying the customer and without changing the stock.

VibeFox PayPal Gateway tab

In Sales > Orders open an order paid with PayPal. At the bottom of the order page, next to History and Additional, the VibeFox PayPal Gateway tab shows the PayPal order ID and intent with a Sandbox label for sandbox payments, the Capture ID (linked to the payment in your PayPal account, sandbox or live), the Authorization ID, the payment Status, the Amount, the amounts Paid / refunded, the refund history and the PayPal notes of the order. The tab is shown to users who have access to the extension; its buttons need the right to modify the extension (set in System > Users > User Groups). The result of each action is shown in the tab.

Capture PayPal payment: captures an authorized payment for the order total. A completed capture sets the order to Order Status After Payment. A capture that is still pending sets Awaiting Payment Status. A capture completed for another amount or currency sets On Hold (Review) Status with a mismatch note.
Void PayPal authorization: releases the reserved funds and sets the order to Voided Status.
Check PayPal payment status: reads a PENDING capture again. COMPLETED sets the order to Order Status After Payment, DECLINED or FAILED to Failed Status. A capture completed for another amount or currency sets On Hold (Review) Status with a mismatch note. Otherwise a note shows the current status.

Refunds

In the VibeFox PayPal Gateway tab enter the amount (the amount not refunded yet is filled in), optionally a Reason (optional, sent to the buyer), and click Refund via PayPal. Confirm the question Refund this amount through PayPal? This cannot be undone. Full and partial refunds are supported. The reason is passed to PayPal as a note to the buyer. Refunds are made in the amount and currency PayPal charged, so after an amount or currency mismatch you can refund up to what the customer actually paid, not the order total. The refund is sent to the PayPal environment the payment was made in (sandbox or live), so that environment's credentials must be set. If PayPal does not accept the refund, the tab shows the error and no refund is recorded. A successful refund is added to the refund history and the notes with the PayPal refund ID and status; a PENDING refund is completed by PayPal later. A full refund sets the order to Refunded Status. A partial refund does not change the status.

A payment that is only authorized cannot be refunded: use Void PayPal authorization instead. Product returns in Sales > Returns do not send money back through PayPal. Refunds, disputes and reversals made in your PayPal account are not synced to OpenCart.

License key

The extension works with a VibeFox license key from vibefox.net. The license block License — VibeFox PayPal Gateway is the first block on Extensions > Extensions > Payments > VibeFox PayPal Gateway > Edit, above the settings. Paste the key into License key and click Activate. After that the block shows the key masked, the status (for example the date the license is active until and your domain) and the buttons Check now to check the status again, Change key to enter another key and Remove key to remove the key from this store. Below them are the line Product: opencart-payment-paypal and the link Manage licenses and domains in your account, which opens your vibefox.net account. Only admin users with the Modify permission for the extension can change the key. The texts of the block follow the admin language (English and Russian are included).

If the key is not accepted, the block says why, for example Key not found, This key belongs to another product, Domain limit reached or License expired on a date. After the store address changes, or after you free a domain slot in your account, click Check now. If the license server cannot be reached, the extension keeps working on the last known status.

One key works on one domain: the store address from the OpenCart configuration. Removing the key from the store does not free its domain slot. Free the slot in your vibefox.net account.

Without an active key, PayPal is not shown to customers at checkout. If a payment is started anyway, the shop refuses to create the PayPal order and the customer sees An error occurred during PayPal checkout. Please try again. An admin user who is logged in to the admin in the same browser still sees the payment method in the store, marked (unlicensed — visible to admins only), so you can set up and test the extension before you buy a key. On OpenCart 4 this preview is not available: the store does not see the admin login, so without an active key the payment method is hidden for everybody. After you have opened the Edit page once, a reminder appears on the admin Dashboard. Close it with × to hide it for 7 days. Existing orders are not affected: refunds and the actions of the order tab keep working.

When a license expires, the extension keeps working, but updates and support need a renewal. The status is checked again automatically when you open the admin Dashboard or the Edit page: once a day for the first 14 days after the key is entered, then once a week. No cron job is needed. Uninstalling the extension always removes the license key and license status.

Troubleshooting

PayPal does not appear at checkout: check that the license is active, Enable/Disable is on, the Client ID and Secret of the selected mode are filled in, the order currency is supported by PayPal and the order total is above zero. The settings page shows a warning when credentials or the store currency are the problem. Also check that the payment address is in the selected Geo Zone and that the order reaches the Total set in the settings.

The payment went through, but the order stays without a status: the extension has no webhook, so the payment is confirmed only during the checkout. This happens when PayPal did not answer during the capture or the order status could not be set. Turn on Debug log and look at the Log field, check the payment in your PayPal account, or let the customer try again: a retry never charges twice and sets the status from the stored payment.

PayPal could not be loaded: the PayPal script did not load in the browser, for example because a browser extension blocks www.paypal.com or because of a network problem.

PayPal is not available right now: the credentials are wrong or belong to the other mode. Copy the Client ID and Secret of the right app again.

Your PayPal approval could not be matched to this checkout: the PayPal order was not created in this checkout, for example after the session expired. The customer clicks the PayPal button again.

Your session has expired. Please refresh the page and try again: the checkout page was open too long. The customer reloads the page.

This payment is already being processed: the same cart was submitted twice at the same moment. The customer waits a moment and checks the e-mail before trying again.

The order is in the review or pending status after payment: read the notes in the VibeFox PayPal Gateway tab. The payment was authorized (capture it with Capture PayPal payment), the capture is PENDING at PayPal (use Check PayPal payment status later), or the paid amount or currency did not match the order (fulfil the order or refund what was paid).

Capture of an authorization fails: the authorization may be older than 29 days or already voided. The tab and the notes show the PayPal error.

No buttons in the tab: the tab says why: your user group has no right to modify the extension, the payment is fully refunded, or the Client ID and Secret of the environment the payment was made in are not configured.

Refund fails: the order has no PayPal capture (only an authorization), the amount is more than what is left to refund, or the credentials of the environment the payment was made in are missing. The tab says which.

Uninstall

Go to Extensions > Extensions, choose the type Payments and click Uninstall (the red − button) next to VibeFox PayPal Gateway. The license key and license status of this extension are always removed. OpenCart always removes its own settings of the extension: Enable/Disable, Sort Order, Geo Zone, Total and the order statuses of the Orders section, which return to their defaults on a re-install. The cached PayPal access tokens are always removed. If Delete data on uninstall is on, the other gateway settings (title, description, sandbox mode, credentials, payment action, logging) and the log are removed. If it is off, they are kept for a later re-install. The PayPal transactions and refunds are always kept, so orders paid before can still be refunded, captured or voided after a re-install. Existing orders keep their payment notes.

On OpenCart 4, to remove the files of the extension as well, go to Extensions > Installer after the uninstall and click Uninstall (the orange − button) next to VibeFox PayPal Gateway in the list of installed extensions, then Delete (the red bin button) to remove the uploaded package.

PayPal is a trademark of its respective owner. This extension is not affiliated with or endorsed by PayPal.