Magento 2.x Integration with PayFast
Accept secure online payments on your Magento 2.x store using the official PayFast payment module. This extension enables seamless checkout with support for major payment methods, real-time transaction confirmation, and sandbox testing.
Magento 2.x Integration
PayFast integrates directly into the Magento checkout flow, allowing merchants to process payments without building a custom payment gateway integration.
Installation Requirements
Before installing the PayFast module, ensure that:
-
You are running Magento 2.x
-
Your server meets Magento’s system requirements
-
You have administrator access to your Magento store
-
You have an active PayFast merchant account
PayFast no longer supports Magento 1.x due to security updates.
Installing and Testing the PayFast Module
-
Set up ZAR as a currency in your Magento store
-
Navigate to Stores → Currency Symbols and Rates
-
Add South African Rand (ZAR)
-
-
Download the PayFast module compatible with your Magento version:
-
Copy the PayFast module folder into your Magento root directory.
-
Run the following commands in your Magento installation directory:
php ./bin/magento module:enable Payfast_Payfast
php ./bin/magento setup:di:compile
php ./bin/magento setup:static-content:deploy
php ./bin/magento cache:clean
-
Log in to the Magento Admin panel.
-
Navigate to:
Stores → Configuration → Sales → Payment Methods -
Select PayFast from the list.
Sandbox Configuration
To test payments in the sandbox environment:
-
Enable the PayFast module
-
Set the Server field to:
test -
Use the sandbox credentials:
Merchant ID: 10000100
Merchant Key: 46f0cd694581a
Passphrase: (leave blank)
Configure any additional options as required, then click Save Config.
You can now perform test transactions.
Go-Live Configuration
When ready to process real payments:
-
Change the Server field to:
live -
Enter your actual PayFast Merchant credentials
-
Disable debug logging
-
Adjust additional settings as required
-
Click Save Config
Your Magento store will now process live payments through PayFast.
FAQ — PayFast Integration for Magento
What is Magento?
Magento is a powerful open-source ecommerce platform designed for scalable online retail. It supports large product catalogues, high traffic volumes, and extensive customisation.
Why integrate PayFast with Magento?
PayFast enables secure online payments with minimal setup, supporting credit cards, instant EFT, wallets, and other local payment methods popular in South Africa.
Does the PayFast module support subscriptions?
Yes. The module supports one-off purchases and recurring billing models commonly used for subscription-based products.
Can I test payments before going live?
Yes. PayFast provides a sandbox environment that allows you to simulate transactions without processing real payments
Do I need development experience to install the module?
Basic familiarity with Magento administration is sufficient. Running command-line installation steps may require assistance from a developer or hosting provider.
Updated 2 months ago