-*- 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/'
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
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).
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
- 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
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)
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.
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.
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