Overview
VibeFox PayFast Pay Gateway adds PayFast to Magento Open Source and Adobe Commerce for payments in South African rand. At the payment step the customer chooses PayFast and clicks Place Order. Magento places the order in Pending Payment, and the customer is sent to the secure PayFast payment page with a signed payment form and pays by card, Instant EFT or another method of your PayFast account. PayFast then confirms the payment to your store with a server-to-server notification (ITN). The order is invoiced only after that notification passes all checks, and the order e-mail is sent only then.
It suits South African stores that want PayFast's hosted payment page without a card form on their own site. The module takes one-time payments in ZAR only. It has no online refunds from Magento (refund in the PayFast dashboard), no subscriptions, no saved cards, no split payments and no payments for orders created in the Admin.
Key features
Signed payment form: the form is signed with your passphrase using the official PayFast algorithm. The passphrase is never sent to the browser.
Verified notifications: every ITN is checked: signature, your merchant account, the token of the payment attempt, a server-to-server confirmation with PayFast and, in live mode, that it comes from a PayFast server.
Amount check: the paid amount is compared with the order total in cents and the order must be in ZAR. A mismatch puts the order On Hold with a note and without an invoice.
No double processing: repeated notifications never invoice an order twice. Late failed or pending notifications never downgrade a paid order, a second payment of a paid cart only adds a note, and money arriving for a cancelled order is flagged for review.
Live and sandbox: separate credentials for each mode. Each notification is checked with the credentials of the mode the payment was started in, and a sandbox payment never pays an order while the store is live.
Hidden when unusable: without credentials of the current mode, when the cart currency is not ZAR, or when the total is below the PayFast minimum of R5.00.
Nothing to configure in PayFast: the notification URL is sent with every payment and shown on the settings page.
Standard Magento settings and orders: all settings are on the standard Payment Methods configuration page, with encrypted passphrases, countries and minimum and maximum order totals, and an optional log without passphrases or customer data. The admin order page shows a PayFast payment history block with the payment reference, the PayFast payment ID, the mode, the status and the gross, fee and net amounts.
Requirements
Magento Open Source or Adobe Commerce 2.4.6 to 2.4.9 (your own server or Adobe Commerce on cloud infrastructure; not Adobe Commerce as a Cloud Service), PHP 8.1 to 8.4 with the cURL extension. The South African rand (ZAR) as a currency of your store. A PayFast account with the Merchant ID, Merchant Key and passphrase, and sandbox credentials for tests. A store reachable from the internet. A VibeFox license key from vibefox.net (one key per domain).
