Commit Graph
23 Commits
Author SHA1 Message Date
Valentin ChevalierandVictor Feyens 1ded4e3689 [FIX] payment: add req param to the landing route
When a payment is made, add required parameters to the landing route.

This issue was introduced with 7fccbac

task-2645216

X-original-commit: cfcf4c64caac951783a1b39b63c024028b07b434
Part-of: odoo/odoo#77874
Co-authored-by: Victor Feyens<vfe@odoo.com>
2021-10-05 15:41:33 +00:00
Benoit Socias fa3c04e5fe [FIX] website_payment: obtain country and currency in donation form
Before this commit country and currency were not correctly populated in
the donation form.

After this commit country of a logged in user is correctly pre-populated
and donations can be done in the current currency of the user.

task-2398403

closes odoo/odoo#75921

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-09-03 10:38:12 +00:00
Benoit Socias e67a123227 [IMP] website_payment: take amount change into account
Before this commit amount updates were not taken into account during the
payment operation.

After this commit amount updates are taken into account for the actual
payment operation and payment fees are updated according to the amount
and the partner country.

Part of #63133

task-2398403

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-09-03 02:03:15 +00:00
Benoit Socias 7fccbac004 [IMP] payment, website_payment: perform the donation payment
This commit adds /donation/* routes to perform the donation:
- /pay: shows the form with the contact details and donation details
- /transaction: creates the partner_id if missing and executes the
transaction
- /confirm: displays the payment success page

PR-63133

task-2398403

Part-of: odoo/odoo#63133
2021-09-03 02:03:15 +00:00
Thibault Delavallée 79f362d067 [MOV] (website_)payment: move customer portal for payments to payment
Customer portal controller and templates contained in website_payment
module are moved to payment. This module now uses the customer portal
defined in portal module and most of website_payment code is moved
to payment.

website_payment now contain code really related to website, such as
payment acquirers configuration for website.
2017-08-08 15:38:04 +02:00
tbe-odoo 7d428c871b [IMP] payment, website_payment: generic mechanism to verify payment tokens on registration
When registering a payment token, validating it using a payment of a small amount followed by a refund
allows ensuring that the method is valid (i.e. checksumming the card number simple ensure the number
is valid but not that the card exists). This commit introduces a generic approach that must be implemented
for each acquirer that has tokenization support. This commit also introduces a generic payment token registration/usage template that can be adapted according to one's need.

payment_ogone: add support for tokens validation
2017-07-14 11:57:19 +02:00
xmo-odoo b4429c2a91 [FIX] Various P3-related import changes
* LDAP import: python-ldap is not python3-compatible, pyldap is

  Warning: only supported from debian Stretch (current testing)?
  https://packages.debian.org/search?searchon=names&keywords=pyldap

* implicitly relative imports
* imports of moved or removed stdlib modules

issue #8530
2017-04-28 09:06:53 +02:00
Jeremy Kersten 3bb2318baf [FIX] website_payment: use msg from payment acquirer in portal 2017-02-01 09:05:46 +01:00
Ravi Gohil 5bd4218454 [IMP] payment_payumoney, payment_stripe: set private fields accessible to employees only
In 8.0 private fields have been recently set as visible only to employees
at commit b226510840.

However between v9 and v10 two new payment acquirers have been implemented
payumoney and stripe. Those addons now have their credential set as private.

Methods using the acquirers have been sudoed accordingly to avoid access
issues when rendering the buttons. Other payment modules will be updated when
the forward port from 8 to 9 and pre-10-master will be done.
2016-09-06 12:39:33 +02:00
Jeremy Kersten 7346eeb590 [REF] website_sale: tokenization - improve desgin
Update design for registered cards

@courtesy of @fhe-odoo
2016-08-31 13:23:14 +02:00
Thibault Delavallée c8a313d51e [IMP] various: use odoo for imports instead of openerp and update class names 2016-08-10 15:48:07 +02:00
Jérome Maes 8a399930f3 [REF] website_*: remove render method on website
Since saas-3, website controllers use `request.website.render`
to render the template of a web page. This was kept for retro
compatibility. It's time to stop using deprecated stuff.
Same for `_render` method on website.

'json' route don't use `request.render` since
`JsonRequest` has no `render` method.
2016-08-04 12:02:14 +02:00
Damien Bouvy 4014563e3f [FIX] website_payment: stop treating _registration_render result as a list
I assume this was necessary  before the migration of payment because
an api.one wrapper was added by the auto-guess api feature.

Since payment has been migrated, this decorator is no longer present
and the result of _registration_render is no longer encapsulated in
a list. Therefore, taking the zeroth element was akin to taking only
the first character of the rendered html. Usually \n, which is not
useful but which also prevented the crash to be easily visible.
2016-08-03 09:42:38 +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
Christophe Simonis 30edf6fa8f [FIX] website_payment: use renamed fields/variables 2016-06-28 18:59:46 +02:00
Christophe Simonis 93e6316029 [MERGE] forward port of branch saas-11 up to 7153077 2016-06-28 18:05:25 +02:00
Martin Trigaux cbbc90fc2e [FIX] website_payment: access parent payment method
On the other routes (e.g. /my/, /my/contract/) payment information on the parent
contact are displayed but can not be access in the my payment route.
You get in a unconsistant situation where you can access the contract of the
company and its payment information but can not use this payment information.

opw-681491, opw-681502
2016-06-28 12:16:41 +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
Damien Bouvy 87717509c0 [FIX] website_payment: fetch default provider + render issue
* Fixes a bug that prevented the system to fetch the default provider
because the default_get call was wrong (wrong model + missing
company_id kwarg)
* Displays the amount as a monetary widget (to do that, the amount
must be sent as a float in the controller)
* Display the acquirer 'pre_msg' field to display eventual fees
2016-06-14 08:53:41 +02:00
Jeremy Kersten 28e2dcf043 [FIX] website_payment, website_mail: fix route declaration typo
Missing s of method for allowed methods.
2016-01-28 14:00:26 +01:00
Damien Bouvy f89e8f9df2 [IMP] payment, website_sale, website_payment: unique reference on payment no longer prevent paying
Payment transactions referenceis have a unique constraint which was problematic when a payment was cancelled from the acquirer's page.
To stick the to DRY principle, I factorized a method that checks for existing references and happens a numerical suffix if necessary.
This was already implemented in website_payment but was moved to payment and used in website_sale.
2015-09-21 13:15:58 +02:00
Damien Bouvy f341ca62ab [IMP] website_payment: generic payment controller
- generate payment from the frontend using a simple form
- send a payment with a simple url
- define a default provider for payments
2015-09-04 16:08:22 +02:00
Damien Bouvy 3dafbe9aa8 [IMP] website_payment: module is no longer an empty shell
With this module, you can register payment methods with a nice formatting
2015-06-15 14:57:16 +02:00