Monext offers you a plugin to add the payment module to your Sylius e-commerce platform.
This allows rapid implementation of the Monext Online solution.
The available functions are:
The payment process
1. The buyer validates his order.
2. He validates his payment method.
3. Then he selects his payment method and enters his payment information.
In the order details of your console, Sylius allows you to directly access the details of the transaction(s): a box allows you to carry out validation and reimbursement actions.
Depending on your payment method configuration, you will need to validate your order in the Sylius console.
In the Sylius console:
The order information is sent to Monext as soon as the order is validated:
You can cancel an order only from the Sylius console before it is validated.
You can refund an order only from the Sylius console after it is validated.
You must follow the procedure indicated on Github: https://github.com/Monext/monext-sylius
After installing the Monext payment module, you must configure the payment methods by selecting the Monext module type.
Install the plugin
1. Simply add the plugin to your project:
composer require monext/monext-sylius
2. Add plugin dependencies to your file by adding this line to the end of the array (if it doesn't already exist): config/bundles.php
MonextSyliusPlugin\MonextSyliusPlugin::class => ['all' => true]
3. Then add this line to : templates/bundles/SyliusShopBundle/Checkout/SelectPayment/_choice.html.twig
@@ -14,5 +14,8 @@ {% if method.gatewayConfig.factoryName == 'sylius.pay_pal' %} {{ render(controller('Sylius\\PayPalPlugin\\Controller\\PayPalButtonsController::renderPaymentPageButtonsAction', {'orderId': order.id})) }} {% endif %} + {% if method.gatewayConfig.factoryName == 'monext' %} + {{ render(controller('MonextSyliusPlugin\\Controller\\Shop\\MonextController::renderPaymentMethodAction', {'orderId': order.id})) }} + {% endif %} </div> </div>
4. Finally, add this to the section: config/packages/_sylius.yaml
imports
- { resource: "@MonextSyliusPlugin/Resources/config/config.yaml" }
5. Clear cache and run migrations:
bin/console cache:clear bin/console doctrine:migration:migrate
6. Log in to the Sylius administrator area, then click on the left menu item “CONFIGURATION > Payment methods”. You can add a new payment method of the “Monext” type there.
This section allows you to configure and select from the active payment methods at your point of sale those which will be used in the store.
You can configure different payment tunnel in this section.
You can also sort in the display order by setting the location number.
The first one in the list will be presented first in the checkout form.
The payment methods offered on the redirection page are configured on the administration center with the smartdisplay function .
Menu : Configuration > Payment methods
Create a payment method:
Code of your payment mode.
The web channel used
Module type
API Key
Point of sale
Capture type:
Automatic (on command).
Manual (on dispatch): add the name of the transition allowing the capture.
Environment :
Sandbox (Homologation)
Production
Contract numbers
Title and description are defined per language.
The title of the payment method is visible on the order in the Payment box and on the payment page, as well as the description.