OPay Magento Plugin

Running your business over Magento store? Use our Magento 2 plugin and start accepting payments directly via OPay. OPay Magento 2 plugin gives your clients access to all supported payment options over your Magento 2 store. After following closely the steps explained in this tutorial, your Magento 2 store will be able to start accepting payments through OPay payment channels.

Before you start

OPay payment integration with Magento 2 plugins is an easy process. No advanced development skills are needed.

In order to have a smooth and seamless integration, make sure you have the following compatibility list satisfied.

item compatible version References
Magento 2 2.3.4 or higher magento.com
PHP version 7.3 or higher magento.com

Installation

This document illustrates the steps to install OPay Magento plugin. Please follow closely these steps in order to integrate OPay plugin within your Magento 2 online store.

  1. Download the plugin.
  2. Extract the zip file into MagentoHomeDir/app/code folder.
  3. Open a terminal and navigate to your Magento app root directory. Then, run the following commands in sequence:
  4.                         
                                    php bin/magento setup:upgrade
                                    php bin/magento cache:flush
                                    php bin/magento cache:clean
                            
                        
  5. If you run Magento in production mode, you also must compile and deploy the module’s static files:
  6.                         
                                    php bin/magento setup:di:compile
                                    php bin/magento setup:static-content:deploy
                            
                        
  7. Well done, you have managed to install and activate Magento 2 OPay plugin. In your Magento admin panel, navigate to Stores->Configuration->Sales->Payment Methods you should see OPay payment methods installed.
  8. Magento 2 plugin activated feedback message screenshot

Setup and Configuration

  1. Configure country information: click GENERAL -> General -> Country Options to configure the country information where the store is located.
  2. Magento 2 plugin activated feedback message screenshot
  3. Configure Currency: click GENERAL->Currency Setup to go to the configure Currency page and select the corresponding Currency.
  4. Magento 2 plugin activated feedback message screenshot
  5. In your Magento admin panel, navigate to Stores->Configuration->Sales->Payment Methods.
  6. Magento 2 plugin activated feedback message screenshot
  7. Click on Configure, after filling in the payment parameters, click Save Config to Save.
  8. Magento 2 plugin activated feedback message screenshot
  9. Within the "Configuration" page, please fill the fields as described in the following table:
  10. field description example
    Enable Controls weather OPay can be used as a checkout payment method Yes/No
    Environment Controls weather OPay is running in production or Sandbox mode. Production/Sandbox
    Currency Payment Currency. PKR/EGP
    Merchant ID (Sandbox) Your Sandbox merchant ID you should have received it after creating an account. 256612345678901
    Secret Key (Sandbox) Your Sandbox Secret key you should have received it after creating an account. Secret Key
    Public Key (Sandbox) Your Sandbox Public key you should have received it after creating an account. Public Key
    callback URL (Read Only) Your Read Only callback URL over which the plugin listens to payment callback notifications. https://your-call-back-url
  11. Enable OPay plugin by selecting Yes in the Enabled select box.
  12. Once you're done, click on save changes button.

What's Next?

User Profile 12 messages

James Jones
Application Developer
Recent Notifications
Another purpose persuade Due in 2 Days
+28%
Would be to people Due in 2 Days
+50%
-27%
The best product Due in 2 Days
+8%