Naboopay WordPress Integration
WordPress plugin for OM/WAVE Payments
by Louis Isaac DIOUF · github.com/axeldima10/naboopay · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/axeldima10/naboopay/archive/refs/heads/main.zipNaboopay WooCommerce Integration
This plugin integrates the Naboopay payment gateway with WooCommerce, enabling customers to pay using Naboopay-supported methods (WAVE, ORANGE_MONEY, FREE_MONEY, BANK) during checkout. It also supports real-time webhook notifications to update order statuses automatically.
Features
- Seamless integration with WooCommerce checkout process.
- Redirects users to the Naboopay checkout page for secure payment processing.
- Supports multiple payment methods: WAVE, ORANGE_MONEY and FREE_MONEY.
- Handles webhook notifications for real-time order status updates.
- Secure API communication using an API token and webhook secret key.
- Configurable order status after successful payment ("Processing" or "Completed").
- Detailed error logging for troubleshooting.
Requirements
- WordPress 5.6 or higher
- WooCommerce 5.0 or higher
- PHP 7.4 or higher (compatible with PHP 8.2+)
- A Naboopay account with API credentials (API token and webhook secret key)
Installation
- Download the plugin zip file from the releases page (update this link if you have a GitHub repo).
- In your WordPress dashboard, go to Plugins > Add New > Upload Plugin.
- Upload the zip file and click Install Now.
- Activate the plugin via the Plugins menu.
Configuration
- Navigate to WooCommerce > Settings > Payments in your WordPress admin panel.
- Locate Naboopay in the payment methods list and click Manage.
- Enable the gateway by checking Enable Naboopay.
- Enter your API Token provided by Naboopay.
- Enter your Webhook Secret Key for signature verification (generate this in your Naboopay dashboard).
- Choose the Status After Payment ("Processing" or "Completed") to set the order status after a successful payment.
- Copy the Webhook URL (e.g.,
https://yoursite.com/wp-json/naboopay/v1/webhook) and register it in your Naboopay dashboard under Security Settings > Webhooks. - Save the settings.
Usage
- During checkout, customers can select Naboopay as their payment method.
- They will be redirected to the Naboopay checkout page to complete the payment using WAVE, ORANGE_MONEY, FREE_MONEY, or BANK.
- Upon successful payment, customers are redirected back to your store, and the order status updates automatically via webhooks.
Webhook Handling
The plugin processes Naboopay webhook notifications to update WooCommerce order statuses:
paid: Sets the order to the configured status ("Processing" or "Completed").cancel: Sets the order to "Cancelled".pending: Sets the order to "Pending".part_paid: Sets the order to "On Hold".
Testing
- Use test credentials from Naboopay (if available) to simulate payments.
- Trigger webhook events from the Naboopay dashboard to test status updates.
- Enable WordPress debugging (
WP_DEBUGandWP_DEBUG_LOG) to log API responses and errors:- Edit
wp-config.phpand add:define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); define('WP_DEBUG_DISPLAY', false); - Check logs in
wp-content/debug.log.
- Edit
Troubleshooting
- Payment fails with "Erreur serveur (HTTP 422)": Ensure
method_of_paymentvalues are correctly formatted (WAVE,ORANGE_MONEY,FREE_MONEY,BANK) without spaces. - Webhook not updating orders: Verify the webhook URL is correctly registered in Naboopay and the secret key matches.
- API connection issues: Check your API token and ensure your server can reach
https://api.naboopay.com. - Order created but payment fails: Review
debug.logfor detailed error messages and validate product data (e.g.,amountmust be a valid number).
Supported Currencies
- The plugin assumes compatibility with Naboopay-supported currencies (e.g., XOF). Confirm with Naboopay support if your store uses a different currency.
License
This plugin is licensed under the GPL-2.0 License.
Support
For assistance, open an issue on the GitHub repository (update this link if applicable) or contact Naboopay support.
Contributing
Contributions are welcome! Fork the repository, make your changes, and submit a pull request.
Changelog
- 1.0.5: Fixed
method_of_paymentvalidation for API compatibility (replaced spaces with underscores). - 1.0.4: Added PHP 8.2 compatibility with explicit property declarations.
- 1.0.0: Initial release with basic payment and webhook functionality.