Difference between revisions of "Online payment system"
m Tag: 2017 source edit |
(Add Chinese) Tag: 2017 source edit |
||
Line 1: | Line 1: | ||
+ | <!-- BEGIN origin interlang links --> | ||
+ | <!-- You can edit this section but do NOT remove these comments | ||
+ | Links below will be automatically replicated on translated pages by PolyglotBot --> | ||
+ | [[zh:在线支付系统]] | ||
+ | <!-- END interlang links --> | ||
+ | |||
Dolibarr provide native modules to make online payments of your invoices, orders, membership, registration to events... | Dolibarr provide native modules to make online payments of your invoices, orders, membership, registration to events... | ||
The native payment modules are Paypal and Stripe. But you can add you own modules to support other payment services. | The native payment modules are Paypal and Stripe. But you can add you own modules to support other payment services. |
Revision as of 08:04, 12 October 2023
Dolibarr provide native modules to make online payments of your invoices, orders, membership, registration to events...
The native payment modules are Paypal and Stripe. But you can add you own modules to support other payment services.
For this, you must create a module (Module_development) that implement the following hooks for the context "newpayment" :
- doValidatePayment
- doCheckStatus
- doAddButton
- doPayment
- isPaymentOK
Hook doValidatePayment
To return a code for your payment mode (used at different place of Application)
Hook doCheckStatus
Not usefull
Hook doAddButton
To define the button to add on the payment page /public/payments/newpayment.php
Hook doPayment
To show a form to show to make the payment. The form will be show after selecting your payment service on the page /public/payments/newpayment.php. This page must set the session variable $_SESSION['TRANSACTIONID'] (For example "YYYYMMDDHHMMSS-abc") and $_SESSION["FinalPaymentAmt"] (For example "123") and $_SESSION['currencyCodeType'] (for example "USD"). They will be used by the page called after payment /public/payment/paymentok.php
Hook isPaymentOK
to say if a payment is ok or not when entering the fallbackpage /public/payment/paymentok.php. If ok, the rest of common actions are done (payment registered, status of object modified), if not nothing is done except showing an error message.