Magento 2
For Magento Open Source, Adobe Commerce and Mage-OS 2.4 (tested with Mage-OS 3.5, which is Magento 2.4.8). Your store's currency must be NGN or USD.
Testing in the Biftpay sandbox? If your test key comes from the sandbox dashboard (sandbox.app.biftpay.com), set API URL to
https://sandbox.api.biftpay.comand save. In Magento it's with the other Biftpay settings. Leave it empty for your live store.
Install#
- Download the module and unzip it in your Magento root folder. It creates
app/code/Biftpay/Payment. - From the Magento root, run:
bash
bin/magento module:enable Biftpay_Payment
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy
bin/magento cache:flush(The two setup: lines in the middle are only needed in production mode.)
Set up#
- Go to Stores → Configuration → Sales → Payment Methods → Biftpay.
- Set Enabled to Yes, leave Test mode on and paste your test secret key (
bp_test_...). - Leave the webhook signing secrets empty and click Save Config. The module adds your store's webhook endpoint to Biftpay and saves its signing secret for you. That needs your store on HTTPS. If it can't, the message says why; you can add the URL shown under the setting (
https://your-store/biftpay/webhook/index) in Developers → Webhooks and paste the signing secret (whsec_...) into Magento yourself.
Place a test order and pay with a test card: the order moves from Pending Payment to Processing, with an invoice. To go live, paste your live key, set Test mode to No and save: a live webhook endpoint is added the same way.
What the module does#
- Paying: Place Order creates the order in Pending Payment and sends the customer to Biftpay's checkout. The order is invoiced only when Biftpay confirms the payment (a signed webhook, or a check with Biftpay when the customer comes back). If the customer comes back without paying, their cart is restored so they can try again.
- Bank transfers that take a while: the order stays in Pending Payment and is invoiced when the funds land.
- Refunds: open the invoice, create a Credit Memo and click Refund (not "Refund Offline"). Full or partial.
- Logs: set Debug log to Yes and see
var/log/biftpay.log. Keys and secrets are never logged.