VibeFox PayU India 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: Indian Rupee (INR). PayU India charges in rupees only. Your store needs the INR currency (System > Localisation > Currencies). For orders in other currencies the payment method is hidden at checkout.
Phone number: PayU requires a phone number for every payment. Keep the Telephone field in your checkout so that the order has one. The OpenCart 4 checkout does not ask for a telephone by default: when the order has no phone number, the extension shows its own Phone field at the confirm step (see Checkout).
PayU India account: you need the Merchant Key and Merchant Salt (v1) from PayU Dashboard > Payment Gateway > Key Salt Details. Switch the dashboard to Test Mode to see the test pair. Use Salt v1, not Salt v2.
Internet access to your store: needed for the optional webhook. Without it, orders are confirmed when the customer returns from PayU.
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_payu_india_payment-oc3-(version).ocmod.zip and the OpenCart 4 package wcp_payu_india_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_payu_india_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 this package into the root folder of your store.
2. Go to Extensions > Extensions and choose the type Payments. Find VibeFox PayU India Payment 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 Test Merchant Key and Salt and the Live Merchant Key and Salt (see Configuration).
5. Recommended: in PayU Dashboard > Webhooks, add the webhook URL shown on the settings page for successful and failed payments.
6. Choose the Mode, turn on Enable/Disable and click Save. Test a payment in Test mode, then switch to Live.
OpenCart 4
1. In the admin go to Extensions > Installer, click Upload and choose the file wcp_payu_india_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 type Payments. Find VibeFox PayU India Payment Gateway, click Install (the green + button), then Edit (the pencil button).
4. Enter the license key, the PayU credentials and the webhook as in steps 3 to 6 for OpenCart 3. The settings page and its fields are the same in both versions. Only the return and webhook URLs are different (see Return and webhook URLs).
A new install starts with the payment method turned off and the Test mode selected.
Configuration
All settings are on the extension page: Extensions > Extensions > Payments > VibeFox PayU India Payment 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 key or salt of the current mode is missing, shows Test mode is active: payments go to test.payu.in and no real money is charged. in Test mode, and shows an error when the default currency of your store is not INR: the gateway is then shown at checkout only when the customer pays in INR. Without the right to modify the extension the page shows the settings but cannot save them.
When you save, Title must not be empty or longer than 128 characters, Sort Order must be a whole number (negative numbers are allowed), Total must be a number, 0 or greater, and the geo zone and order statuses must exist; otherwise nothing is saved. Spaces and line breaks are removed from keys and salts, because a salt with a pasted space would make every PayU response fail the check. If the payment method is enabled without the key and salt of the current mode, the page warns you after saving.
PayU India
The section starts with a short note: cards, NetBanking, UPI and wallets on the PayU hosted checkout page, results accepted only with a valid PayU signature, rupees only.
Enable/Disable: Enable PayU India Payment Gateway turns the payment method on or off. Default: off.
Title: the payment method title the customer sees during checkout. It is also the payment method name stored in the order. Default: PayU India. Required, at most 128 characters.
Description: the text shown to the customer at the Confirm Order step, above the confirm button. Default: Pay securely via Credit/Debit Card, NetBanking, UPI, or Wallets through PayU.
Sort Order: the position of PayU India among the payment methods at checkout. Leave it empty or enter a whole number.
Geo Zone: offer PayU India 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 PayU India is offered. Leave it empty to offer PayU India for any total.
API credentials
Copy the Merchant Key and Merchant Salt (v1) from PayU Dashboard > Payment Gateway > Key Salt Details. Switch the dashboard to Test Mode for the test pair. The section has a link Open the PayU Dashboard.
Mode: which PayU environment new payments use.
Payments already started keep the mode they were started in: their results are checked and their refunds are sent with the key and salt of that mode, even after you switch the mode.
Live Merchant Key: your live PayU Merchant Key.
Live Merchant Salt (v1): your live PayU Merchant Salt (v1). It signs requests and verifies PayU responses. Keep it secret.
Test Merchant Key: your PayU test Merchant Key, used in Test mode only.
Test Merchant Salt (v1): your PayU test Merchant Salt (v1), used in Test mode only.
Saved salts 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 salt, tick Clear the saved salt on save under the field and click Save.
Return and webhook URLs
Return URL: on OpenCart 3 it looks like https://your-store/index.php?route=extension/payment/wcp_payu_india_payment/back, on OpenCart 4 like https://your-store/index.php?route=extension/wcp_payu_india_payment/payment/wcp_payu_india_payment.back. It is sent to PayU automatically with every payment; nothing has to be configured.
Webhook URL: on OpenCart 3 it looks like https://your-store/index.php?route=extension/payment/wcp_payu_india_payment/webhook, on OpenCart 4 like https://your-store/index.php?route=extension/wcp_payu_india_payment/payment/wcp_payu_india_payment.webhook. Optional, but recommended: it confirms payments even if the customer closes the browser before returning. Add it in PayU Dashboard > Webhooks for successful and failed payments. Copy the URL exactly as the settings page shows it. It must be reachable from the internet (no basic auth or firewall block). The maintenance mode of the store does not block it.
The webhook carries the same signed result as the customer's return. Webhooks without a valid PayU hash are rejected.
Orders
OpenCart creates the order at the Confirm Order step without a status (a missing order). The order gets a status only after PayU has sent a correctly signed result. A failed or cancelled payment leaves the order without a status, and the customer goes back to checkout with the cart kept. Each field below lists your OpenCart order statuses.
Order Status After Payment: a successful payment with the expected amount in INR, confirmed by verify_payment when Verify Payment is on. Default: Processing.
Awaiting PayU Payment Status: PayU reports the payment as pending (UPI collect, NetBanking in progress). The order gets the status after payment when PayU confirms it. Default: Pending.
On Hold (Review) Status: PayU reported a successful payment that needs a manual 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: a pending payment that PayU then reported as failed. Default: Failed.
Refunded Status: set when everything paid has been refunded from the order page. Default: Refunded.
Cancelled Order Status: the status your store uses for cancelled orders. A payment received for such an order puts it on review instead of marking it paid. The extension never sets this status. Default: Canceled.
Advanced
Verify Payment: double-checks every successful payment with the PayU verify_payment API. Recommended. If the check cannot be completed, the order is put on review instead of being marked paid. Default: on.
Enable Logging: logs gateway events for troubleshooting to payu_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; this option adds the other events, such as every payment form and PayU result. Keys, salts and customer personal 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: deletes the gateway settings and the log when the extension is uninstalled. Orders and PayU transaction records are never deleted. Default: off.
Import / Export
Export: Download JSON saves the settings as a JSON file. The salts are not exported.
Import: paste previously exported JSON and click Import to restore the settings. The saved salts are kept.
Checkout
At the Payment Method step the customer chooses the payment method (by default PayU India). At the Confirm Order step the customer sees your description; 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. If the order has no phone number, the confirm block of OpenCart 4 also shows the field Phone with the hint PayU India requires the phone number of the payer. The number entered there is sent to PayU and kept for the next attempt; a phone number of the order takes precedence. When the customer clicks Confirm Order, the extension checks the currency, the credentials of the current mode and the phone number of the order. Without a phone number the customer stays at the step with PayU India requires a phone number. Please enter your phone number and try again. Otherwise the extension builds a signed payment request for the order total in INR and the browser sends it to the PayU hosted checkout at once. The page shows You will be redirected to PayU to complete your payment. and a Pay with PayU button in case the browser does not continue by itself. On the PayU page the customer pays by card, NetBanking, UPI or wallet.
Every click on Confirm Order starts a new attempt with its own PayU transaction ID (txnid) that starts with the order number, stored with its amount and mode. OpenCart 3 creates a new order every time the Confirm Order step is shown, OpenCart 4 updates the order of the checkout, so there a new attempt pays the same order. A payment made in an older open payment page of the same order is still accepted. If another order of the same cart was already paid, is awaiting PayU or is on review, the customer goes straight to the success page and no new payment form is built. A change of the cart, including a new quantity, counts as a new cart that needs its own payment.
PayU sends the result back with the customer and, if configured, by webhook. A result is accepted only with a valid PayU hash made with the key and salt of the mode in which the payment was started, and only for a transaction ID issued for that order. With Verify Payment on, a successful result is also checked with the PayU verify_payment API. The paid amount must equal the amount of the attempt and the order total to the paisa, in INR. The order is marked paid only after PayU confirms it this way, and then gets its status the standard OpenCart way, with the usual order e-mails and stock update. The extension handles these PayU results:
After a successful or pending payment the customer sees the OpenCart order success page. A pending payment adds Your PayU payment is pending. The order will be updated as soon as PayU confirms the result — there is no need to pay again., an order on review adds Your payment is being reviewed. We will contact you if anything else is needed., and an unpaid order in the payment error or cancelled status shows Your PayU payment was not completed. Please contact us about this order.
After an unsuccessful payment the customer comes back to the checkout with a message: Payment was not completed. Please try again or choose a different payment method., Payment was cancelled. You may try again. or, when the result could not be checked, We could not confirm the payment result. If your account was charged, please contact us before paying again. If the result is still being processed when the customer comes back, a page shows We are confirming your PayU payment. If you completed the payment, your order will be updated shortly — please do not pay again. with Check again and Back to checkout. On OpenCart 4 the checkout messages are shown above the checkout page.
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 its pending payment failed or you cancelled it), the customer is sent back to the checkout with Your previous order was cancelled or its payment failed. Please confirm the order again. If it was paid and then cancelled or refunded by the store, the message is Your previous order was cancelled or refunded by the store. Please confirm the order again to pay with a new order. If it was paid for an earlier cart and the cart has changed since, the message is Your previous order has already been paid. Your cart has changed since — please confirm the order again to pay for the current cart. The next Confirm Order pays a new order. A closed order is never shown as paid.
The webhook 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 PayU).
The extension charges in INR only and has no multi-currency processing (MCP). It has no saved cards or tokenization, no subscriptions, no on-site (seamless) card form, no EMI or offer management and no PayU one-click checkout.
Orders and refunds
Order statuses
No status (missing order): the customer was sent to PayU and has not paid, or the payment failed or was cancelled. 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 PayU payment successful. Transaction ID: …, Mode: …, Bank: …
Awaiting PayU Payment Status (default Pending): a UPI or NetBanking payment is still pending at PayU. The order gets the paid status when PayU confirms it.
On Hold (Review) Status (default Pending): the paid amount or currency differs from the order, the verify_payment API could not be reached or did not confirm the payment yet, or a payment arrived for an order in the Cancelled Order Status. The note tells the reason. Check the transaction in the PayU Dashboard, then set the paid status or cancel the order and refund the payment. When only the verification failed, the order is paid automatically on the next delivery of the result.
Payment Error Status (default Failed): a pending payment was declined or cancelled later. A later successful result still pays the order.
Refunded Status (default Refunded): everything paid was refunded through the extension.
If PayU reports another successful payment for an order that is already paid, the order is not changed and a note asks you to refund the duplicate in the PayU Dashboard. A payment for another order of the same cart that is already paid leaves that order without a status, with a note on the paid order. A PayU payment for an order switched to another payment method only gets a note.
Notes are entries in the order History that the customer does not see.
VibeFox PayU India Payment Gateway tab
In Sales > Orders open an order paid with PayU India. At the bottom of the order page, next to History and Additional, the VibeFox PayU India Payment Gateway tab shows the PayU transaction ID (mihpayid), the Store transaction ID (txnid), the Environment with a Test mode badge for test payments, the PayU Status, the payment Mode / bank, the amounts Paid / refund requested (INR), the refund form, the refund history and the PayU notes of the order. For an order on review it shows a reminder to review the payment. The tab is shown to users who have access to the extension.
Refunds
In the VibeFox PayU India Payment Gateway tab enter the Amount (the amount not refunded yet is filled in), optionally a Reason (optional), and click Refund via PayU. Confirm the question Refund this amount through PayU? This cannot be undone. Full and partial refunds are supported; the amount must be greater than zero and not more than the rest of what PayU charged. You need the right to modify the extension (set in System > Users > User Groups). The refund is sent through the PayU refund API with the key and salt of the mode the payment was made in, so those credentials must be set. Only one PayU request per order runs at a time. If PayU rejects the refund, the tab shows PayU refund failed: with PayU's message and no refund is recorded.
PayU queues refunds and completes them asynchronously; the customer usually receives the money in 5–7 working days. The refund history and the notes show the amount, the PayU request ID and the reason. A full refund sets the order to the 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 PayU has reported the transaction ID of the payment. The extension does not check the refund status later.
Product returns in Sales > Returns do not send money back through PayU. Refunds made in the PayU Dashboard are not synchronised back to OpenCart.
License key
The extension works with a VibeFox license key from vibefox.net. The license block License — VibeFox PayU India Payment Gateway is the first block on Extensions > Extensions > Payments > VibeFox PayU India Payment 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-payu-india 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, PayU India 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
PayU India does not appear at checkout: check that the license is active, Enable/Disable is on and the key and salt of the selected Mode are filled in. Check that the customer pays in INR, that the payment address is in the selected Geo Zone and that the order reaches the Total set in the settings. The settings page shows a warning for missing credentials and a store currency other than INR.
The payment went through, but the order stays without a status: the customer did not come back to the store, and no webhook arrived. Add the webhook URL from the settings page in PayU Dashboard > Webhooks for successful and failed payments, and make sure it is reachable from the internet.
Webhook answers invalid_signature: the PayU hash did not match. Check that the key and salt of the payment's mode are correct and that Salt v1 is used, not Salt v2. A result of a live payment signed with the test salt, or the other way round, is rejected too. Nothing is changed.
Webhook answers not_configured: the key or salt of the mode in which the payment was started is missing. Enter them; PayU retries the webhook.
Webhook answers verify_unavailable: the verify_payment API could not confirm the payment yet. The order is on review, and the next delivery verifies again.
Webhook answers busy or retry: the customer's return of the same cart was being processed at the same moment, or the order status could not be set. PayU retries the webhook. The reason is written to the log.
Webhook answers ignored_unknown_txnid: the transaction was not started by this store, for example another store using the same PayU account. Nothing is changed.
The customer sees PayU India requires a phone number: the order has no telephone number. Keep the Telephone field in your checkout. On OpenCart 4 the customer can enter the number in the Phone field of the confirm block.
The customer sees This payment method is not available. Please reload the checkout page.: the payment method was turned off meanwhile, the credentials are missing, or the checkout no longer matches the order. The customer reloads the checkout.
The order is in the review status: read the notes in the VibeFox PayU India Payment Gateway tab. The reason is an amount or currency mismatch, a failed or pending verification, or a payment for a cancelled order.
Refund fails: PayU transaction ID not found for this order. means the order has no PayU payment yet. This payment was made in Test mode, but the Merchant Key/Salt of that mode are not set. (or Live mode) means you must enter the credentials of that mode first. Invalid refund amount: at most … INR can be refunded. means the amount is more than the rest of the payment.
Too little in the log: errors and warnings are always written; turn on Enable Logging to see every payment form and PayU result as well.
For developers: before the payment request is signed, the extension triggers the OpenCart event payu_p_request_fields with the request fields and the order. The key, transaction ID, amount and return URLs cannot be changed by it.
Uninstall
Go to Extensions > Extensions, choose the type Payments and click Uninstall (the red − button) next to VibeFox PayU India Payment 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 webhook and the customer's return through in maintenance mode). If Delete data on uninstall is on, the other gateway settings (title, description, mode, keys, salts, verify payment, logging) and the log are removed. If it is off, they are kept for a later re-install. The PayU transaction records and refund requests 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 PayU India Payment Gateway in the list of installed extensions, then Delete (the red bin button) to remove the uploaded package.
PayU is a trademark of its respective owner. This extension is not affiliated with or endorsed by PayU.
