Read in Portuguese, and English
This is the Ifthenpay plugin for the Magento 2 e-commerce platform.
Multibanco is one Portuguese payment method that allows the customer to pay by bank reference. This module will allow you to generate a payment Reference that the customer can then use to pay for his order on the ATM or Home Banking service. This plugin uses one of the several gateways/services available in Portugal, IfthenPay.
MB WAY is the first inter-bank solution that enables purchases and immediate transfers via smartphones and tablets.
This module will allow you to generate a request payment to the customer mobile phone, and he can authorize the payment for his order on the MB WAY App service. This module uses one of the several gateways/services available in Portugal, IfthenPay.
Payshop is one Portuguese payment method that allows the customer to pay by payshop reference. This module will allow you to generate a payment Reference that the customer can then use to pay for his order on the Payshop agent or CTT. This module uses one of the several gateways/services available in Portugal, IfthenPay.
Credit Card This module will allow you to generate a payment by Visa or Master card, that the customer can then use to pay for his order. This module uses one of the several gateways/services available in Portugal, IfthenPay.
Cofidis Pay is a payment solution of up to 12 interest-free installments that makes it easier to pay for purchases by splitting them. This module uses one of the several gateways/services available in Portugal, IfthenPay.
Contract with Ifthenpay is required.
See more at Ifthenpay.
Membership at Membership Ifthenpay.
Support
For support, please create a support ticket at Support Ifthenpay.
Use the table below to check the compatibility of the Ifthenpay module with your online store: | Magento 2.3 | Magento 2.4 [2.4.0 - 2.4.6] | |
---|---|---|---|
Ifthenpay v1.0.0 - v1.2.13 | Not compatible | Compatible up to 2.4.5 | |
Ifthenpay v2.0.0 - v2.2.0 | Not compatible | Compatible |
It is possible to install the module in two ways: using Composer or manually placing the files in the app/code/ folder.
composer require ifthenpay/magento2
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:clean
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:clean
After installing the module, it will be available in the settings of your online store.
Choose Sales, Payment Methods, and when you find the Ifthenpay module, click on Configure.
The Backoffice Key is provided upon contract completion and consists of sets of four digits separated by a hyphen (-). Enter the Backoffice Key (1) and click Save (2).
Click on Multibanco (1) to expand the configuration options.
The Multibanco payment method generates references using an algorithm and is used if you do not wish to assign a time limit (in days) for orders paid with Multibanco. The Entity and Sub-entity are automatically loaded when entering the Backoffice Key. Configure the payment method. The image below shows an example of a minimally functional configuration.
Click on Save to save the changes.
The Multibanco payment method with Dynamic References generates references per order and is used if you wish to assign a time limit (in days) for orders paid with Multibanco. The Entity and Multibanco Key are automatically loaded when entering the Backoffice Key. Configure the payment method. The image below shows an example of a minimally functional configuration.
Follow the steps from Multibanco payment method with the following modifications:
The MB WAY payment method uses a mobile phone number provided by the consumer and generates a payment request to the consumer's MB WAY smartphone application, which they can accept or refuse. The MB WAY Keys are automatically loaded when entering the Backoffice Key. Configure the payment method. The image below shows an example of a minimally functional configuration.
Click on Save to save the changes.
The Credit Card payment method allows customers to pay with Visa or Mastercard credit cards through the Ifthenpay gateway. The Ccard Keys are automatically loaded when entering the Backoffice Key. Configure the payment method. The image below shows an example of a minimally functional configuration.
Click on Save to save the changes.
The Payshop payment method generates a reference that can be paid at any Payshop agent or affiliated store. The Payshop keys are automatically loaded upon entering the Backoffice Key. Configure the payment method. The image below shows an example of a minimally functional configuration.
Click on Save to save the changes.
The Cofidis Pay payment method that allows the consumer to pay in installments. The Cofidis Pay keys are automatically loaded upon entering the Backoffice Key. Configure the payment method. The image below shows an example of a minimally functional configuration.
Click on Save to save the changes.
The Ifthenpay Gateway payment method allows the consumer to be redirected to a payment gateway page where it is possible to select any of the above payment methods to pay for the order. The Ifthenpay Gateway Keys are automatically loaded upon entering the Backoffice Key. Configure the payment method. The image below shows an example of a minimally functional configuration.
The MB WAY and Credit Card payment methods allow for the refund of the total or partial amount paid by the consumer through the order credit note page. To refund the amount paid by the consumer, it is necessary for the payment method to have the "Allow Refunds" option enabled, and order must have an invoice. To proceed with the refund of the amount paid by the consumer, access the order page.
Access the order details (1).
Click on Invoices (1) and then on View Details (2).
Click on Credit Memo (1).
It is possible to edit the refund amount (1) and click on Update (2), or proceed with the refund of the total amount paid by the consumer by clicking on Refund (3).
Confirm the refund amount and click on OK (1).
An email with a security token will be sent to the email of the online store's administrator user who initiated the refund.
Enter the security token received in the email (1) and click on OK (2).
The selected amount will be refunded to the consumer, and the order status will be updated to closed.
The Ifthenpay module is compatible with the multistore mode of Magento 2, allowing you to configure different payment methods for each store. This functionality is applied at the website scope, allowing you to configure different payment methods for each website.
To configure different payment methods for each store, access the module's configuration page and select the desired website in the top left corner (1).
IMPORTANT: When implementing multistore, you should not configure the Default Config, as it will override the websites of the sub-stores. It is only possible to configure different payment methods for each website, and it is not possible to configure different payment methods for each Store View.
If you already have an Ifthenpay account but have not contracted a payment method that you now need, you can make an automatic request to Ifthenpay.
To request the creation of an additional account, access the module's configuration page and click on "Request New Account" for the payment method you wish to contract.
In case you need an account for Multibanco with Dynamic References, the "Request New Account" button will be available within the configuration of the Multibanco payment method (1).
By clicking on Request New Account, a dialog box will appear where you can confirm the action by clicking on OK (1).
You may also request a method for the Ifthenpay Gateway following the same procedure by clicking any of the request buttons (1).
As a result, the Ifthenpay team will add the payment method to your account, updating the list of available payment methods in your module.
IMPORTANT: When requesting an account for the Credit Card payment method, the Ifthenpay team will contact you to request more information about your online store and your business before activating the payment method.
If you have acquired a new Backoffice Key and want to assign it to your website but already have one currently assigned, you can reset the module's configuration. In the Ifthenpay module configuration, click on the "Clear Backoffice Key" button (1) and confirm the action by clicking OK.
Attention, this action will clear the current module settings;
After clearing the Backoffice Key, you will be prompted to enter the Backoffice Key again.
IMPORTANT: Only the Multibanco, MB WAY, Payshop, and Cofidis Pay payment methods allow enabling Callback. The credit card method automatically changes the order status.
Callback is a feature that, when enabled, allows your store to receive a notification of a successful payment. When enabled, upon receiving a successful payment for an order, the Ifthenpay server communicates with your store, changing the order status to "Processing". You can use Ifthenpay payments without enabling Callback, but your orders will not be automatically updated with the status change.
As mentioned above in Configurations, to enable Callback, access the module's configuration page and enable the "Enable Callback" option. After saving the settings, the process of associating your store and payment method with Ifthenpay servers will be executed, and a new element (for informational purposes only) will be displayed, showing the Callback status (1), the anti-phishing key (2), and the Callback URL (3).
After enabling Callback, you don't need to take any further action. Callback is active and functioning.
A cron job is a scheduled task that is automatically executed at specific intervals in the system. The Ifthenpay module provides a cron job to check the status of payments and cancel orders that have not been paid within the configured time limit. The table below shows the time limit for each payment method, which the cron job checks and cancels orders that have not been paid within the time limit. This time limit can only be configured for the Multibanco with Dynamic References and Payshop payment methods. Cofidis Pay does not have this functionality because its approval time is not fixed.
Payment Method | Payment Deadline |
---|---|
Multibanco | no deadline |
Multibanco Dynamic | Configurable, 1 to n days |
MB WAY | 30 minutes |
Payshop | Configurable, 1 to 99 days |
Credit Card | 30 minutes |
Cofidis Pay | 60 minutes |
The order cancellation cronjob runs every minute. The configuration options for the cronjob can be found on the Magento cronjobs settings page under the ifthenpay_payment group.
To start the execution of the cronjob, please access the Magento terminal and run the following command:
bin/magento cron:run --group ifthenpay_payment
To facilitate error detection, the Ifthenpay module logs any errors that occur during its execution. The logs are then saved in a text file in the var/log/ directory of Magento. To access the logs, navigate to the var/log/ folder in the root of Magento and open the file ifthenpay.log.
The following describes the consumer user experience when using Ifthenpay payment methods in a stock installation of Magento, which may change with the addition of one-page checkout extensions.
On the checkout page, after selecting the shipping method, the consumer can choose the payment method.
Select the Multibanco payment method (1) and click on Place Order (2).
The order success page will be displayed, showing the entity, reference, and the amount to be paid.
If the Multibanco payment method is configured with dynamic references, the order success page will also display the reference deadline in addition to the entity, reference, and the amount to be paid.
Select the Payshop payment method (1) and click on Place Order (2).
The order success page will be displayed, showing the reference, validity, and the amount to be paid.
Select the MB WAY payment method (1), fill in the mobile phone number (2), and click on Place Order (3).
If the Display Countdown configuration is active, the order success page will display a countdown timer showing the remaining time for payment.
The countdown timer will automatically update the payment status in the case of success, rejection (by the MB WAY app user), expiration of the time limit, or error.
In case of success, a success message will be displayed.
In case of rejection by the user, a rejection message will be displayed.
In case of expiration of the time limit, an expiration message will be displayed.
In case of failure to communicate with the MB WAY app or entering an invalid mobile phone number, an error message will be displayed.
When an error occurs, the time limit is reached, or the payment is declined in the MB WAY app, the consumer can try again by clicking on Resend MB WAY Notification.
If the configuration of the MB WAY payment method has the option to not display the countdown active, the consumer will receive a notification in the MB WAY app, but the countdown and the button to resend the notification will not be displayed on the order success page.
Select the Credit Card payment method (1) and click on Place Order (2).
Fill in the credit card details: card number (1), expiration date (2), security code (3), Cardholder's Name (4), and click on Pay (5).
It is possible to go back (6), canceling the payment.
After the payment is processed, the order success page will be displayed.
Select the Credit Card payment method (1) and click on Place Order (2).
Fill in the credit card details: card number (1), expiration date (2), security code (3), Cardholder's Name (4), and click on Pay (5).
It is possible to go back (6), canceling the payment.
After the payment is processed, the order success page will be displayed.
Select the Cofidis Pay payment method (1) and click on Place Order (2).
Login or, if you don't have an account, sign up with Cofidis Pay:
Number of installments and billing and personal data:
Terms and Conditions:
Agreement formalization:
Agreement formalization authentication code:
Summary and Payment:
Success and return to store:
After which you will be redirected back to the store;
Select the Ifthenpay Gateway payment method (1) and click on Place Order (2).
Select one of the payment methods available in the gateway page (1).
In case of Multibanco method, the entity, reference and amount will be displayed. Here the user can do one of the two:
If the user did not pay at the moment and did not take note of the payment details, it is also possible to access the Ithenpay Gateway link at a later date in the user account order history or order confirmation email.
You made it to the end of the ifthenpay magento 2 module manual. Congratulations!