Back

VibeFox GoPay 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: GoPay accepts CZK, EUR, PLN, USD, GBP, HUF, RON and BGN. With another checkout currency the payment method is hidden at checkout.

GoPay account: you need the GoID, Client ID and Client Secret of your GoPay merchant account. They are in the integration settings of the account. The sandbox (test) account has its own credentials. Nothing has to be set up in the GoPay account for notifications, but your store must be reachable from the internet.

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_gopay_gateway-oc3-(version).ocmod.zip and the OpenCart 4 package wcp_gopay_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_gopay_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 GoPay 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. Enter the sandbox GoID, Client ID and Client Secret, keep Test Mode on, turn on Enable/Disable and click Save.

5. Place a test order. When everything works, enter the production credentials and turn off Test Mode.

OpenCart 4

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

4. Enter the license key and the GoPay credentials 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 Payment 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 GoPay Gateway > Edit. The sections are listed on the left; the Save button under the list saves the whole page. Above the settings the page shows Sandbox mode — test payments only or Production mode — real payments. It warns you when the GoID, Client ID or Client Secret of the current mode is missing, and when GoPay does not accept the default currency of the store. Without the credentials GoPay is not offered at checkout; with an unsupported default currency it is offered only to customers who switch to a supported currency. Without the right to modify the extension the page shows the settings but cannot save them.

When you save, a field with an invalid value keeps its previous value and the page shows an error; the other fields are saved. This applies to a Title that is empty or longer than 128 characters, a GoID that is not 6 to 20 digits, a Sort Order that is not a whole number, a Total that is not a number of 0 or more, and a geo zone or order status that does not exist. Saving also clears the cached GoPay access tokens, so new credentials are used at once.

GoPay

Enable/Disable: Enable GoPay payment gateway turns the payment method on or off. Default: off.

Title: the payment method title displayed at checkout. It is also the payment method name stored in the order. Default: GoPay. Required, up to 128 characters.

Description: the payment method description shown on the Confirm Order step, above the confirm button. Default: Pay securely via GoPay - cards, wallets, bank transfers.

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

Geo Zone: offer GoPay 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 GoPay is offered. Leave it empty to offer GoPay for any total.

API credentials

GoID, Client ID and Client Secret are shown in your GoPay merchant account (integration settings). The sandbox (test) account has its own credentials. The section links to the GoPay API documentation.

Test Mode: sends payments to gw.sandbox.gopay.com with the sandbox credentials. No real money is charged. Turn it off to accept real payments with the production credentials. Default: on.

Sandbox GoID: the GoID of your GoPay sandbox (test) account.

Sandbox Client ID: the OAuth Client ID of the sandbox account.

Sandbox Client Secret: the OAuth Client Secret of the sandbox account.

Production GoID: your GoPay merchant ID (GoID).

Production Client ID: the OAuth Client ID from GoPay.

Production Client Secret: the OAuth Client Secret from GoPay.

A GoID contains 6 to 20 digits only, for example 8123456789. If you enter something else, the page shows GoID must contain digits only, 6 to 20 digits (for example 8123456789). The previous value was kept.

Saved client 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.

Clear saved client secrets: tick it and click Save to remove both saved client secrets. An empty field keeps the saved value.

Payment

Payment Page Language: the language of the GoPay payment page. Default: Automatic (site language, then billing country). Automatic uses the language of your storefront; if GoPay does not have it, the billing country decides, and English is used otherwise. You can also fix one of 19 languages: Czech, English, Slovak, German, Polish, Hungarian, Romanian, Bulgarian, Croatian, Slovenian, Estonian, Latvian, Lithuanian, French, Italian, Spanish, Portuguese, Ukrainian or Russian.

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

Order Status After Payment: the order status set when the payment is confirmed. Default: Processing. Choose Complete, for example, for virtual products.

GoPay Payment On Hold Status: payments that do not match the order, payments after a cancellation and pre-authorized payments. A note explains why; check the payment in the GoPay account. Default: Pending, because OpenCart has no On hold status. You can create your own status in System > Localisation > Order Statuses and select it here.

Cancelled Order Status: a GoPay payment that arrives for an order in this status (or in the refunded status) puts the order on hold instead of reopening it silently. Default: Canceled.

Refunded Status: set after the payment is fully refunded, from the order page or reported by GoPay. Default: Refunded.

Payment notifications

The notification tells your store that a payment has been made. The Notification URL is shown in this section and is sent to GoPay with every payment, so nothing has to be set up in the GoPay account. On OpenCart 3 it looks like https://your-store/index.php?route=extension/payment/wcp_gopay_gateway/notify, on OpenCart 4 like https://your-store/index.php?route=extension/wcp_gopay_gateway/payment/wcp_gopay_gateway.notify. It is built from the storefront address of your OpenCart installation. It must be reachable from the internet: no password protection or firewall in front of it. It works while the store is in maintenance mode: OpenCart 3 lets payment extension requests through, and on OpenCart 4 the extension adds a startup action that lets the notification and the customer's return from GoPay through.

GoPay notifications carry only the payment ID and no signature. Every notification is verified by asking the GoPay API for the payment state, with the credentials of the mode the payment was made in, and the payment must be one the extension created for an order of your store. When the state cannot be read from GoPay, your store answers with an error and GoPay repeats the notification. Without notifications, an order gets its status only when the customer comes back to the store after paying.

Advanced

Logging: writes GoPay events to gopay_p_debug.log.php in the OpenCart logs folder (storage/logs). The file cannot be opened from the web. Errors and warnings are always logged. Credentials, tokens, card data and the customer's e-mail and name 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, the cached GoPay access tokens and the log. Orders and their GoPay payment data are always kept. Default: off.

Import / Export

Export: Download JSON saves the settings as a JSON file. The client secrets are not exported.

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

Checkout

At the Payment Method step the customer chooses the payment method (by default GoPay). At the Confirm Order step the customer sees your description. OpenCart creates the order at this step, still without a status. When the customer clicks Confirm Order, the extension creates a GoPay payment for the order total in the order currency, with the products, gift certificates, shipping and the other order totals, and sends the customer to the GoPay payment page. There GoPay offers the payment methods enabled on your GoPay account, such as payment cards, bank transfers and wallets. The customer's name, e-mail, phone and payment address are passed to GoPay; empty fields are not sent. The payment shows at GoPay with the order number OC- and the OpenCart order number.

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. OpenCart 4 has no gift certificates, so none are sent to GoPay. By default OpenCart 4 does not ask for a payment address; the extension then passes the name and address of the shipping address to GoPay.

After paying, the customer returns to your store. The order is marked paid only after GoPay confirms it: by the notification or by a request to the GoPay API when the customer returns. A notification and a return arriving at the same moment are handled one after the other, so the payment is applied only once. 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. If the order went to the on hold status, the page adds Your payment is being reviewed. We will contact you if anything else is needed.

If GoPay has not confirmed the payment yet when the customer comes back (for example, a bank transfer is on its way, or GoPay cannot be reached), a Payment confirmation page shows GoPay has not confirmed your payment yet. Your order will be confirmed automatically as soon as the payment is confirmed — please do not pay again. with the buttons Check again and Back to checkout.

If the payment was not completed, was cancelled or has expired, the customer is back at checkout with The GoPay payment was not completed. You can try again or choose another payment method. or The GoPay payment was cancelled or has expired. You can try again or choose another payment method. The cart is kept. On OpenCart 4 these messages are shown above the checkout page. Each new attempt (OpenCart 3 creates a new order every time the Confirm Order step is shown, OpenCart 4 updates the order of the checkout and pays it with a new GoPay payment under the same order number) first checks the open GoPay payments of the cart with the GoPay API. If one of them is already paid, that payment is confirmed and the customer goes to the success page without paying again. 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 or refunded it), the customer is sent back to the checkout with Your previous order was cancelled or refunded. Please confirm the order again. (or the message about the cancelled payment), and the next Confirm Order pays a new order. A paid order is never shown as paid for a different cart.

If GoPay cannot start the payment, the customer stays at the Confirm Order step with a short message above the button, for example GoPay could not accept the payment details. Please check your billing details (e-mail, phone, address) or choose another payment method. or GoPay is temporarily unavailable. Please try again in a moment or choose another payment method. The technical reason is written to the log.

The customer chooses the payment method on the GoPay page; it cannot be chosen in OpenCart. The extension has no subscriptions or recurring payments, no saved cards, no embedded payment form and no capture or void of pre-authorizations from OpenCart.

Orders and refunds

Order statuses

No status (missing order): the customer was sent to GoPay and has not paid, or GoPay has not confirmed the payment yet. A cancelled or expired GoPay payment leaves the order without a status, with a note. In Sales > Orders such orders are shown only with the filter Order Status set to Missing Orders.

Order Status After Payment (default Processing): the payment was confirmed. A note shows the GoPay payment ID.

GoPay Payment On Hold Status (default Pending): GoPay confirmed the payment, but the amount, currency or order number differs from the order; or the payment arrived after the order had been cancelled or refunded; or the payment is only pre-authorized and the money is not captured yet. The note explains it. A pre-authorized payment has to be captured in GoPay; the order then moves to the paid status when GoPay reports the payment as paid.

Refunded Status (default Refunded): the GoPay payment of the order was fully refunded, through the extension or in the GoPay account.

If another payment attempt of an order that is already paid is paid as well, or an older order of the same cart is paid, the paid order is not changed. A note asks you to refund the duplicate in the GoPay account. A similar note is added when a GoPay payment is paid for an order that was already marked as paid without GoPay, for example manually. A cancelled or refunded order is never reopened by a later notification.

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

VibeFox GoPay Gateway tab

In Sales > Orders open an order paid with GoPay. At the bottom of the order page, next to History and Additional, the VibeFox GoPay Gateway tab shows the GoPay payment ID (with a Sandbox label for sandbox payments), the GoPay state and payment instrument, the Payment amount, Paid / refunded, Needs review with the reason when the order is on hold, the refund form, the refund history and the GoPay notes of the order. The tab is shown to users who have access to the extension.

Refunds

In the tab enter the Amount (the amount not refunded yet is filled in), optionally a Reason (optional), and click Refund via GoPay. Confirm the question Refund this amount through GoPay? This cannot be undone. Full and partial refunds are supported. You need the right to modify the extension (set in System > Users > User Groups). GoPay accepts partial refunds only 24 hours after the payment. Refunds are made in the amount and currency GoPay charged, so after an amount or currency mismatch you can refund up to what the customer actually paid. Refunds are available for paid orders and for orders on hold after a mismatch or a late payment. The refund is sent in the mode the payment was made in (sandbox or production), so that mode's credentials must be set. If GoPay refuses the refund, the tab shows GoPay's message and no refund is recorded. A successful refund is added to the refund history and the notes; a refund that GoPay accepted for later processing is noted as accepted. 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.

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

Refunds made in the GoPay account arrive by notification. A full refund changes the order to the refunded status; a partial refund adds a note. They are not added to the refund history of the tab.

License key

The extension works with a VibeFox license key from vibefox.net. The license block License — VibeFox GoPay Gateway is the first block on Extensions > Extensions > Payments > VibeFox GoPay 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-gopay 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, GoPay 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

GoPay does not appear at checkout: check that the license is active, Enable/Disable is on, the current mode has its GoID, Client ID and Client Secret, and the checkout currency is one of CZK, EUR, PLN, USD, GBP, HUF, RON or BGN. The settings page shows a warning when the credentials are missing. 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: GoPay could not reach the notification URL shown in the settings, and the customer did not return to the store. Remove password protection or firewall rules that block the URL. Check that the credentials of the mode the payment was made in are set, because each notification is verified with them. Turn on Logging and look at the Log field. GoPay repeats notifications that did not get a successful answer.

Notification answers Order not found: the payment was not created by this store.

Notification answers Missing payment ID: the request did not come from GoPay or the URL was changed. Nothing needs to be done.

Notification answers Payment state could not be verified: the GoPay API could not be reached or the credentials of that mode are missing or wrong. GoPay repeats the notification.

Notification answers Busy, retry later: the order was being processed by another request at the same moment. GoPay repeats the notification. Turn on Logging to see the reason.

The customer sees an error after Confirm Order: turn on Logging and look at the Log field. Wrong credentials, or credentials of the other mode, are the usual reason. A message about billing details means GoPay did not accept the e-mail, phone or address. This payment method is not available. Please reload the checkout page. means the checkout session no longer matches the order or the payment method was turned off meanwhile.

The customer comes back and sees We could not verify the GoPay payment. If money was charged, please contact us before paying again.: the return link did not match an order of the store, for example it was opened in another browser or changed. Check the payment in the GoPay account; the notification still confirms a real payment.

Test payments do not confirm a live order: sandbox and production are kept apart. Each payment is checked in the mode it was created in. Switch Test Mode to the mode you want and use that mode's credentials.

Order is in the on hold status after payment: read the notes in the VibeFox GoPay Gateway tab. The paid amount or currency differed from the order, the payment came after the order was cancelled, or the payment is only pre-authorized.

Refund fails: read GoPay's message in the tab. A partial refund is possible only 24 hours after the payment. A message about the mode means the payment was made in sandbox or production mode and that mode's credentials are not set. You do not have permission to refund (modify this extension). means your user group has no right to modify the extension.

For developers: before the payment is sent to GoPay, the extension triggers the OpenCart event gopay_p_payment_payload with the payment request and the order.

Uninstall

Go to Extensions > Extensions, choose the type Payments and click Uninstall (the red − button) next to VibeFox GoPay 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 four order status fields, 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 gateway settings (title, description, test mode, credentials, payment page language, logging), the cached GoPay access tokens and the log are removed. If it is off, they are kept for a later re-install. The GoPay payment data of orders and the refunds 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 GoPay Gateway in the list of installed extensions, then Delete (the red bin button) to remove the uploaded package.

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