Commit Graph
45 Commits
Author SHA1 Message Date
Ravi Gadhia 4ef937ed38 [MIG] payment_ogone: new API
No functional change.
2016-07-06 15:10:47 +02:00
Thibault Delavallée b6c5b3a6b7 [MOV] payment_ogone: file organization 2016-07-06 15:10:46 +02:00
Thibault Delavallée 88126f95d3 [REF] payment_*: method signatures
Methods with signature

 - cr, uid, id
 - cr, uid, <browse_record>

have been refactored to be future multi ensure one methods.
2016-07-06 11:47:39 +02:00
Joren Van Onder e3730cf1f2 [IMP] payment*,website: rename payment.method -> payment.token
payment.method was not a good name because it was too easy to confuse
with account.payment.method.
2016-06-17 13:09:18 +02:00
Joren Van Onder 101a9693b3 [FIX] payment*: fix invalid coding
-*- coding: utf-'8' "-*-"

is not a valid encoding. Introduced by
666387a274 I think. It was probably a
typo/replace gone bad and it got copy-pasted everywhere. Emacs complains
every time you try to save changes to files with this invalid encoding.

This changes all of them to

coding: utf-8

adhering to eae045949d.

Done with:

find . -name '*.py' -print0 |\
xargs -0 sed -ie 's/-\*- coding: utf-'"'"'8'"'"' "-\*-"/coding: utf-8/'
2016-06-17 13:09:18 +02:00
Christophe Simonis 928bc262a6 [MERGE] forward port of branch saas-6 up to 589751c 2016-06-02 14:26:19 +02:00
Christophe Simonis 589751ca28 [MERGE] forward port of branch 8.0 up to bde083a 2016-06-02 12:58:48 +02:00
Nicolas Martinelli ff38b370a1 [FIX] payment_ogone: missing key
The key 'PAYIDSUB' should be added in the list of SHA-OUT keys.,
otherwise the signature is wrong.

opw-678718
2016-05-27 13:35:09 +02:00
Olivier Dony d6ec8f7bc3 [FIX] payment_ogone: transaction code for alias AFU
The Automated File Upload (AFU) Ogone API requires a transaction code to be set,
either:
 - ATR for automated transactions
 - MTR for maintenance operations

The default is ATR and is used for submitting transactions in batch.
However, the server-to-server mode of payment_ogone only uses the AFU
API to create new credit card aliases, and not to process transactions.

Using the ATR transaction code requires the ATR feature to be available
in the Ogone Merchant account - a paying option that is otherwise
unused. Using MTR as the transaction code is sufficient for adding
aliases, and the corresponding feature (MTR) is available at no cost
in most Ogone Merchant Accounts.

References:
 - Ogone Advanced Batch:
    https://payment-services.ingenico.com/int/en/ogone/support/guides/integration%20guides/batch
 - Ogone Alias Management:
    https://payment-services.ingenico.com/int/en/ogone/support/guides/integration%20guides/alias/bulk-alias-management-via-batch
2016-04-27 18:19:27 +02:00
Damien Bouvy a5e8f22701 [FIX] payment_ogone: s2s response should generate payment method
Ogone responses comes from direct s2s calls or form feedback;
not necessarily in that order. The behaviour of the system should
be the same in both cases. This commit add payment_methode creation
when a s2s response contains the necessary information, juste like
the form feedback methods.

Ideally these methods should be merged to share the same code,
this will be done in master (v10).
2016-02-16 11:29:08 +01:00
Damien Bouvy 0948656a67 [FIX] payment_ogone: batch files expect ASCII encoding
When registering a payment method using batch, ogone
expects an ascii file. To avoid stipping characters
like they do on Friday the 13th, let's use a normalize
function to strip diacritics more or less properly.

See https://payment-services.ingenico.com/int/en/ogone/support/guides/integration%20guides/batch
2016-02-09 09:26:41 +01:00
Christophe Simonis 57168a9e90 [MERGE] forward port of branch saas-6 up to a669433 2015-09-23 14:34:26 +02:00
Denis Ledoux a3648fd23a [MERGE] forward port of branch 8.0 up to aabbdc7 2015-09-21 16:01:58 +02:00
Olivier Dony dbddc8246a [FIX] payment_ogone: move debug logging to the level it belongs to (may include sensitive data) 2015-09-18 19:52:26 +02:00
Denis Ledoux f627199def [FIX] payment_ogone: Waiting status
Waiting status should be seen as pending status:
They require a manual intervention, except
if a new feedback is provided later.

opw-649302
2015-09-14 12:45:13 +02:00
Martin Trigaux 04ae8023f6 [FIX] *: various English errors
Unclear or incorrect sentenses.
Courtesy of Eric Geens
2015-09-14 12:14:06 +02:00
Damien Bouvy f007287bb8 [IMP] payment_ogone: when receiving the response of a 'form_save' transaction, create a payment_method with the corresponding data 2015-09-08 16:30:23 +02:00
Damien Bouvy 93ef96bda4 [FIX] payment: old field name replaced by many2one 2015-09-08 11:35:10 +02:00
Damien Bouvy 526f27ddac [IMP] payment,payment_*,website_quote,website_sale: new rendering mechanism compatibility for payment providers
merge *ALL* the dicts

The form rendering used to receive a dict for partner information and a dict for tx information and to transmit another dict to the qweb template; now everything is done in a single dict
2015-09-04 16:08:22 +02:00
Damien Bouvy f8a98d977e [IMP] payment: usability improvements
- general:
    - add payment.method and payment.transaction menu in invoicing
- payment.acquirer:
    - add image field
    - add stat button to see payment.transaction objects
- payment.transaction:
    - language field is now a selection instead of a char
    - rename s2s_cb_eval field in callback_eval
    - form view cleaning
    - on_change_partner_id now fills in the partner details
    - add an ir.sequence for transaction name
    - add a many2one to payment.method
    - country defaults to the country of the company
- payment.method:
    - add a one2many to payment.transaction
    - add a stat button to see payment.transaction objects

[IMP] website_quote: rename s2s_cb_eval payment.transaction field to callback_eval

[IMP] payment_* (all providers): add image data and rename s2s_cb_eval field to callback_eval
2015-09-04 16:08:21 +02:00
Christophe Simonis 37d1af5244 [FIX] payment_ogone: correct transaction verification
For form-based transactions (not s2s), store  the PAYID when ogone
contact us via the feedback url.
Correct retry of verification (and do it quicker)
2015-08-17 12:07:39 +02:00
Damien Bouvy e4a93776b3 [FIX] payment_ogone: s2s feedback controller does not need authentication and function name error no longer prevents tx validation 2015-08-05 11:42:24 +02:00
Christophe Simonis 1510a81366 [MERGE] forward port of branch 8.0 up to 9ac62d7 2015-07-16 11:21:22 +02:00
Damien Bouvy 1240e2ae88 [FIX] payment_ogone: ogone error responses is now handled correctly
There was a mixup in the ogone response parameters that prevented error message to be stored successfully; this commit fixes that.
This commit only fix the s2s code in saas-6, the form payment code has been fixed in 8.0 and will be forward-ported (commit e7085a8bd7)
2015-07-16 11:11:26 +02:00
Damien Bouvy e7085a8bd7 [FIX] payment_ogone: ogone error responses is now handled correctly
There was a mixup in the ogone response parameters that prevented error message to be stored successfully; this commit fixes that.
2015-07-16 09:20:07 +02:00
Christophe Simonis 4a2aee45be [MERGE] forward port of branch 8.0 up to 9654b54 2015-07-10 17:12:57 +02:00
Denis Ledoux 7c2521a79b [FIX] payment_ogone: amount rounding issue
The amount to pay must be sent without comma to ogone.
e.g., for 66.99 EUR, the amount sent must be 6699.

To do that, we simply applied 66.99 * 100, which
seems rather good.

However, due to the fact how floats are handled in computers,
`66.99 * 100` returns 6698.999999999999
and
`int(6698.999999999999)` returns 6698
while we expected 6699

Using `float_repr` with `0` as decimal precision
instead of using `int` solves this issue.
`float_repr(6698.999999999999, 0)` returns 6699, as expected.
2015-07-09 11:51:40 +02:00
Damien Bouvy 73cb55284b [IMP] website_quote: payment could be exploited when using a public route, order confirmation is now done using a callback call
This commit implements the callback feature (s2s_cb_eval) on form transaction (up until now, it was only used on s2s transactions).
2015-07-07 15:46:47 +02:00
Damien Bouvy c6085de588 [FIX] payment_ogone: overriding the datetime import was making datetime functions unavailable - introduced by forward port b16fd16e 2015-07-03 11:55:04 +02:00
Christophe Simonis b16fd16e90 [MERGE] forward port of branch 8.0 up to 7d01029 2015-06-30 15:29:03 +02:00
Nicolas Martinelli cd9a5a5eb9 [FIX] payment_ogone: convert date received by Ogone
Ogone sends back the date with format MM/DD/YY
See https://secure.ogone.com/ncol/param_cookbook.asp

opw-642757
2015-06-25 16:13:36 +02:00
Damien Bouvy ef86cfaa1c [IMP] payment_ogone: add support for s2s payments 2015-06-15 14:57:15 +02:00
Christophe Simonis 3206a35aed [MERGE] forward port of branch 8.0 up to 8ac8281 2015-04-13 12:07:58 +02:00
Christophe Simonis 556b455381 [FIX] payment_ogone: ogone wants country code, not name
opw:631962
2015-04-08 17:35:48 +02:00
Goffin Simon 0fd773a486 [IMP] Cleanup and refactoring of exception handling
Unify and refactor exception handling in framework and addons.

The generic `except_osv` is now deprecated, and replaced by more specialized exception subtypes:
 - `UserError` (renamed from Warning, as it conflicts with the built-in `Warning`) raised when a non-technical error occurs during a business operation. It could be a missing information in the data provided by the user, or a misconfiguration.
 - `AccessError`: raised when any operation is denied because the user conducting it does not have the required access rights.
 - `AccessDenied`: raised when an operation that requires authenticated access is attempted via an unauthenticated request.
 - `MissingError`: raised when an operation is attempted on a record that does not exist.
 - `ValidationError`: raised when an operation violates a SQL or Python constraint.
 - All other exceptions are internal errors due to a system problem or bug, and raised untouched to the client-side, which should display a traceback.

All exceptions take a single message argument.

The `test_exceptions` module has been updated to showcase both new and old (deprecated) exceptions.

A great many old `except_osv` had a useless title with "Error!" or "Warning", those have been removed, as this is handled by the client-side widget that displays the messages.

This commit introduces a more consistent policy for logging errors and warnings:
 - All messages that do not require administrator attention should be logged at INFO level or lower. This includes all errors that are notified to the user in a friendly manner, even for access right problems or validation errors during business operations.
 - All messages that indicate a likely misconfiguration or malicious use by the users should be logged at WARNING level, as they typically require administrator attention.
 - All other unhandled internal errors cannot typically be handled by the user and should be logged at ERROR or higher level, as they require immediate administrator attention.
2015-01-16 17:15:18 +01:00
hiekmann ed21177044 [FIX] payment_ogone: typos in comments
closes #4166
2014-12-11 10:55:55 +01:00
Martin Trigaux 932eccc7a7 [FIX] payment_ogone: last commit 2014-09-25 15:07:07 +02:00
Wolfgang Taferner 29fefafcd6 [FIX] paymnet_ogon: add missing SHA OUT keys
The SHA OUT list was incomplete and therefore SHASIGN was not matching anymore
List of keys from https://viveum.v-psp.com/Ncol/Viveum_e-Com-BAS_EN.pdf
2014-09-25 15:01:16 +02:00
Thibault Delavallée ade618a63e [IMP] payment: renamed env field to environment, to avoid conflicts
with the incoming new API.

bzr revid: tde@openerp.com-20140416121055-01ygh1zer7cfv98a
2014-04-16 14:10:55 +02:00
Thibault Delavallée 38ae695d00 [IMP] payment modules: added provider selection field that is different
from the name. This allows to distinguish name and provider. Provider is a more
technical field, used to call some specific methods (<provider>_method_name). The
name field is used for display on the website.

Code and views udpated accordingly.

bzr revid: tde@openerp.com-20140319144608-0i4rv520l0bh53f0
2014-03-19 15:46:08 +01:00
Christophe Simonis 783a8e22a9 [FIX] payment_ogone: ogone is so bad with encoding that they need to duplicate their code to handle utf8 correctly ಠ_ಠ
bzr revid: chs@openerp.com-20140228092535-1tfy5832rgq79ob9
2014-02-28 10:25:35 +01:00
Christophe Simonis 91c278ad75 [FIX] payment_ogone: use utf8 version of orderstandard page
bzr revid: chs@openerp.com-20140227214423-k0dz4769kibfgld4
2014-02-27 22:44:23 +01:00
Christophe Matthieu 9aa278b3ee [FIX] payment_ogone: sale order view crash when payment_ogone is installed
bzr revid: chm@openerp.com-20140128154135-p2gq6t1z0a2n15qn
2014-01-28 16:41:35 +01:00
Thibault Delavallée 4cfdab77b2 [CLEAN] payment_ogone, payment_paypal: added tags in docstrings for s2s methods. Those methods are now identified as experimental as not finished and/or not tested.
bzr revid: tde@openerp.com-20140123154735-o5z6j4fh1ysll356
2014-01-23 16:47:35 +01:00
Thibault Delavallée 0b69bad996 [RENAME] payment_acquirer_* -> payment_ *
bzr revid: tde@openerp.com-20140122175702-1h1e51z4njt4s70w
2014-01-22 18:57:02 +01:00