Commit Graph
9 Commits
Author SHA1 Message Date
Rémi Rahir 1bbee97e3c [IMP] iap: support flexible credit capture
Added a possibility to authorize a certain credit amount and capture another (smaller or equal) at the end of the transaction.
For instance, you want to print 2 jobs and one of them fails, you will be able to only print the one that succeeded.
2018-01-15 18:09:53 +01:00
xmo-odoo b62bb5add2 IAP doc: tutorial (#20317)
* [ADD] doc: iap tutorial

Should be easier to approach than the raw APIDoc. 
contains:
- overview of the flow
- tutorial (coalroller) with guidelines
- technical description of objects/helpers
2017-11-02 19:06:33 +01:00
Rémi Rahir d70518d04f [FIX] iap: py2 compatible version of previous fix
Applying a proper way to deal with bytestring /byte correspondance in python2/3 respectively.
fixing non retrocompatible code introduced in e9b969b39d
2017-10-20 20:34:16 +02:00
Rémi Rahir e9b969b39d [FIX[ iap: encoding of Qweb render
The Qweb render method returns a strign encoded in byte.
As we want to dump this into a json string in iap.charge,
we need to decode it properly in UTF-8, before the dump.
This problem appeared in Python3.
2017-10-20 18:02:39 +02:00
Rémi Rahir 47b8887ff5 [FIX] iap_odoo: fix error general error raise
Errors that are not whitelisted are not managed correctly due to the jsonrpc behaviour in Odoo.

When we make a post in json using iap.jsonrpc function, it contacts iap.odoo.com.
However, if this url does not respond, it falls back to the 'typo' page and the answer to the call
has a '200' status code but with an 'error' key in its response.

Currently, we manage the errors via whitelisting, which hides this kind of errors.
We opted to raise this error (odoo server side) as a UserError and to add UserError to the whitelist.
2017-10-18 17:08:21 +02:00
Rémi Rahir eba119b38f [FIX] iap: typo
typo missed during merge. We rename end_point to endpoint as it is the correct denomination.
2017-10-13 15:09:20 +02:00
Rémi Rahir ee73f6a028 [FIX] iap: fix charge helper
InsufficientCreditError was not properly raised, thus not caught by the JS.
2017-10-10 17:34:07 +02:00
David Monjoie 6f6f3a44e6 [FIX] iap: remove urllib3 dependency
Since it's not compatible with Python 2.
2017-10-09 08:19:15 +02:00
Antony Lesuisse 6b22476e20 [ADD] iap: In app purchase
IAP allow app publishers to charge for ongoing services. In that context, Odoo
acts mostly as a payment platform between the service user (client) and the service
provider (Odoo App developer).
2017-10-04 20:22:22 +02:00