-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] shopinvader_api_payment: fix README
- Loading branch information
Showing
3 changed files
with
542 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
======================= | ||
Shopinvader Api Payment | ||
======================= | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:475f30ab8c29fb15b5284b3f9774175053a34c7c5ad85f58f0a28b2b9171cd49 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Beta | ||
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
.. |badge3| image:: https://img.shields.io/badge/github-shopinvader%2Fodoo--shopinvader--payment-lightgray.png?logo=github | ||
:target: https://github.com/shopinvader/odoo-shopinvader-payment/tree/16.0/shopinvader_api_payment | ||
:alt: shopinvader/odoo-shopinvader-payment | ||
|
||
|badge1| |badge2| |badge3| | ||
|
||
Base module for Shopinvader payment services. It defines the | ||
provider-independent routers. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Usage | ||
===== | ||
|
||
This addon is the core of the new Shopinvader API Payment addons suite. | ||
It defines basic services, which will be extended in two axes. | ||
|
||
* The first axe concerns the payable object. Here the methods should work with any abstract payable object (sale order, account invoice, ...) but specific logic must be implemented in related addons (see `shopinvader_api_payment_cart` to pay sale orders for eg.) | ||
* The second axe concerns the payment provider. The idea is to develop one addon for each payment provider. Some of them are already available, see `shopinvader_api_payment_sips`, `shopinvader_api_payment_stripe`, `shopinvader_api_payment_custom`. In these addons we add the necessary logic to redirect to the payment provider payment website, the return url ... | ||
|
||
All payment routes are public. We must thus encode all sensitive info. | ||
The `Payable` object achieves this. In each service we ensure that the payable | ||
wasn't tampered. | ||
|
||
**Concrete Usage** | ||
|
||
The idea to use this suite of addons is the following. Assume you have a valid | ||
payable (see addons of the first axe on how to get them, for eg. `shopinvader_api_payment_cart` | ||
on how to get the payable of the current cart). | ||
|
||
1. Get all providers that are allowed to pay your payable object. | ||
You just need to call the GET route `/payment/methods` with your payable for this. | ||
|
||
2. Once you chose the payment method you want to use, create the payment transaction | ||
calling the POST route `/payment/transactions` with your payable + some | ||
additional input info (the chosen provider, the frontend redirect url...). | ||
See the associated `TransactionCreate` Pydantic schema. | ||
|
||
3. The following (and last) step depends on the chosen provider. See more info | ||
into the dedicated Shopinvader API payment addon. | ||
However, the idea is often the same: a `redirect_form_html` is returned and | ||
you should submit this HTML form to call the provider services. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/shopinvader/odoo-shopinvader-payment/issues>`_. | ||
In case of trouble, please check there if your issue has already been reported. | ||
If you spotted it first, help us to smash it by providing a detailed and welcomed | ||
`feedback <https://github.com/shopinvader/odoo-shopinvader-payment/issues/new?body=module:%20shopinvader_api_payment%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Credits | ||
======= | ||
|
||
Authors | ||
~~~~~~~ | ||
|
||
* ACSONE SA/NV | ||
* Shopinvader | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* Marie Lejeune <[email protected]> | ||
* Stéphane Bidoul <[email protected]> | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
||
This module is part of the `shopinvader/odoo-shopinvader-payment <https://github.com/shopinvader/odoo-shopinvader-payment/tree/16.0/shopinvader_api_payment>`_ project on GitHub. | ||
|
||
You are welcome to contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Base module for Shopinvader payment services. It defines the | ||
provider-independent routers. |
Oops, something went wrong.