VibeFox Autopay 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.
Autopay service: you need the Service ID and Shared key (hash key) of your Autopay service. They are shown in the Autopay merchant portal: portal.autopay.eu for production, testportal.autopay.eu for test. Test services have their own Service ID and Shared key; ask Autopay to open one. The hash function of the service must be SHA-256.
Currency: the order currency must be PLN, EUR, GBP, USD or CZK and accepted by your Autopay service.
Reachable store: Autopay must be able to send notifications to your store, so it must be reachable from the internet without basic authentication or a firewall that blocks POST requests. Maintenance mode does not block the notifications, because OpenCart lets payment extension requests through.
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_autopay_payment-oc3-(version).ocmod.zip and the OpenCart 4 package wcp_autopay_payment.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_autopay_payment-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 the archive into the root folder of your store.
2. Go to Extensions > Extensions and choose the type Payments. Find VibeFox Autopay Payment 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 Service ID and Shared key (test and production) and choose the currencies of your service.
5. In the Autopay portal set the ITN URL, the return URL and the SHA-256 hash function for your service (see Configuration).
6. Turn on Enable/Disable and click Save. Place a test order in test mode, then turn off Test mode for real payments.
OpenCart 4
1. In the admin go to Extensions > Installer, click Upload and choose the file wcp_autopay_payment.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 extension type Payments. Find VibeFox Autopay Payment, click Install (the green + button), then Edit (the pencil button).
4. Enter the license key and the settings as in steps 3 to 6 for OpenCart 3. The settings page and its fields are the same in both versions. Only the ITN and return addresses are different (see ITN and return address).
A new install starts with the payment method turned off, test mode on and PLN as the only currency.
Configuration
All settings are on the extension page: Extensions > Extensions > Payments > VibeFox Autopay Payment > 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 Service ID or Shared key of the selected environment is empty (the payment method is then hidden at checkout) and when the default currency of the store is not selected in Currencies (the payment method is then hidden in that currency). While test mode is on it shows Test mode is on: payments go to the Autopay test environment (testpay.autopay.eu), no real money is taken. Without the right to modify the extension the page shows the settings but cannot save them.
When you save, Title must have 1 to 128 characters, Sort Order must be a whole number, Total must be a number of 0 or more, and a Service ID may contain only letters, digits, hyphens and underscores. If any field has an error, nothing is saved and the page names the field.
Autopay
Enable/Disable: Enable Autopay payment 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: Autopay. Required, up to 128 characters.
Description: the text shown to the customer at the Confirm Order step, above the confirm button. Default: Pay online by bank transfer, BLIK or card. You will be redirected to the secure Autopay payment page.
Sort Order: the position of Autopay among the payment methods at checkout. Leave it empty or enter a whole number.
Geo Zone: offer Autopay 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 Autopay is offered. Leave it empty to offer Autopay for any total.
Autopay service
The Service ID and Shared key are shown in the Autopay merchant portal (portal.autopay.eu or testportal.autopay.eu, linked in this section).
Test mode: uses the Autopay test environment (testpay.autopay.eu) and the test credentials below. Default: on. Turn it off to accept real payments on pay.autopay.eu with the production credentials. While it is on, customers see Test mode: no real payment is taken. at the Confirm Order step.
Service ID (production): the numeric service identifier from portal.autopay.eu.
Shared key (production): the hash key of the production service. Keep it secret.
Service ID (test): the numeric service identifier from testportal.autopay.eu.
Shared key (test): the hash key of the test service.
Saved Shared 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.
Currencies: the currencies your Autopay service accepts: PLN, EUR, GBP, USD, CZK. Autopay usually opens a separate service per currency. The payment method is offered only when the checkout currency is selected here. Default: PLN.
ITN and return address
Enter these addresses in the Autopay portal for your service, for production and for test. The exact addresses are shown in the Addresses field of this section and are built from the storefront address of your OpenCart installation:
These are the OpenCart 3 addresses. On OpenCart 4 they are:
Copy the addresses exactly as the settings show them. Without the ITN URL orders are never confirmed: OpenCart keeps the order without a status until Autopay confirms the payment. Each ITN is checked with the SHA-256 hash made with the Shared key of the service named in the notification. Notifications without a valid hash or for an unknown Service ID are rejected. A notification is applied to an order only if its payment was started with the same Autopay service, so a test notification never confirms a production payment. Notifications for payments started before you switched Test mode are still verified with the right key, as long as both credentials stay saved.
The extension handles these payment statuses in the ITN:
Orders
OpenCart creates the order at the Confirm Order step without a status (a missing order). The order gets a status only when Autopay confirms the payment (ITN SUCCESS). A failed or abandoned payment leaves it without a status. On OpenCart 4 an unpaid order of the checkout can get the status Voided, which OpenCart 4 sets when the customer comes back to the Confirm Order step; the extension treats such an order as an order without status, and a later ITN SUCCESS still marks it paid. Each field below lists your OpenCart order statuses.
Order Status After Payment: the status set when Autopay confirms the payment with the expected amount and currency. Default: Processing.
On Hold Status: the paid amount or currency differs from the order, or the payment arrived after the order status had been changed (for example cancelled). The order is not marked as paid; a note explains why. Default: Pending, because OpenCart has no On hold status. You can create your own status in System > Localisation > Order Statuses and select it here.
Advanced
Logging: writes payment events to wc_ap_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_ap_debug.old.log.php. Keys and customer data are never logged. Default: off. Nothing is written while it is off, errors included.
Log: shows the size and the latest entries of the log. Click Clear log to empty it.
Import / Export
Export: Download JSON saves the settings as a JSON file. Shared keys are not exported.
Import: paste previously exported JSON and click Import to restore the settings. Saved Shared keys are kept.
Checkout
At the Payment Method step the customer chooses the payment method (by default Autopay). At the Confirm Order step the customer sees your description and the note You will be redirected to the secure Autopay payment page to complete the payment. OpenCart creates the order at this step, still without a status. When the customer clicks Confirm Order, the browser sends a signed payment form to Autopay with the order total in the order currency, the OpenCart order number as the OrderID, the description Order and the number, and the customer's e-mail. On the Autopay page the customer chooses the payment method and pays.
The order is marked paid only after Autopay confirms it with a signed ITN and the amount and currency match the order. The order then gets its status the standard OpenCart way, with the usual order e-mails and stock update. After paying, the customer returns to your store. The return address is signed, but it never changes an order. If the order already has a status, the customer sees the OpenCart order success page. If the ITN has not arrived yet, a Payment confirmation page shows Thank you. Your payment is being confirmed by Autopay — your order is confirmed as soon as Autopay reports the payment, and you will receive an e-mail. with the buttons Check again and Back to checkout.
If Autopay reported a failed payment, the customer is back at checkout with The payment was not completed. You can try again or choose another payment method. The cart is kept. Each new attempt creates a new OpenCart order (on OpenCart 4 the customer pays the same order again, with a new attempt under the same OrderID). If another order of the same cart (the same products in the same visit) has already been paid, the customer goes to the success page instead of paying again. A new purchase after a completed one is a new cart and is paid normally. If the payment cannot be started, the customer stays at the Confirm Order step with a short message above the button, for example Autopay payments are not configured. Please choose another payment method or contact the store. or that Autopay cannot accept payments in this currency.
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. The message about a payment that was not completed is shown above the checkout page. OpenCart 4 keeps one order for the checkout and updates it. If that order was closed by the store meanwhile (for example you cancelled it), the customer is sent back to the checkout with The payment was not completed. You can try again or choose another payment method., or, if the order had been paid through Autopay, with Your previous order was closed by the store. Please confirm the order again: the cart will be paid with a new order. If the order of the checkout is already paid for a different cart, the message is Your previous order is already paid. Please confirm the order again: the cart will be paid with a new order. The next Confirm Order pays a new order. A change of the cart, including a new quantity, counts as a new cart that needs its own payment. The ITN also works while the store is in maintenance mode: on OpenCart 4 the extension adds a startup action for this.
The extension has no refunds from OpenCart, no subscriptions or recurring payments, no saved cards, no BLIK code or card form on the checkout page, no choice of bank or payment channel on the checkout page, and it uses one Service ID per environment.
Orders
Order statuses
No status (missing order): the customer was sent to Autopay and has not paid, the payment failed, or Autopay has not confirmed the payment yet. In Sales > Orders such orders are shown only with the filter Order Status set to Missing Orders.
Order Status After Payment (default Processing): Autopay confirmed the payment and the amount and currency match. A note shows the amount, the Autopay transaction ID (remoteID) and the payment date.
On Hold Status (default Pending): Autopay reported a different amount or currency than the order total. The order is not marked as paid. Check the transaction in the Autopay portal and complete or refund it manually. A later correct notification for this order marks it paid. The same status is used when a payment arrives for an order whose status you had changed meanwhile, for example cancelled: a note asks you to check stock and fulfil the order, or refund the payment.
A paid order is never changed by a later failure notification. If Autopay reports another successful payment for a paid order, or a second order of the same cart is paid, a note warns that the customer may have paid twice. A notification for a payment started with another Autopay service is not applied, and a note explains it. Notes are entries in the order History that the customer does not see.
VibeFox Autopay Payment tab
In Sales > Orders open an order paid with Autopay. At the bottom of the order page, next to History and Additional, the VibeFox Autopay Payment tab shows the OrderID at Autopay, the Service ID and environment with a Test mode label for test payments, the Amount, the Payment attempt status, the Autopay transaction ID and the Autopay notes of the order. The tab is read only and is shown to users who have access to the extension.
Refunds
Refunds through Autopay are not supported. Refund the payment in the Autopay portal, then update the order in OpenCart manually.
License key
The extension works with a VibeFox license key from vibefox.net. The license block License — VibeFox Autopay Payment is the first block on Extensions > Extensions > Payments > VibeFox Autopay Payment > 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-autopay 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, Autopay 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.
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
Autopay does not appear at checkout: check that the license is active, Enable/Disable is on, the selected environment has a Service ID and Shared key, and the checkout currency is selected in Currencies. The settings page shows a warning when one of these is 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: Autopay did not deliver the ITN, or the store rejected it. Check that the ITN URL shown in the settings is set for the service in the Autopay portal (production or test), that the hash function is SHA-256 and that the Shared key in the extension matches the service. Check that the store is reachable from the internet. Turn on Logging and look at the Log field on the extension page.
The log shows ITN rejected: invalid hash: the Shared key does not match the service, or the hash function of the service is not SHA-256.
The log shows that the service ID is not configured: the notification came from a service whose Service ID is not entered in the extension, or whose Shared key is empty.
The log shows could not lock the order, Autopay will retry: the order was being processed by another notification at the same moment. The store answers so that Autopay sends the notification again.
The ITN URL shows METHOD_NOT_ALLOWED in the browser: this is normal. The URL accepts only POST requests from Autopay.
The order is in the on-hold status with a mismatch note: Autopay reported a different amount or currency than the order total. Check the transaction in the Autopay portal and complete or refund the order manually.
A note says the notification was NOT applied: the payment for this order was not started with this Autopay service, for example a test notification for a production order. Check the transaction in the Autopay portal.
After paying, the customer lands on the home page: the return address could not be verified, for example because the Service ID is not entered in the extension. The order is not affected; it follows the ITN.
The customer sees This payment method is not available. Please reload the checkout page.: the checkout session no longer matches the order, or the payment method was turned off or lost its credentials meanwhile. The customer reloads the checkout.
For developers: before the payment form is signed, the extension triggers the OpenCart event wc_ap_payment_params with the form parameters and the order; the service, order number, amount and currency cannot be changed by it.
Uninstall
Go to Extensions > Extensions, choose the type Payments and click Uninstall (the red − button) next to VibeFox Autopay Payment. The license key and license status of this extension are always removed. OpenCart removes its own settings of the extension: Enable/Disable, Sort Order, Geo Zone, Total and the order statuses of the Orders section. The extension always removes the other gateway settings, including the Service IDs and Shared keys, and the log. It has no option to keep the settings. On OpenCart 4 the events of the extension and its startup action, which lets the ITN through in maintenance mode, are removed too. The Autopay payment records are always kept. 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 Autopay Payment in the list of installed extensions, then Delete (the red bin button) to remove the uploaded package.
Autopay is a trademark of its respective owner. This extension is not affiliated with or endorsed by Autopay.
