Your clients can pay invoices and store orders with Payfast (card, instant EFT and more), on Payfast's secure payment page.
Requirements
- RISE 4.2 or newer, with the cron job running.
- A Payfast merchant account with a passphrase set. For tests, a Payfast sandbox account.
- Payfast takes ZAR only, R5.00 or more per payment.
Get your credentials
Test (sandbox) credentials
- Open the Payfast sandbox and sign in with your email address. A sandbox account is made for you, no documents needed.
- The sandbox dashboard shows your Merchant ID and Merchant Key.
- Passphrase: open Settings > Developer Settings, type a passphrase of your choice in Salt Passphrase and save. Enter the same text in RISE.
Live credentials
- Sign up for a Payfast business account at payfast.io and verify it (ID, proof of address and bank account). Payfast takes payments only after your account is verified.
- In your live Payfast dashboard open Settings > Developer Settings. Copy the Merchant ID and Merchant Key, and set a Salt Passphrase.
Setup
- Install and activate the plugin in Settings > Plugins.
- Go to Settings > Payment methods and edit Payfast.
- Enter the Merchant ID, Merchant Key and Passphrase (see Get your credentials). The passphrase must be the same as the Salt Passphrase saved in Payfast.
- Turn on Testing environment to take test payments with your sandbox details. Turn it off for real payments with your live details.
- Turn on Available on Invoice and save.
There is nothing to set for notifications: RISE sends its notification URL to Payfast with each payment. Your site must be reachable from the internet on port 80 or 443. If a notification doesn't arrive, the payment is recorded when the client comes back from Payfast, or later by the cron job.
Testing
Turn on Testing environment and enter the details of your own sandbox account, with its Salt Passphrase set. Pay an invoice in ZAR, for example R10.55, and click Complete Payment with the sandbox wallet. When you come back to RISE, the payment is on the invoice.
Don't use the shared Payfast test merchant from the Payfast docs (10000100): anyone can change its passphrase, so the payment can't be confirmed.
Problems
- "Generated signature does not match submitted signature" on the Payfast page: the Passphrase in RISE is not the same as the Salt Passphrase in Payfast, or the Merchant ID and Key are from the other environment (sandbox or live).
- The invoice is not marked paid: check the same passphrase, and that the cron job runs. RISE asks Payfast again for unfinished payments. Errors are in the RISE log (writable/logs).