Create arbitrary payment option in Prestashop
Types of payment options in Prestashop
In Prestashop, usually payment methods are created through dedicated payment modules, typically one payment module creates one payment option.
There can be exceptions and modern payment modules provide multiple payment options, generally even dynamically created through JS (which is a challenge for third party one page checkout modules). This is the case for PS checkout, Stripe official, Paypal, any many more.
Some good old style payment modules are meant to create single payment option, e.g. bank payment (ps_wirepayment module), or cash on delivery, alternatively with a configurable fee.
And the third option is - and this is what this short post is about - module to create arbitrary payment option. There are probably some other options, but the Universalpay has been around for quite a long and it's open source.
Universalpay - one module to spawn multiple payment options
Here are the steps to enable custom payment options - note please however, these will be simple payment options, no API calls, no real-time payment validation. If you're OK with that, let's go:
- Install the UniversalPay Module: Download the UniversalPay module from its GitHub repository. In your PrestaShop admin dashboard, navigate to Modules and Services (or Modules -> Module Manager) and install the module.
- Configure the Payment Method: Customize the payment method according to your requirements. You can create multiple methods and bind them to specific carriers. The module provides additional input fields, which you can use in mail templates (e.g.,
{up_name}
). - Test the Payment Method: After configuring, test the payment method thoroughly to ensure it works as expected. Make a test purchase using the newly added payment method to verify its functionality.
Keep in mind that this module doesn't require programming skills, making it accessible for non-developers. If you encounter any issues or need further assistance, refer to the module's documentation or community forums.