Message-ID: <1271984387.377206.1711617921422.JavaMail.root@confluence-doc2-production> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_377205_217638065.1711617921417" ------=_Part_377205_217638065.1711617921417 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
A payment module is a regular PrestaShop module, except that it extends =
the PaymentModule
class instead of the Module
cla=
ss:
class My= OWnPaymentMethod extends PaymentModule=20
It can be attached to the following hooks:
payment
: to display the payment method.paymentReturn
: to display the payment confirmation.The handling of the payment itself is done through a controller or a rem= ote 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 valid=
ate and register the payment.
In order to register the payment validation, you =
must use the validateOrder()
method from the PaymentModu=
le
class, using the following parameters:
=C2=9F(integer) id_cart
: the ID of the cart to validate.
(integer) id_order_state
: the ID of the order status (Awiting=
payment, Payment accepted, Payment error, etc.).
(float) amount_paid
: the amount that the client actually paid=
.
(string) payment_method
: the name of the payment method.
Here are a few basic rules:
Check that the module is activated:
if (!$th= is->active) return;=20