POS: Caisse-AP payment protocol for France
l10n_fr_pos_caisse_ap_ip · OCA/l10n-france
-
Security25/25No findings
-
Activity20/25Last human commit 12 months ago
-
Required by5/250 modules depend on it
-
Maturity25/25In 5 Odoo series since 14.0
Heuristic over the facts below, not an audit · How it's computed
Description
This module adds support for the Caisse AP protocol over IP in the Odoo Point of Sale.
The Caisse AP protocol is a vendor-independent protocol used in France to communicate between a point of sale and a payment terminal. It is implemented by Ingenico payment terminals, Verifone payment terminal and other brands of payment terminals. This protocol is designed by a French association called Association du paiement, abbreviated as AP. Note that the Caisse-AP protocol is used by Ingenico payment terminals deployed in France, but not by the same model of Ingenico payment terminals deployed in other countries!
This module support a bi-directionnal link with the payment terminal:
- it sends the amount to the payment terminal
- it waits for the end of the payment transaction
- it parses the answer of the payment terminal which gives the payment status: in case of success, the payment line is automatically validated ; in case of failure, an error message is displayed and the Odoo user can retry or delete the payment line.
The Caisse-AP protocol was initially written for serial and USB. Since the Caisse AP protocol version 3.x, it also supports IP. When used over IP, the client (point of sale) and the server (payment terminal) exchange simple text data encoded as ASCII over a raw TCP socket.
The Caisse-AP protocol has one important drawback: as it uses a raw TCP socket, it cannot be used from pure JS code. So the JS code of the point of sale cannot generate the query to send the amount to the payment terminal by itself. In this module, the JS code of the point of sale sends a query to the Odoo server that opens a raw TCP socket to the payment terminal. It implies that, if the Odoo server is not on the LAN but somewhere on the Internet and the payment terminal has a private IP on the LAN, you will need to setup a TCP port forwarding rule on the firewall to redirect the TCP connection of the Odoo server to the payment terminal.
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 1
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
pos_payment_method_view_form |
pos.payment.method | form | Inherits point_of_sale.pos_payment_method_view_form |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 1
-
fr_caisse_ap_ip_addressCharhelp='IP address or DNS name of the payment terminal that support Caisse-AP protocol over IP'string='Caisse-AP Payment Terminal IP Address' -
fr_caisse_ap_ip_modeSelectiondefault='card'string='Payment Mode' args: [('card', 'Card'), ('check', 'Check')] -
fr_caisse_ap_ip_portIntegerdefault=8888help='TCP port of the payment terminal that support Caisse-AP protocol over IP'string='Caisse-AP Payment Terminal Port'
-
fr_caisse_ap_ip_send_payment(self, data)@api.modelMethod called by the JS code of this module
Loading…
Loading…
Loading…
Loading…