My-CoolPay WordPress Docs

My-CoolPay merchant dashboard
My-CoolPay Merchant API is the easiest and most secure way to effortlessly accept payments from your customers on your websites and mobile applications. It has several integrated payment methods (Orange Money, MTN Mobile Money, VISA, Mastercard, My-CoolPay...) and offers you a unified view for a better follow-up of your activity.
- Developer: Digital House International (DHI)
- Support address: support@my-coolpay.com
- Contact / WhatsApp: (+237) 654 197 288
- Last edit: 25/11/2021
French version 🇫🇷
Une ancienne version de cette documentation est disponible en français, elle n'a pas été mise à jour depuis le 14/10/2021. Il est possible qu'elle soit obsolète à l'heure actuelle. Si vous souhaitez néanmoins l'utiliser, elle est disponible au format PDF à l'adresse ci-dessous.My-CoolPay_WordPress_Documentation_FR_2021-10-14.pdf
Requirements
Before you can integrate My-CoolPay WordPress Plugin into your website or application, you must:
- Have access to My-CoolPay merchant area, it can be obtained by following My-CoolPay’s Merchant API application procedure;
- Create an application from your merchant area by filling in following information:
- A name (which will be displayed on your payment page);
- The link to the home page of your website (or application);
- The URL of the logo to be displayed on your payment page;
- A redirection URL in case of a successful payment;
- A redirection URL in case of cancelled payment;
- A redirection URL in case of failed payment;
- A callback URL (see callback handling);
- The email address that should receive payment notifications.
- Have your application validated by My-CoolPay (done automatically within 24h after creation). Once this has been done, you will see two API keys appear in the application details: a public key and a private key (to be kept secret).
- Install WooCommerce on your WordPress website;
- Set your currency to Central African CFA franc (CFA), West African CFA franc (CFA) or Euro (€) in WooCommerce → Settings → General;
- Check the URL structure of your WordPress website:
1. Go to Settings → Permalinks;
2. Select "Custom Structure."
3. Check if there is an "/index.php" prefix as in following screenshot. If so, remove it from the link, if not, do not make any changes and go directly to the next section.

1. Plugin installation
My-CoolPay - Payment gateway for WooCommerce is the WordPress plugin for My-CoolPay merchant API. It has been tested with version 5.5.1 of WordPress and PHP version 7.1. It may work with earlier versions of PHP and WordPress, but it is recommended that you use (at least) the versions on which the plugin has been tested.
Go to Plugins → Add New and search for the plugin among WordPress extensions as shown in the following screenshot, you can use the following keywords: my-coolpay, mycoolpay. Then click on Install Now

Go to Plugins → Installed Plugins and activate My-CoolPay - Payment gateway for WooCommerce

2. Plugin settings
2.1. Insert My-CoolPay API keys in WooCommerce settings
From your WordPress admin interface, go to WooCommerce → Settings → Payments. In the list of payment methods, you will see My-CoolPay - Payment gateway for WooCommerce, click on Set up (or Manage depending on your WooCommerce version).

In the form you'll have the following fields:
- Enable/Disable: Checkbox to enable/disable the plugin, make sure it is checked;
- Description: Description of the plugin visible on the order validation page by customers;
- Callback URL: This is the notification URL that will be called when a payment is made on your website via My-CoolPay, in order to update the status of the order;
- Public Key: Public key of your application on My-CoolPay;
- Private Key: Private key of your application on My-CoolPay;
- Payment button text: The text displayed on payment button in checkout page;
- Enabled payment methods: Used to select which operator logos should be be diplayed on checkout page.
In another tab of your browser, log in to your My-CoolPay merchant space and go to Applications. In the list of your applications, click on the Details button of your concerned application, copy your public key (highlighted in green) and paste it into the Public Key field in WooCommerce payments settings, copy your private key (highlighted in red) and paste it into the Private Key field in WooCommerce payments settings, then click Save changes.

2.2. Set callback URL in My-CoolPay settings
In your application details on My-CoolPay, click on Edit. Copy the URL from the Callback URL field in the plugin settings and paste it into the Callback URL field in your application settings on My-CoolPay and click Save.

3. Security 🔐
3.1. API keys privacy
🔒 Public key: This key is the one that identifies your application on My-CoolPay, it is public and you won't run any security risk by exposing it.
🔑 Private key: This key is to be kept secret, avoid leaving it lying around in the versioning if you are using a VCS (like Git or Mercurial). It is used by My-CoolPay to sign your callback requests and by you as a password during API withdrawals.
⚠️ Warning: If you become aware that your keys have been compromised or are being used illegally, generate new keys from your My-CoolPay merchant area (in application settings).
3.2. SSL certificate
It is highly recommended (or even mandatory) to install an SSL certificate on your server so that data exchanges with it are secure. My-CoolPay won’t send payment notifications (callback) to neither an unsecured address, nor localhost.
More assistance
ℹ️ To technically understand how this plugin works internally, you can refer to My-CoolPay API documentation. If you need further information or assistance, our teams are available at support@my-coolpay.com. You can also get help from the developer community 💬