My payment methods Opencart 3
The module is designed to add your own payment methods to the online store on Opencart 3. It allows you to set the dependencies of the added payment methods on different order parameters. Each method of the ""My payment methods"" module can be assigned its own cost, its own dependencies, order status after completion, description, and logo, payment instructions.
You can also specify a link for each payment method to automatically redirect the client to the payment page. It is possible to integrate into the payment gateway, pass order parameters in the request and receive a response from the payment system and process it. You can also work using the API protocol of payment systems.
Dependence of payment methods:
- from the amount of the order;
- from the weight of the order;
- from the number of goods in the basket;
- from goods, their categories and manufacturers;
- from client groups;
- on delivery methods;
- from geofence (regions), country or cities;
- from coupons and certificates;
- from the date and time, as well as the day of the week;
- currency and shop.
My payment methods. Module installation:
- Install localcopy if you don't already have it.
- Download the module archive in the Installing Modules section.
- Update modifier cache.
- Update the cache of twig templates.
- Go to Modules > Modules > select the ""Payment Methods"" module type > enable the ""My Payment Methods"" module
- Edit the module, add your payment methods.
- ""Success URL"" - the link to which the buyer will be returned after placing (and paying) the order. You can also specify here a link to the payment page if the payment method does not provide for the transfer of any order data to the payment gateway.
- ""Callback URL"" - a link to the handler script that will be called in the background after the order is completed at the last stage before going to the Success URL.
- ""Redirect URL"" - a link for redirecting the client to the payment page, if it is necessary to transfer additional data about the order from the ""Transmitted data"" field.
- ""Data (Data)"" - json array with parameters that need to be passed to the Redirect URL, such as order number, order amount, and other parameters according to the payment system documentation
- ""Conditions for successful payment"" - if you want to change the status of the order after payment only after checking some parameters, specify the conditions for checking here. An example of such a condition is: first_var === false && second_var == ""success"". Note that you don't need to use the dollar sign ($) with the variable name as you would in PHP. The variables will be extracted from the payment gateway response data to the Success URL. You can also use any php function for left side parameter encapsulated with double underscore like __is_numeric__ price == true where is_numeric is function name and price is the variable name
10/12/2020 - minor compatibility issue with ""My Shipping Methods"" module has been fixed
11/18/2020 - the dependence on the methods of the ""My delivery methods"" module has been fixed
11/19/2020 - improved compatibility with checkout modules
11/21/2020 - fixed a bug with the mass selection of categories in dependencies
- Opencart 3.0.0.0
- Opencart 3.0.1.1
- Opencart 3.0.1.2
- Opencart 3.0.2.0 или ocStore 3.0.2.0
- Opencart 3.1.0.0
- Opencart 3.0.3.1
- Opencart 3.0.3.2
- Opencart 3.0.3.3
- Opencart 3.0.3.6
- Opencart 3.0.3.7 и OcStore 3.0.3.7
Solution:
Download and install the Localcopy OCMOD add-on
After installing this add-on, you need to go to the Modifiers section and click the "Update modifiers" button. After that, you can install other modules
There are some problems and possible solutions:
1. The template cache has not been reset - you need to update the cache [screenshot]
2. When you previously edited template files through the admin panel in the "Theme Editor" section, they were saved in the database and it is no longer affected by ocmod modifiers, this is an Opencart 3 issue. You need to install an extension [download] and update the modifications in the admin panel.
3. Your template is based on TPL files (*.tpl), while in Opencart 3 templates should be in TWIG format (*.twig). The problem is that ocmod modifiers do not affect TPL files - all changes must be made to these files manually.
You need to enable the output of all php errors on the screen - for this, in the .htaccess file at the end you need to add the lines:
php_value display_errors 1
php_value display_startup_errors 1
php_value error_reporting E_ALL
Now, instead of error 500, an error code should be displayed, which will indicate the issue.
There is a bug in official Opencart 3.0.3.5 - 3.0.3.6 patches - modifiers do not work with twig files due to an error in the standard modifier /system/modification.xml - the second operation from this modifier does not work.
The problem occured in official github and proposed solution is https://github.com/opencart/opencart/blob/3.0.x.x_Maintenance/upload/system/modification.xml
We made a fix modifier according to these recommendations, it will replace the /system/modification.xml file with the correct one.
Solution:
1. Back up your /system/modification.xml file
2. Download the fix modifier from the link and install it in your admin panel
3. Update mod cache
4. Update twig template cache
- Categories: Payments Modules
- Tags: payment , methods , opencart3 , module , module opencart
- Author: Opencart
-
Price: $39,00
- Compatibility Guaranteed
- Only OCMOD
- Not linked to a domain
- Open source
- Virus-free
- Support
Information:
- Common mistakes in Opencart 3
- Opencart 3.0 custom VAT collection module from the order amount
- Updating the NBU exchange rate for Opencart 3 is a useful module for resource operations.
- Different Prices for Customer Groups - a tool for managing prices in stores.
- How does the Opencart 3.0 Module Order in 1 Click work?
- Opencart 3.0 Related Products Module: How to Use
- Opencart 3 store reviews
- Multidelivery of goods in opencart. Advantages for online stores