Back

VibeFox PayPlug 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.

Currency and amounts: euro (EUR), from 0.99 to 20,000.00 per payment, the PayPlug defaults. The euro must be enabled in System > Localisation > Currencies and selected by the customer. With another checkout currency or outside these limits the payment method is hidden.

PayPlug account: you need the secret keys of your PayPlug account: the test key (sk_test_...) and/or the live key (sk_live_...). No other keys are needed, and no notification has to be set up in PayPlug. Your store must be reachable from the internet to receive notifications; otherwise orders are confirmed when the customer returns from PayPlug.

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_payplug_gateway-oc3-(version).ocmod.zip and the OpenCart 4 package wcp_payplug_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_payplug_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 PayPlug 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. Paste your secret keys from the PayPlug portal (see Configuration).

5. Turn on Enable/Disable and click Save. Test a payment with Test Mode on, then turn it off to accept real payments.

OpenCart 4

1. In the admin go to Extensions > Installer, click Upload and choose the file wcp_payplug_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 PayPlug Gateway, click Install (the green + button), then Edit (the pencil button).

4. Enter the license key and the PayPlug secret keys as in steps 3 to 5 for OpenCart 3. The settings page and its fields are the same in both versions. Only the notification URL is different (see Notifications).

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

Configuration

All settings are on the extension page: Extensions > Extensions > Payments > VibeFox PayPlug 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 secret key of the current mode is empty, and when the default currency of the store is not EUR. In both cases the payment method is hidden at checkout (with another default currency, while that currency is selected). Without the right to modify the extension the page shows the settings but cannot save them.

When you save, Title must be 1 to 128 characters, Sort Order must be a whole number, Total must be a number of 0 or more and the order statuses must exist; otherwise nothing is saved and the page lists the errors. A secret key in the wrong format is not saved, but the other settings are: the page shows Settings saved, except the secret key shown in red. and, for example, Test Secret Key must start with "sk_test_". The previous value was kept.

Checkout

Enable/Disable: Enable PayPlug 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: PayPlug. Required, up to 128 characters.

Description: the text shown to the customer at the Confirm Order step, above the confirm button. Default: Pay securely by card via PayPlug.

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

Geo Zone: offer PayPlug 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 PayPlug is offered. Leave it empty to offer PayPlug for any total. PayPlug itself accepts 0.99 to 20,000.00 EUR per payment.

API keys

Find your secret keys in the PayPlug portal under Developers > API keys. The section has a link to the portal.

Test Mode: uses the test secret key for new payments. No real payments are processed. Payments made in the other mode keep using the key of their own mode for status checks and refunds. Default: on. While it is on, customers see Test mode: no real payment will be made. at the Confirm Order step.

Test Secret Key: your PayPlug test secret key. It starts with sk_test_.

Live Secret Key: your PayPlug live secret key. It starts with sk_live_.

Saved keys 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 key, tick Clear the saved key on save under the field and click Save.

Notifications

Notification URL: the address the extension sends to PayPlug with every payment. On OpenCart 3 it looks like https://your-store/index.php?route=extension/payment/wcp_payplug_gateway/webhook, on OpenCart 4 like https://your-store/index.php?route=extension/wcp_payplug_gateway/payment/wcp_payplug_gateway.webhook. It is built from the storefront address of your OpenCart installation. Nothing has to be entered in the PayPlug portal. Every notification is checked by reading the payment back from the PayPlug API, so payments are confirmed even when the customer does not return to the store. The URL must be reachable from the internet; otherwise orders are confirmed only when the customer returns from PayPlug.

Orders

OpenCart creates the order at the Confirm Order step without a status (a missing order). The order gets a status only after PayPlug has reported the payment, by the notification or the customer's return; the payment is always read back from PayPlug. Each field below lists your OpenCart order statuses.

Order Status After Payment: the status set after a successful payment, for example Processing or Complete. Default: Processing.

PayPlug Payment On Hold Status: the payment needs your review (see Order statuses). Default: Pending, because OpenCart has no On hold status. You can create your own status in System > Localisation > Order Statuses and select it here.

Payment Error Status: the authorized payment of an order on hold failed or was cancelled. Default: Failed.

Refunded Status: set after the payment is fully refunded from the order page. Default: Refunded.

Advanced

Logging: logs API calls and notifications to ppg_debug.log.php in the OpenCart logs folder (storage/logs). The file cannot be opened from the web. Errors and warnings are always logged. Secret keys, card data and customer 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, the extension settings and its log are deleted when the extension is uninstalled. The PayPlug payment and refund records of the orders are always kept. Default: off.

Import / Export

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

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

Checkout

At the Payment Method step the customer chooses the payment method (by default PayPlug). At the Confirm Order step the customer sees your description and the note You will be redirected to the secure PayPlug payment page to pay by card.; in test mode also Test mode: no real payment will be made. OpenCart creates the order at this step, still without a status. On OpenCart 4 the customer picks the payment method with the Choose button of the payment method block, in the window Payment method options, and clicks Confirm Order at the bottom of the checkout page. When the customer clicks Confirm Order, the extension creates a PayPlug payment for the order total in cents and sends the customer to the PayPlug payment page. The billing and delivery addresses, the e-mail and the language of the order are passed to PayPlug. There the customer pays by card.

After paying, the customer returns to your store. The order is marked paid only after PayPlug confirms it: the extension reads the payment from the PayPlug API when the notification arrives and when the customer comes back. The order then gets its status the standard OpenCart way, with the usual order e-mails and stock update, and the customer sees the OpenCart order success page with Your payment with PayPlug has been received. If the order is on hold, the page says We are confirming your payment with PayPlug. The order will be updated automatically — please do not pay again. If the order is in the payment error status, the page says Your PayPlug payment was not completed. Please contact us about this order. If PayPlug could not be asked when the customer comes back, a Payment confirmation page shows the same "we are confirming" text and a Check again button; the notification sets the order status as soon as it arrives.

If the customer cancels on the PayPlug page, the payment page is closed at PayPlug, so it cannot be paid later by mistake. The customer is back at checkout with a message: You cancelled the PayPlug payment. You can try again or choose another payment method., The PayPlug payment session has expired. Please try again or choose another payment method., The PayPlug payment failed. Please try again or choose another payment method. or, if the payment was left open, Your PayPlug payment was not completed. You can try again or choose another payment method. The cart is kept. On OpenCart 4 these messages are shown above the checkout page.

OpenCart 3 creates a new order every time the Confirm Order step is shown, and OpenCart 4 updates the order of the checkout (a new attempt is a new PayPlug payment for the same order), so the extension looks at the earlier attempts of the same cart first. If one was paid in the meantime, its payment is used without a new one and the customer goes to the success page. If the attempt of this order is still open for the same amount, the same payment page is used again. Otherwise the old page is closed at PayPlug and a new payment is created. A late payment of a closed page is still recorded. A change of the cart, including a new quantity, counts as a new cart that needs its own payment.

OpenCart 4 keeps the order in the checkout until the success page is shown. If that order was closed without a payment meanwhile (for example you cancelled it, or its authorized payment failed), the customer is sent back to the checkout with the message Your previous order was cancelled or refunded. Please confirm the order again to pay with a new order. The next Confirm Order pays a new order. If that order was already paid for an earlier cart and the cart has changed since, the customer is taken back to the checkout, and the next Confirm Order pays a new order of the current cart. A closed order is never shown as paid.

If PayPlug cannot start the payment, the customer stays at the Confirm Order step with a short message, for example PayPlug could not accept your billing details (postcode). Please check them and try again. or The payment provider could not be reached. Please try again in a moment. The technical reason is written to the log.

The notification also works while the store is in maintenance mode, because OpenCart lets payment extension requests through (on OpenCart 4 the extension adds its own startup action for this, which also lets the customer return from PayPlug).

Payments are captured immediately. The extension has no Oney installments, no one-click saved cards, no embedded payment form, no subscriptions and no deferred capture.

Orders and refunds

Order statuses

No status (missing order): the customer was sent to PayPlug and has not paid, or PayPlug has not confirmed the payment yet. In Sales > Orders such orders are shown only with the filter Order Status set to Missing Orders. If the payment fails, the attempt is closed and the customer can pay again.

Order Status After Payment (default Processing): the payment was confirmed. A note shows the PayPlug payment and its mode.

PayPlug Payment On Hold Status (default Pending): the paid amount or currency differs from the order (note amount/currency mismatch); or a test payment was made while the store is in live mode, so no money was received; or the payment arrived after the order had got another status, for example it was cancelled; or a payment is authorized but not captured (capture it in the PayPlug portal, the order is marked paid when PayPlug reports it as paid). The note explains what to check.

Payment Error Status (default Failed): an authorized payment of an order on hold failed or was cancelled. OpenCart notifies the customer of this change.

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

If another order of a cart that is already paid is paid as well, that order stays without a status and the paid order is not changed. A note on the paid order asks you to refund the duplicate payment in the PayPlug portal. A paid or refunded order is never reopened by a later notification.

Notes are entries in the order History that the customer does not see.

VibeFox PayPlug Gateway tab

In Sales > Orders open an order paid with PayPlug. At the bottom of the order page, next to History and Additional, the VibeFox PayPlug Gateway tab shows the PayPlug payment ID with a Test mode label for test payments, the payment Status, the amounts Paid / refunded, the refund form, the refund history (with the mode of each refund) and the PayPlug notes of the order. The tab is shown to users who have access to the extension.

Refunds

In the VibeFox PayPlug Gateway tab enter the Amount (the amount not refunded yet is filled in), optionally a Reason (optional), and click Refund via PayPlug. Confirm the question Refund this amount through PayPlug? This cannot be undone. Full and partial refunds are supported. You need the right to modify the extension (set in System > Users > User Groups). Refunds are made up to the amount PayPlug actually charged, so after an amount mismatch you can refund what the customer paid, not the order total. The refund goes to the payment that actually paid the order, with the secret key of the mode (test or live) it was made in, so that mode's key must be set. If PayPlug 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 PayPlug refund ID and the reason. A full refund sets the order to Refunded Status without notifying the customer and without returning products to stock, like a manual status change. A partial refund does not change the status. Refunds are available once PayPlug has reported the payment as paid.

Product returns in Sales > Returns do not send money back through PayPlug.

Refunds made in the PayPlug portal arrive by notification and are added to the notes once. They are listed in the refund history but are not counted as refunds of the extension and do not change the order status. Record them manually if needed.

License key

The extension works with a VibeFox license key from vibefox.net. The license block License — VibeFox PayPlug Gateway is the first block on Extensions > Extensions > Payments > VibeFox PayPlug 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-payplug 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, PayPlug is not shown to customers at checkout. If a payment is started anyway, the customer sees This payment method is not available. Please choose another one. 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: payments already started are still confirmed, and refunds work.

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

PayPlug does not appear at checkout: check that the license is active, Enable/Disable is on, the current mode has a secret key (Test Secret Key in test mode, Live Secret Key in live mode), the checkout currency is EUR and the order total is between 0.99 and 20,000.00 EUR. Also check that the payment address is in the selected Geo Zone and that the order reaches the Total set in the settings. Developers can change the currencies and limits with the OpenCart events ppg_supported_currencies and ppg_amount_limits (values in cents), and the payment request with ppg_payment_data.

The payment went through, but the order stays without a status: the notification did not reach your store and the customer did not come back. Check that your store is reachable from the internet at the Notification URL shown in the settings, for example that no firewall or password protection blocks it. Turn on Logging and look at the Log field for rejected notifications.

Notification answers Verification failed.: the payment could not be read from the PayPlug API, for example because PayPlug did not answer or the secret key of the payment's mode is not set. The order is not changed, and PayPlug sends the notification again.

Notification answers Temporarily unavailable.: the cart was being updated by another request at the same moment, for example the customer return, or the order status could not be set. PayPlug sends the notification again. The log shows the reason.

Notification answers Unknown payment. or Payment does not belong to the order.: the payment was not created by this store or not for this order, for example a payment of another store on the same PayPlug account. It is ignored.

The notification URL shows Method not allowed. in the browser: this is normal. The URL accepts only requests from PayPlug.

The customer sees an error after Confirm Order: turn on Logging and look at the Log field. A wrong key gives This payment method is temporarily unavailable. Please choose another payment method.; other messages name the billing field PayPlug rejected.

The customer comes back and sees Payment verification failed.: the return link does not match a payment attempt of the order, for example it was opened in another browser. Check the payment in the PayPlug portal; the notification still sets the order status.

Order is on hold after payment: read the notes in the VibeFox PayPlug Gateway tab (see Order statuses), then process the order or refund the payment.

No refund form in the tab: the tab says why: the payment is not paid yet, it is fully refunded, your user group has no right to modify the extension, or the secret key of the payment's mode is not configured.

Refund fails with Unexpected response from PayPlug.: PayPlug answered without a valid refund. Nothing was recorded. Check the refund in the PayPlug portal before trying again.

Uninstall

Go to Extensions > Extensions, choose the type Payments and click Uninstall (the red − button) next to VibeFox PayPlug 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 OpenCart event of the extension is removed too (on OpenCart 4 its events and its startup action, which lets the notification and the customer's return through in maintenance mode). If Delete Data on Uninstall is on, the other settings (title, description, test mode, secret keys, logging) and the log are removed. If it is off, they are kept for a later re-install. The PayPlug payment and refund records are always kept, so orders paid before can still be refunded 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 PayPlug Gateway in the list of installed extensions, then Delete (the red bin button) to remove the uploaded package.

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