OPay Magento Plugin


Running your business using Magento's 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 in your store. After following closely the steps explained below, your Magento 2 store will be able to start accepting payments through OPay's payment channels.

Before you start


The OPay payment integration with Magento 2 is simple and we've provided easy steps to help you get up and running!

Note

Note

Make sure you have an active OPay account or you can create an account.


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 section illustrates the steps to install the OPay Magento plugin. Please follow the simple steps outlined below to integrate the OPay plugin with your Magento 2 store.


  1. Download the plugin.
  2. Extract the zip file into MagentoHomeDir/app/code folder.
  3. Error

    Error

    Do not rename the extracted folder. You should have the folder named OPay within which you should have a folder with the name OpayPayment.

  4. Open a terminal and navigate to your Magento app root directory. Then, run the following commands in sequence:
  5.                         
                                    php bin/magento setup:upgrade
                                    php bin/magento cache:flush
                                    php bin/magento cache:clean
                            
                        

  6. If you run Magento in production mode, you also must compile and deploy the module’s static files:
  7.                         
                                    php bin/magento setup:di:compile
                                    php bin/magento setup:static-content:deploy
                            
                        

  8. 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 the OPay payment method installed.
  9. 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.
  13. Note

    Congratulations!

    Your Magento 2 store is now ready to accept payments through OPay.

    Warning

    Warning

    Supported payment methods:

    • Bank Card
    • OPay Reference Code
    • Shahry
    • ValU
    • Mobile Wallet
    • Bank Installment

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%