VibeFox ifthenpay for PrestaShop — Help
Requirements
PrestaShop: 8.0 to 9.x.
PHP: 8.0 or later. The module refuses to install on older PHP versions.
Currency: euro (EUR) only. The payment method is hidden when the cart currency is not EUR. ifthenpay accepts totals from 0.01 to 99,999.99 EUR.
ifthenpay account: sign up at ifthenpay.com. You need the key of the method you offer: Multibanco, MB WAY or Credit Card (format ABC-123456). The keys are shown in the ifthenpay backoffice (backoffice.ifthenpay.com) or sent by ifthenpay when the method is activated for your account. ifthenpay must also activate the callback for your key (see Configuration), and your shop must be reachable from the internet.
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 ifthenpay Gateway in the module list later and click Configure. The module generates its anti-phishing key on install.
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. Choose the Payment Method, enter its ifthenpay key and click Save, so that the Callback URL matches the chosen method.
5. Copy the Anti-phishing Key and the Callback URL shown in the settings and ask ifthenpay to activate the callback for your key with them (in the backoffice or through ifthenpay support).
6. Turn on Enable/Disable and click Save.
On install the module creates two order statuses, Awaiting ifthenpay payment and ifthenpay payment on hold. PrestaShop offers a new payment module for all currencies, countries and customer groups. You can limit them in Payment > Preferences; EUR must stay allowed.
Configuration
All settings are on the module page: Modules > Module Manager > VibeFox ifthenpay Gateway > Configure. Each section with a Save button saves the whole page. Without the key of the selected method the payment method is not shown at checkout. While the gateway is enabled without that key, the page shows ifthenpay: enter the key of the selected payment method, otherwise the method is not shown at checkout.
ifthenpay
Enable/Disable: Enable ifthenpay Payment 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: ifthenpay.
Description: the payment method description displayed at checkout. Default: Pay via Multibanco, MB WAY or Credit Card. Change it to match the method you offer.
Payment Method: the method offered at checkout. Only the key of this method is required.
ifthenpay keys
The keys (format ABC-123456) are shown in the ifthenpay backoffice or sent by ifthenpay when the payment method is activated for your account.
Multibanco Key: your ifthenpay Multibanco (MB) key for dynamic references.
MB WAY Key: your ifthenpay MB WAY key.
Credit Card Key: your ifthenpay Credit Card key. It also verifies the signature of the customer's return from the card page.
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.
Clear saved keys: tick a key and click Save to remove it. An empty field keeps the saved value.
Callback (payment notifications)
The callback tells your shop that a payment has been made. Ask ifthenpay to activate the callback for each key you use, with the anti-phishing key and the callback URL below. Multibanco and MB WAY orders are confirmed only by the callback; card payments are also confirmed by the signed return from the card page.
Anti-phishing Key: generated by the module, shown for copying. ifthenpay sends it back in every callback; callbacks without it are rejected.
Callback URL: the callback URL for the selected payment method, with the ifthenpay placeholders, shown for copying. With friendly URLs it starts like https://your-shop/module/wcp_ifthenpay_gateway/callback, possibly with a language code such as /en/, and continues with the parameters of the method. Copy the whole URL exactly as the settings show it.
The anti-phishing key in each callback is compared with yours. A missing or wrong key is answered with 403, and the order is not changed. The callback must also match a payment of this module: for Multibanco by entity and reference, for MB WAY by the cart and one of its MB WAY requests, for Credit Card by the cart and one of its card requests. Without a working callback, Multibanco and MB WAY orders are never confirmed, and card payments are confirmed only by the signed return. The callback works while the shop is in maintenance mode and is not blocked by the country restriction of your shop.
Advanced
Test Mode: Credit Card and Multibanco use the ifthenpay sandbox endpoints; no real money is taken, and you use the test keys provided by ifthenpay. MB WAY has no sandbox: test it with a test key from ifthenpay. Checkout shows a TEST MODE badge. Default: off.
Order Status After Payment: the order status set after a confirmed payment, with one status change.
Debug Log: API requests and callbacks are written to logs/ifthenpay_p_debug.log.php in the module folder. The file cannot be opened from the web. Errors are always logged. Keys, the anti-phishing key and full phone numbers 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 module removes the module settings, the anti-phishing key and the log. Orders and the ifthenpay payment records always stay. Default: off.
Checkout
Multibanco. At checkout the customer sees You will receive a Multibanco reference to complete the payment. When the customer confirms, the module creates a dynamic Multibanco reference for the cart total, and the order is created in Awaiting ifthenpay payment. The order confirmation page shows Multibanco Payment Details: entity, reference and amount, with Please use these details to pay at any Multibanco ATM or through your online banking. The same details are added to the order confirmation e-mail. The order is paid when ifthenpay sends the payment callback.
MB WAY. The customer enters the MB WAY phone number (912 345 678, +351 912 345 678, or 351#912345678 for other countries); the phone of the invoice address is filled in. The module sends a payment request to the phone, and the order is created in Awaiting ifthenpay payment. The order confirmation page says A payment request has been sent to your phone via MB WAY. Please confirm it in the MB WAY app. The order is paid when ifthenpay sends the callback. Only a masked phone number is stored.
Credit Card. The customer sees You will be redirected to a secure page to enter your card details. and is sent to the ifthenpay card page. No order exists yet, and the cart is kept. After a successful payment the customer returns to your shop. The return is accepted only with a valid ifthenpay signature, the cart's secure key, a secret of that attempt and the card request of the cart; then the order is created as paid and the customer sees the standard order confirmation page. If the return cannot be verified, nothing changes, and a Payment confirmation page shows Your card payment is being confirmed by ifthenpay. You will receive an e-mail as soon as it is confirmed. with a Check again button; the callback creates the order as soon as it arrives. If the card payment fails or is cancelled, the customer is back at checkout with The card payment was not completed. You can try again or choose another payment method. or The card payment was cancelled. You can try again or choose another payment method. Every card attempt of the cart is kept, so a payment made in an older tab is still accepted.
The order is marked paid only after ifthenpay confirms it, and the amount is checked to the cent against the order total. If the payment cannot be started, the customer stays at checkout with a short message, for example The Multibanco reference could not be created. Please try again or choose another payment method., The MB WAY payment request could not be sent. Please check that the phone number is linked to MB WAY, or choose another payment method. or The payment service is temporarily unavailable. Please try again in a few minutes. The technical reason is written to the log.
The module offers one ifthenpay method at a time. It has no Payshop, Cofidis Pay, Apple Pay, Google Pay, PIX or Pay-by-Link, no subscriptions or saved cards, no automatic expiry or cancellation of unpaid Multibanco references and no payment status polling.
Orders
Order statuses
No order yet: a card payment was started and is not confirmed yet, or it failed or was cancelled. Only the cart exists.
Awaiting ifthenpay payment: a Multibanco reference was issued or an MB WAY request was sent. PrestaShop reduces the stock when the order is created. Unpaid references and declined MB WAY requests do not cancel the order automatically; cancel such orders yourself if needed.
Payment accepted or Delivered: the payment was confirmed. The status follows Order Status After Payment. The payment is recorded with the Multibanco reference, the MB WAY request ID or the card request ID as the transaction ID, and a note shows how it was confirmed.
ifthenpay payment on hold: the amount received was different from the order total (for example, the cart was changed after a card payment started), or the payment arrived after the order was cancelled. The note explains it, and the customer is not asked to pay again. Check the payment in the ifthenpay backoffice and complete or refund the order manually. A later correct payment for such an order does not change it.
A second payment for an order that is already paid only adds a note to check for a duplicate payment in the ifthenpay backoffice. Refunded orders, and orders cancelled after payment, are never reopened.
ifthenpay payment block
The order page shows an ifthenpay payment block with the payment attempts of the order (date, method, a Sandbox badge for test payments, amount, Multibanco entity and reference or the masked MB WAY phone, ifthenpay request ID and status), a Manual review warning while the order is ifthenpay payment on hold, and the ifthenpay notes of the order.
Refunds
Refunds from PrestaShop are not supported. Refund the payment in the ifthenpay backoffice and record it in PrestaShop manually. A refunded (DEVOLVIDO) callback only adds a note. Other statuses reported by ifthenpay also only add a note.
License key
The module works with a VibeFox license key from vibefox.net. The license block License — VibeFox ifthenpay Gateway is the first block on Modules > Module Manager > VibeFox ifthenpay Gateway > 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-ifthenpay 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, ifthenpay 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
ifthenpay does not appear at checkout: check that the license is active, Enable/Disable is on, the key of the selected Payment Method is filled in, the cart currency is EUR and the total is between 0.01 and 99,999.99 EUR. In Payment > Preferences check that the module is allowed for EUR, the customer's country and the customer's group.
The customer paid, but the order stays Awaiting ifthenpay payment or no order was created: the callback is not reaching your shop. Check that ifthenpay activated the callback URL and the anti-phishing key for the key you use, and that the URL is the one for the selected method. The shop must be reachable from the internet, not on localhost and not behind a login. Look for Callback rejected lines in the Log field on the module page.
Callback answers 403 Forbidden: the anti-phishing key in the callback is missing or differs from the one in the settings. Send the key shown in the settings to ifthenpay again.
Callback answers 503 Not configured: the anti-phishing key has not been generated yet. Open the module settings once; ifthenpay retries the callback.
Callback answers 503 Busy: the same cart was being processed by another request at that moment. ifthenpay retries the callback.
Callback answers Order not found: the reference or request does not belong to a payment of this module, or the cart was ordered with another payment method.
Why was a paid order put on hold? The amount received was different from the order total, or the payment arrived after the order was cancelled. Read the notes in the ifthenpay payment block, check the payment in the ifthenpay backoffice and complete or refund the order manually.
MB WAY request could not be sent: the phone number is not linked to MB WAY or is in the wrong format. Use 912 345 678, or 351#912345678 for numbers of other countries.
Test mode and MB WAY: ifthenpay has no MB WAY sandbox; use a test key provided by ifthenpay.
Uninstall
Go to Modules > Module Manager, open the menu next to VibeFox ifthenpay Gateway and choose Uninstall. The license key and license status of this module are always removed. If Delete Data on Uninstall is on, the module settings, the anti-phishing key and the log are removed; after a re-install a new anti-phishing key is generated and must be sent to ifthenpay again. If it is off, all settings are kept for a later re-install. The ifthenpay payment records (references and request IDs) and the order statuses Awaiting ifthenpay payment and ifthenpay payment on hold are always kept, so callbacks for references issued before still find their orders after a re-install. Existing orders keep their payment notes and transaction IDs.
ifthenpay is a trademark of its respective owner. This module is not affiliated with or endorsed by ifthenpay.
