VibeFox 2C2P for PrestaShop — Help
Requirements
PrestaShop: 8.0 to 9.x.
PHP: 8.0 or later. The module refuses to install on older PHP versions.
2C2P account: you need the Merchant ID and Secret Key of your 2C2P merchant account. They are issued by 2C2P when your merchant account is opened. Sandbox and live accounts have different keys. Developer documentation and sandbox test cards are on developer.2c2p.com.
Currency: the cart currency must be supported by the module and enabled on your 2C2P account. Supported are, among others, THB, SGD, MYR, PHP, IDR, VND, MMK, KHR, LAK, CNY, HKD, TWD, JPY, KRW, INR, AUD, NZD, USD, EUR and GBP. If the cart currency is not supported, the payment method is hidden at checkout.
VibeFox license key: bought on vibefox.net. One key works on one domain.
Installation
1. In the back office go to Modules > Module Manager and click Upload a module. Choose the module ZIP file.
2. When the upload finishes, click Configure, or find VibeFox 2C2P Payment in the module list later and click Configure.
3. Paste your VibeFox license key into License key in the license block at the top of the Configure page and click Activate (see License key).
4. Enter your sandbox Merchant ID and Secret Key, turn on Enable/Disable, click Save and place a test order.
5. When you are ready, enter the live credentials and turn off Sandbox Mode.
On install the module creates two order statuses, Awaiting 2C2P payment and 2C2P payment on hold. PrestaShop offers a new payment module for all currencies, countries and customer groups. You can limit them in Payment > Preferences. The return and notification URLs are sent with every payment. Nothing has to be configured in the 2C2P portal.
Configuration
All settings are on the module page: Modules > Module Manager > VibeFox 2C2P Payment > Configure. Each section has its own Save button, which saves the whole page. Above the fields the page shows Sandbox mode is active. No real transactions will be processed. while sandbox mode is on. It warns you when the gateway is enabled but the Merchant ID or Secret Key of the current mode is empty, and when the default currency of the shop is not supported. In both cases the payment method is hidden at checkout. When you save with Sandbox Mode off, the module shows Please enter your live Merchant ID. or Please enter your live Secret Key. if a live field is empty. The settings are saved anyway.
2C2P
Enable/Disable: Enable 2C2P 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: 2C2P Payment.
Description: the text shown under the payment method at checkout. Default: Pay securely via credit/debit card, e-wallet, or internet banking through 2C2P. In sandbox mode (TEST MODE) is added to it.
Test mode (sandbox)
Sandbox Mode: sends payments to the 2C2P sandbox (demo2.2c2p.com) with the sandbox credentials below. Default: on. Turn it off to take real payments.
Sandbox Merchant ID: your sandbox 2C2P Merchant ID.
Sandbox Secret Key: your sandbox 2C2P Secret Key.
Live API Credentials
Used when sandbox mode is off.
Merchant ID: your live 2C2P Merchant ID.
Secret Key: your live 2C2P Secret Key. The key is saved exactly as entered, including quotes and backslashes.
Saved Secret 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.
Clear saved secrets: tick Sandbox Secret Key or Secret Key and click Save to remove it. An empty field keeps the saved value.
Results are always checked with the Merchant ID and Secret Key of the mode the payment was made in. A payment started in sandbox mode is still verified with the sandbox key after you switch to live, and a result signed with the key of the other mode is rejected.
Payment page
Result URLs: shows, for reference, the Frontend return URL and the Backend notification URL. With friendly URLs they look like https://your-shop/module/wcp_2c2p_payment/return and https://your-shop/module/wcp_2c2p_payment/notify, possibly with a language code such as /en/. They are sent with every payment automatically.
Payment Page Language: the language of the 2C2P payment page. Default: English.
Redirect API version: keep 8.5 unless 2C2P told you that your account still uses the old version 7.0 (SHA-1 signatures). Results of payments started before a switch are still verified.
Order ID prefix: optional, letters and digits only (max 10), for example SHOP1. 2C2P rejects an order ID it has already seen. Set a unique prefix when several shops share one 2C2P account, and in the sandbox, where test merchant accounts are shared. Other characters are removed when you save, with a warning.
Advanced Settings
Enable Logging: writes 2C2P events to logs/tc2p_p_debug.log.php in the module folder. The file cannot be opened from the web. No card data, secret keys, customer e-mails or payment tokens are 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.
Delete Data on Uninstall: when on, uninstalling the module removes the gateway settings and the log. The 2C2P transactions, orders and the module's order statuses always stay, so a late result of an old payment is still handled after a re-install. Default: off.
Checkout
At the payment step the customer chooses the payment method (by default 2C2P Payment) and confirms. The next page shows Thank you for your order. You will be redirected to 2C2P to complete your payment. and sends the customer to the 2C2P payment page after a moment. If that does not happen, the customer clicks Pay via 2C2P. The page also has a Back to checkout button. No order exists yet at this point.
On the 2C2P page the customer pays with any method enabled on your 2C2P account, for example cards, e-wallets, QR payments, internet banking or cash payments. The module passes the cart total in the cart currency, the customer's e-mail and the names of the products in the cart. The payment can be completed within 24 hours. Each payment attempt gets its own 2C2P order ID (the cart number and the attempt number, after the optional prefix), because 2C2P never accepts the same order ID twice.
2C2P reports the result twice: the customer's browser comes back to the shop, and 2C2P sends a server-to-server notification. Both are handled the same way. The order is marked paid only after 2C2P confirms it with a valid signature. The result must also belong to the payment: the 2C2P order ID must be one your shop issued, and the merchant ID and the random token of the attempt are checked. Results without a valid signature are rejected. The notification works while the shop is in maintenance mode and is not blocked by the country restriction of your shop.
After a successful payment the order is created and the customer sees the standard order confirmation page with Your 2C2P payment has been received. For a pending payment the page shows Your 2C2P payment is pending (for example a cash or bank payment that is not made yet). The order will be processed as soon as 2C2P confirms the payment. For an order on hold it shows Your payment was received and is being reviewed by the shop. If a pending payment was later cancelled, it shows Your 2C2P payment was not completed. Please contact us about this order.
If the payment was not completed, no order is created. The customer is back at checkout with Payment was not completed. Please try again or choose a different payment method. The cart is kept, and the customer can pay again or choose another payment method. If the result cannot be confirmed, the customer sees We could not confirm the payment result. If your account was charged, please contact us before paying again. If the payment cannot be started, for example because the cart currency is not supported, the message is This payment method is currently unavailable for this order. Please contact us or choose another payment method.
If the cart already has an order (paid or waiting for a pending payment), no second payment form is built. The customer is sent to the order confirmation page.
The module has no refunds from PrestaShop, no saved cards, no recurring payments or subscriptions, no card fields on your site and no support for the 2C2P PGW 4.x API.
Orders
Order statuses
No order yet: the customer was sent to 2C2P and no result has arrived yet, or the payment failed. Only the cart exists.
Payment accepted: 2C2P reported a successful payment (status 000). The payment is recorded with the 2C2P transaction reference as the transaction ID. A private note on the order shows the 2C2P transaction, approval code, date and payment channel.
Awaiting 2C2P payment: the payment is pending at 2C2P (status 001), for example a cash payment the customer has not paid yet. The order moves to Payment accepted when 2C2P reports the payment.
2C2P payment on hold: 2C2P reported a different amount or currency than the order total. The note shows the received and expected values. Check the order and the transaction in the 2C2P portal.
Canceled: a pending payment was then rejected, cancelled or failed (statuses 002, 003, 999). The note shows the status and reason. A failed result of an older attempt does not cancel an order created by another attempt.
A paid order is never changed by a later result, and a repeated old result does not re-open an order that was cancelled. If a second payment arrives for an order that is already paid, the order is not changed. A note asks you to check it and refund the duplicate in the 2C2P merchant portal.
2C2P payment block
The order page shows a 2C2P payment block with the 2C2P order ID, the transaction, the payment status, the channel, the approval code, the masked card number, the date, the channel response and the amount received, and a Sandbox badge for sandbox payments.
Refunds
Refunds from PrestaShop are not supported. Refund the payment in the 2C2P merchant portal, then record the refund in PrestaShop manually.
License key
The module works with a VibeFox license key from vibefox.net. The license block License — VibeFox 2C2P Payment is the first block on Modules > Module Manager > VibeFox 2C2P Payment > Configure, 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 shop. Below them are the line Product: presta-payment-2c2p and the link Manage licenses and domains in your account, which opens your vibefox.net account. Only employees with the Configure permission for the module can change the key. The texts of the block follow the back office 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 shop address changes, or after you free a domain slot in your account, click Check now. If the license server cannot be reached, the module keeps working on the last known status.
One key works on one domain: the domain of the main shop, also in a multistore setup. Removing the key from the shop does not free its domain slot. Free the slot in your vibefox.net account.
Without an active key, 2C2P 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. The PrestaShop storefront does not know that you are logged in to the back office, so the payment method is hidden for you too: you can set up the module before you buy a key, but not test it at checkout. A reminder appears in Modules > Module Manager on the Alerts tab. Existing orders are not affected: payments already started are still confirmed.
When a license expires, the module keeps working, but updates and support need a renewal. The status is checked again automatically while you work in the back office: once a day for the first 14 days after the key is entered, then once a week. No cron job is needed. Uninstalling or resetting the module always removes the license key and license status.
Troubleshooting
2C2P does not appear at checkout: check that the license is active, Enable/Disable is on and the current mode has a Merchant ID and Secret Key: the sandbox fields in sandbox mode, the live fields in live mode. Check that the cart currency is supported. The settings page shows a warning in both cases. In Payment > Preferences check that the module is allowed for the cart currency, the customer's country and the customer's group.
The payment went through, but no order was created: no valid result reached your shop. Check that the Merchant ID and Secret Key of the mode the payment was made in match the 2C2P account, and that Redirect API version matches your account. A result with a wrong signature or for another merchant ID is rejected. Turn on Enable Logging and look for hash or merchant ID messages in the Log field. Check also that your server accepts requests from 2C2P to the backend notification URL.
The backend notification answers 400 FAIL: the result has missing fields, a wrong signature, another merchant ID or a wrong token. 404 FAIL means the 2C2P order ID was not issued by this shop. 503 RETRY means the order was being confirmed by another request at the same moment, or the order could not be created (for example, the module is disabled); 2C2P retries later. Turn on Enable Logging to see the reason.
The notification URL shows FAIL in the browser: this is normal. The URL accepts only POST requests from 2C2P.
2C2P says the order ID already exists: 2C2P does not accept the same order ID twice. This happens when several shops share one 2C2P account or in the sandbox, where demo merchant accounts are shared by many developers. Set a unique Order ID prefix.
A payment was made but the order is Awaiting 2C2P payment or 2C2P payment on hold: either the payment is still pending at 2C2P (for example a cash payment that the customer has not paid yet), or the paid amount or currency did not match the order. Check the order notes and the transaction in the 2C2P portal.
The customer sees This payment method is currently unavailable for this order: the cart currency is not supported, the Merchant ID or Secret Key of the current mode is empty, or the cart total is zero.
Please enter your live Merchant ID or Please enter your live Secret Key on save: sandbox mode is off and a live field is empty. Enter the live credentials or keep Sandbox Mode on.
Uninstall
Go to Modules > Module Manager, open the menu next to VibeFox 2C2P Payment and choose Uninstall. The license key and license status of this module are always removed. If Delete Data on Uninstall is on, the gateway settings and the log are removed. If it is off, all settings are kept for a later re-install. The 2C2P transactions and the order statuses Awaiting 2C2P payment and 2C2P payment on hold are always kept. Existing orders keep their payment notes and transaction IDs.
2C2P is a trademark of its respective owner. This module is not affiliated with or endorsed by 2C2P.
