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.
- the plugin.
- Extract the zip file into MagentoHomeDir/app/code folder.
- Open a terminal and navigate to your Magento app root directory. Then, run the following commands in sequence:
- If you run Magento in production mode, you also must compile and deploy the module’s static files:
- 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.
php bin/magento setup:upgrade
php bin/magento cache:flush
php bin/magento cache:clean
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
Setup and Configuration
- Configure country information: click
GENERAL -> General -> Country Options
to configure the country information where the store is located. - Configure Currency: click
GENERAL->Currency Setup
to go to the configure Currency page and select the corresponding Currency. - In your Magento admin panel, navigate to
Stores->Configuration->Sales->Payment Methods
. - Click on
Configure
, after filling in the payment parameters, clickSave Config
to Save. - Within the "Configuration" page, please fill the fields as described in the following table:
- Enable OPay plugin by selecting
Yes
in theEnabled
select box. - Once you're done, click on save changes button.
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 |