=== CamPay Give Donation Payment Gateway === Tags: givewp, donations, mobile money, orange money, mtn Requires at least: 6.6 Tested up to: 7.1 Requires PHP: 7.4 Stable tag: 2.0 License: GPLv3 License URI: https://www.gnu.org/licenses/gpl-3.0.html Accept donations in GiveWP with MTN Mobile Money, Orange Money and debit or credit cards through CamPay. == Description == CamPay is a Cameroonian fintech service of TAKWID GROUP, running since January 2021. It lets businesses and organisations collect and send money online, mainly through MTN Mobile Money and Orange Money. This plugin adds CamPay as a payment gateway to [GiveWP](https://wordpress.org/plugins/give/), so your donors can give from their phone in a few seconds. = How donors pay = * **Mobile Money**: the donor enters their 9-digit MTN or Orange number, clicks Donate and approves the payment on their phone with their PIN. No prompt? They can dial *126# (MTN) or #150*50# (Orange) to approve pending payments. * **Debit or credit card**: the donor is sent to a secure CamPay page to enter their card details, then comes back to your site. Cards are only offered when you enable them and card payments are activated on your CamPay account. = Features = * Works with both GiveWP form types: Visual Form Builder forms and legacy (option-based) forms * MTN Mobile Money and Orange Money, with phone number validation * Debit and credit card payments on the secure CamPay page * Demo mode to test with the CamPay demo environment * Donations in FCFA (XAF), and optionally in US dollars or euros converted to XAF with your own rates * Webhook: payments confirmed after the donor left the page are still recorded * Every card return and webhook is checked with the CamPay signature and verified with the CamPay API before a donation is marked as paid * The CamPay reference and the operator (MTN / Orange) reference are saved on every donation * When something goes wrong, the real CamPay error is saved in an admin note on the donation and in Donations > Tools > Logs, so you know exactly what happened = Requirements = * GiveWP 3.0 or newer * A CamPay account and app: sign up on [campay.net](https://www.campay.net/) (or [demo.campay.net](https://demo.campay.net/) to test) * For card payments: card payments activated on your CamPay account, and your site on a public domain (CamPay does not accept return addresses on localhost) == Installation == 1. In your WordPress dashboard go to Plugins > Add New, search for "CamPay Give Donation Payment Gateway", then click Install and Activate. GiveWP must be installed and active. 2. Go to Donations > Settings > Payment Gateways > Campay. 3. Tick "Demo Mode" to test with the CamPay demo environment, or leave it unticked for real payments. Demo and live apps have different credentials. 4. Enter the App Username and App Password of your CamPay app (found in your CamPay dashboard). 5. In your CamPay dashboard, set the Webhook URL of your app to the URL shown under "Webhook Key" in the plugin settings, then copy the app's Webhook Key into the "Webhook Key" field. 6. Optional: tick "Card Payments" to let donors pay by card. 7. Optional: tick "USD Donations" and/or "EUR Donations" and set how many FCFA one dollar or one euro is worth. 8. Save, then go to Donations > Settings > Payment Gateways > Gateways and enable "Campay (Mobile Money & Cards)" (for Visual Form Builder forms, also enable it in the form's payment gateways). == Frequently Asked Questions == = Where do I find my App Username, App Password and Webhook Key? = Log in to your CamPay dashboard, open your app and look under the app keys. The demo site (demo.campay.net) and the live site (campay.net) have different apps and credentials: use the demo ones with Demo Mode ticked. = Why don't donors see the card option? = Check that "Card Payments" is ticked in the plugin settings and that card payments are activated on your CamPay account (contact CamPay if not). The plugin checks your account and only shows cards when they are available. = Card payments fail with "Invalid redirect_url" = CamPay refuses return addresses on localhost or private domains. Card payments need your site on a public domain. Mobile Money works everywhere. = Which currencies are supported? = CamPay charges in FCFA (XAF). If your GiveWP currency is USD or EUR, enable the matching conversion in the plugin settings; the amount is converted with your rate and rounded up to the next franc. = The donor did not receive the payment prompt = Ask them to check that the number is a valid MTN or Orange number with enough balance, then to dial *126# (MTN) or #150*50# (Orange) to approve pending payments. The donation form waits up to 2 minutes; later approvals are recorded by the webhook. = What is the webhook for, and why is a Webhook Key required? = CamPay calls the webhook when a payment is confirmed or fails, so donations approved late are still recorded. Each call is signed by CamPay with your app's Webhook Key; calls without a valid signature are refused. = Where can I see what went wrong with a donation? = Open the donation in Donations: the notes show the CamPay error returned by the API. The full details (HTTP status, response and request, without your password) are in Donations > Tools > Logs. Only users who can manage donations see them. = Does refunding a donation in GiveWP refund the donor? = No. Marking a donation as refunded in GiveWP does not send money back through CamPay. Refund the donor from your CamPay account. == External services == This plugin connects to the CamPay API (https://www.campay.net, or https://demo.campay.net in Demo Mode) to process donations. It is required for the gateway to work. * **Authentication**: when a payment is processed or card availability is checked, your App Username and App Password are sent to get an access token. * **Card availability**: when a donation form is displayed with card payments enabled, the plugin asks CamPay whether cards are activated on your account (the answer is cached for up to an hour). * **Mobile Money payment**: when a donor submits a donation, the amount in XAF, the donor's phone number, a description (donation number and site address) and a unique reference are sent. The plugin then checks the payment status until it is confirmed. * **Card payment**: when a donor chooses to pay by card, the amount in XAF, a description, a unique reference, the donor's first name, last name and email, and the return address on your site are sent to create the payment page. The donor enters card details on the CamPay page, not on your site. * **Verification**: when the donor comes back from the card page or CamPay calls the webhook, the transaction is fetched from CamPay to confirm it. CamPay is provided by TAKWID GROUP: [terms and conditions](https://www.campay.net/static/docs/CamPay_Terms_and_Conditions.pdf), [privacy policy](https://www.campay.net/static/docs/CamPay_Privacy_Policy.pdf). API documentation: [CamPay API](https://documenter.getpostman.com/view/2391374/T1LV8PVA). == Screenshots == 1. CamPay settings in GiveWP 2. Donation form with Mobile Money and card payment == Changelog == = 2.0 - 2026-09-15 = * New: debit and credit card payments on the secure CamPay page, when activated on the CamPay account * New: webhook, secured with the CamPay signature (JWT signed with the app Webhook Key); late Mobile Money confirmations are recorded * New: USD and EUR donations converted to XAF with manual rates * New: real CamPay API errors in an admin note on the donation and in Donations > Tools > Logs * New: webhook calls, card returns and transactions are logged in Donations > Tools > Logs * Security: card returns and webhooks are always verified with the CamPay API (reference and amount) * The CamPay and operator references are saved on every donation * New: phone number field with the +237 prefix * Fix: waiting for a Mobile Money confirmation no longer blocks the donor's other requests * New: support for GiveWP 3.x / 4.x Visual Form Builder donation forms * Fix: gateway failed on GiveWP 4.5+ because the payment gateway constructor was overridden * Fix: donation amount and currency are read from the donation instead of the legacy form request * Fix: CamPay errors (token, payment request, timeout, declined) are shown to the donor and saved as donation notes * Fix: broken markup on the legacy form phone number field * Requires WordPress 6.6, PHP 7.4 and GiveWP 3.0 = 1.0.0 - 2021-04-10 = * First release == Upgrade Notice == = 2.0 = Requires GiveWP 3.0 or newer, WordPress 6.6 and PHP 7.4. Adds card payments, the webhook and USD/EUR conversion. After updating, set the Webhook URL and Webhook Key of your CamPay app in the gateway settings.