Creating a payment module

Principles

A payment module is a regular PrestaShop module, except that it extends the PaymentModule class instead of the Module class:

class MyOWnPaymentMethod extends PaymentModule

It can be attached to the following hooks:

The handling of the payment itself is done through a controller or a remote server.

If you are using a remote server, a return URL makes it possible to execute a script from your module's folder in order to validate and register the payment.

Validating the payment

In order to register the payment validation, you must use the validateOrder() method from the PaymentModule class, using the following parameters:

Securing the module

Here are a few basic rules: