payflex / magento2-gateway
Payflex Gateway
Package info
github.com/PayFlexSA/payflex-magento-2-4-module
Type:magento2-module
pkg:composer/payflex/magento2-gateway
Requires
- php: >=7.4
- magento/framework: *
- magento/magento-composer-installer: *
- magento/module-backend: *
- magento/module-catalog: *
- magento/module-email: *
- magento/module-media-storage: *
- magento/module-store: *
- magento/module-theme: *
- magento/module-ui: *
- magento/module-variable: *
- magento/module-widget: *
This package is auto-updated.
Last update: 2026-07-21 09:24:02 UTC
README
Overview
The Payflex Magento 2.4 Gateway plugin integrates Payflex with your Magento store, adding Payflex "pay in instalments" as a checkout payment method.
Requirements: PHP 7.4 or newer, and one of the Magento versions listed below.
Tested Magento2 Versions
- Magento 2.4.5
- Magento 2.4.6
- Magento 2.4.7
- Magento 2.4.8
- Magento 2.4.9
Installation Steps
Follow these steps to install the Payflex Gateway plugin:
⚠️ Choose one installation method — 1a or 1b, not both. Keeping a copy in
app/code/Payflex/Gateway(1a) and installing via Composer (1b) means two copies of the module on disk. The module'sregistration.phpguards against a double-registration fatal — whichever copy loads first wins and the other silently defers — but running both is confusing and makes updates unpredictable. If you are migrating from a manual install to Composer, deleteapp/code/Payflex/Gatewayfirst (and vice versa).
1a. Copy Plugin to Directory (Manual)
- Paste the plugin into the appropriate directory:
/app/code/for a release (downloaded a zip), or/app/code/Payflex/Gatewayif you're using the repo directly - This README.md should be located here if done correctly:
/app/code/Payflex/Gateway/README.md
1b. Install via Composer
From your Magento root directory, run:
composer require "payflex/magento2-gateway:^2.0"
^2.0 tracks the latest stable 2.x release; composer update payflex/magento2-gateway pulls newer ones later. (Windows cmd users: keep the quotes so ^ isn't treated as an escape.)
2. Run Magento Setup Commands
-
Open your terminal and navigate to your Magento root directory.
-
Execute the following commands:
php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy -f chmod -R 775 var/ pub/ pub/static/ generated/ php bin/magento cache:clean
Note:
setup:static-content:deploy -fis only required in production mode; in developer mode you can skip it. Adjust thechmodtarget ownership/permissions to match your hosting setup —775with the correct web-server group is generally sufficient. See Magento's file system permissions guidance if in doubt.
3. Configure the Payment Method
Once the setup commands finish, enable and configure the gateway in the Magento admin:
- Go to Stores → Configuration → Sales → Payment Methods → Payflex.
- Enter your Payflex Client ID and Client Secret, and select the correct Environment (Sandbox or Production).
- Set Enabled to Yes and save.
- Flush the cache (
php bin/magento cache:flush) if the method does not appear at checkout immediately.
Upgrading from Previous Versions of This Plugin (<V2.0.0)
-
Check Pending Orders:
- Ensure there are no current orders pending payment that are newer than about an hour old. Existing orders that were completed will still contain their order notes but will effectively be treated as a separate gateway.
- We suggest putting up a maintenance page while installing this module to avoid any risk of in-progress orders failing during the upgrade process
-
Check your current config
- Review your configuration for Payflex in the admin panel, make sure you have your client details because you will need to fill them in again at the end
-
Backup:
- Make a database and file backup before upgrading.
-
Remove Old Module:
- Delete the old
/app/code/MR/folder.
- Delete the old
-
Add New Module:
- Add the new Payflex module in its place.
-
Run Upgrade Commands:
- Run the necessary commands as you usually would to activate the new module.
-
Configuration:
- Once the new module is active, input your client details and set up the configuration on the configuration page. All new orders should work as normal.
-
Legacy files
- Older modules needed to have
symfony/lockinstalled via composer, and theSourceSandboxproduction.phpfile added toMagento/Config/Model/Config/. Once you upgrade to the new module, these can be removed if you wish, though leaving them shouldn't cause any issues.
- Older modules needed to have
Additional Information
- Ensure that you have the necessary permissions to execute the commands.
- It is recommended to back up your Magento store before performing the installation.
- For any issues or support, please contact the Payflex support team.