Commit Graph
4 Commits
Author SHA1 Message Date
Valentin Chevalierandxlu-odoo 2d81dffd23 [IMP] payment_test: support all additional features
After the payment apocalypse, `payment_test` was cleaned and stripped of
all useless parts. It was a very basic testing acquirer that allowed to
enter fake arbitrary payment details, choose whether they should be
tokenized, and then pay. It was intended to test the payment flow of
various applications (Sales, Subscriptions, Invoicing, ...) for a single
scenario: successful payments with immediate capture.

In order to extensively test an app's payment flow (explore other
scenarios), we need `payment_test` to have additional features.

Now, `payment_test` will allow profound testing of these features:
- separate authorization and capture
- customer fees computation
- tokenization
- refunds
- on the /pay page, users will be able to select the status of the
  payment
- on the payment transaction form view, users can change the status of
  a payment 'pending' to either succeed or fail
- on the payment token form view, users can change the state of future
  transactions made with that token

task-2512196

closes odoo/odoo#78083

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: xlu-odoo <xlu@odoo.com>
2022-07-01 19:37:10 +02:00
Antoine Vandevenne (anv) f4ca7290ac [IMP] payment(_*): search only once for the transaction
Before this commit, most acquirers needed to run several successive
searches for the transaction whose reference was received by a
controller in notification data. This is because the security checks
run on the notification data require access to the acquirer through the
transaction record which was immediately discarded.

Starting with this commit, all `*_feedback_data` method are no longer
decorated with `api.model` and can use the transaction record they're
called on if provided. They are also renamed to `*_notification_data`.

task-2737144

closes odoo/odoo#83850

Related: odoo/enterprise#23938
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-02-02 19:50:49 +00:00
Arnaud JosetandAntoine Vandevenne 71c5278d9a [REF] payment_test: migrate the Test acquirer to the new payment API
See the merge commit for more details.

task-2333042

Co-authored-by: Antoine Vandevenne <anv@odoo.com>
2021-03-30 09:25:51 +02:00
Aurélien Warnon e7c4761464 [ADD] payment_test: add a payment acquirer to be used for testing only
PURPOSE

Test frontend and UI tools of eLearning.

SPECIFICATIONS

This new module implements a simple test payment acquirer in order to allow
testing successful payments behaviors, notably on eCommerce. Its usage is
prevented in other state then test to avoid any potential misuse.

LINKS

Task ID 1937768
2019-08-28 13:27:59 +00:00