1. PayPlug installation via the Magento Back-office
You can follow the Magento documentation Provided on that page:
- Create your ids to access to the Magento marketplace
- Search and add to the cart the Magento 2 PayPlug plugin, you will get the authentication keys
- Connect to your Magento back-office
- Go to the "System" menu >Web Setup Wizard
- Click on "Extension Manager"
- If asked, connect to "Extension Manager"
- You will then be asked to connect with the public and private key on the Marketplace when uploading a plugin.
- Click on "Submit"
- After connecting to the PayPlug plugin you will find the screen below
- Click on the "Extensions/ Ready to Install"
2. Installation via Composer
You can install the PayPlug plugin with our updated Github documentation
In order to install the PayPlug plugin on Magento 2 with Composer, you will then have to apply the following command at the Magento root:
composer require payplug/payplug-magento2 (*)
php bin/magento module:enable Payplug_Payments --clear-static-content
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy <languages> (**)
php bin/magento cache:clean
(*) If you haven't saved them when installing Magento 2, this command will ask you your Magento authentication keys. (https://devdocs.magento.com/guides/v2.3/installgde/prereq/connect-auth.html).
(**) With the <languages> option you can define for wich language you wish to generate content. Languages must be separated by a space.
If you are not LIVE, use the option "--force". Otherwise the command will fail.
If you get an error message while processing the payment like this one :
[ReflectionException] Class Payplug\Authentication does not exist
The PayPlug PHP library might not have been installed with the Magento plugin installation. It can happen if you haven't installed the plugin via Composer. To fix this, you should ask for the missing dependencies with composer :
composer require payplug/payplug-php
2.2 Payment status update
They are 3 possibilities available to update your payments:
- paymentReturn: called automatically by PayPlug after the payment form validation
- Instant Payment Notification: activated by PayPlug after submitting the payment form. You should note that to benefit from the IPN, your server should be reachable by PayPlug. The IPN calls will fail on most development environment.
- The "Update Payment" button on the Magento order view: it sends a request to PayPlug to get the current payment status.
For the several installments payments, each time a new payment will be added, a notification will be sent to your server. It will activate the modification of the amount due for the order
3. Uninstalling the plugin
As for all payment methods, it is not advised to uninstall the payment plugins. Once the orders are created using this given means of payment, Magento will need the plugin code to display the order information, and will crash if it doesn't find them.
Thus, if you wish one day, to stop using our plugin, we recommand you simply to set up the "Enabled" setting to "No"
Going further :