summaryrefslogtreecommitdiff
path: root/addons/payment_stripe/tests
AgeCommit message (Collapse)Author
2020-10-26[FIX] payment_stripe: hide disabled local payment methodsAdrien Horgnies
If a merchants didn't enable a local Payment Method Type (PMT) on Stripe side (such as bancontact), his customers eligible for it (ex.: Belgian and paying in EUR) won't be able to pay using it. This commit fixes this issue by adding a condition on the payment icons assigned to Stripe: if the payment icon related to a given payment method is not listed as a supported payment icon, the related payment method is not offered to customers, unless the payment icon does not exist at all. User can enable PMTs through (Payment Acquirers > Stripe > Configuration > Supported Payment Icons). This concerns: ideal, bancontact, eps, giropay and p24. This solution is not entirely satisfactory but it isn't possible to fetch enabled PMT from Stripe. opw-2335482 closes odoo/odoo#60721 X-original-commit: d51cabacf4210a98e71e10e13ae17912052d97cf Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
2020-08-17[IMP] payment_stripe: support webhooksAdrien Horgnies
Allow configuring a webhook in Stripe to send s2s notifications to Odoo when a Checkout payment is completed. Note that SetupIntent and PaymentIntent events are not listened to, since they are handled 'live' with the customer actively present; the main use case for Stripe webhooks is a Checkout session that gets interrupted before the customer is redirected to Odoo (e.g. network loss, browser crash, closing the tab, etc.) The webhook should be configured to send its events to <base_url>/payment/stripe/webhook and should only subscribe to checkout.session.completed events to avoid spamming the Odoo server with useless notifications. closes odoo/odoo#52754 Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-07-16[IMP] payment(_*): Remove dependency to AccountTestCommonLaurent Smet
l10n runbot builds are all failing when running at least one test depending of AccountTestCommon because it: - doesn't create a sandboxed testing environnement to manage the multi-currency, multi-company, the default company's currency, the exchange rates... - doesn't setup a testing user then all tests are done using the superuser. - doesn't provide a fully setup chart of accounts: exchange difference journal is not set, accounts have bad types, etc... - is run sometimes at-install. --task: 2296213
2020-07-14[IMP] payment: add new local payment method type for StripeAdrien Horgnies
- bancontact (be; eur) - eps (at; eur) - giropay (de; eur) - p24 (pl; eur, pln) X-original-commit: 1b7da6d0fe06fcab623f06508cee1093b10273a4
2019-10-28[FIX] payment_stripe: correct testsDamien Bouvy
Adapt the API changes in Stripe. Use correct test data existing in Stripe dashboard for our test account. closes odoo/odoo#39455 X-original-commit: 4dab64285ab410f239935437b273a0c97951e902 Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-09-20[FIX] payment_stripe: external testsJulien Castiaux
* External payment fetching the stripe API need valid account/key in order to perform the tests. * 1st test is testing the previous stripe API, it has been disabled. * 2nd test is testing for values removed by 595c0ad8ee48, the test has been updated to only ensure the form renders without error. * 3rd test is testing for amount sent as integers while stripe requires as cents. closes odoo/odoo#37160 Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-08-12[REF] payment* : state based publishingVictor Feyens
Replace website_published and environment by a generic state on payment.acquirer Payment acquirers aren't enabled by default. When setting their state to 'enabled' or 'test', it is verified the required fields for the provider are set.
2019-01-10[FIX] payment_*: testsPierre Masereel
PAYPAL ------ The paypal tests are not working working for two reasons: - we check that there is no date in pending state on payment transaction, but since the refactoring in this commit: https://github.com/odoo/odoo/commit/01216345e28374b554bfe95df82d607c591271cf the date is always set before the validation of transaction. - Since the changes on dates, the datetime field doesn't return a string anymore and the comparison fails. So we convert the datetime to string for the comparison. BUCKAROO -------- The buckaroo tests were not working for multiple reasons. STRIPE ------ The payment stripe tests were not working because: - The reference set in transactions were not the same as the ones givent to the payment provider. - we were checking for a script tag in form that has been removed in commit https://github.com/odoo/odoo/commit/7c639be4aadce20bf6662ab347470fadf9afd99f AUTHORIZE --------- This test cannot be tested on runbot due to its server to server way of working closes odoo/odoo#30105
2018-06-28[MERGE] forward port branch saas-11.3 up to 3cdcbce93cbChristophe Simonis
2018-06-21[MERGE] forward port branch 11.0 up to c5ed3729709Christophe Simonis
2018-06-21[MERGE] forward port branch saas-15 up to 152d42041e7Christophe Simonis
2018-06-20[FIX] payment_stripe: fix broken testChristophe Monniez
The direct rendering test assertions were not reached at all because the conditions were never True.
2018-05-23[REF] account,payment(_*),sale*: downgrade transactions into debug itemsqdp-odoo
It was very confusing for the user to distinct account.payment and payment.transaction. From now on, the transactions are technical objects and, in the backend, we only refer to it in log messages (Front end will be adapted in the same fashion later on). They are hidden in debug mode in accounting\configuration\payments as their purpose is now purely technical/log This commit also aims to reduce the gap between the accounting app and the transactions: account.payment objects are created/validated upon completion of transaction. To ease the capture/voiding of pending transactions, the related buttons are now displayed directly on the SO/invoice instead of the transactions. Was task: https://www.odoo.com/web#id=35857&view_type=form&model=project.task&action=333&active_id=967&menu_id=4720 Was PR #24043 [FIX] add domain based on journal to payment tokens Was opw: https://www.odoo.com/web?debug#id=1828206&view_type=form&model=project.task&menu_id=5200
2018-01-18[IMP] tests: Add the possibility to tag testsChristophe Monniez
Purpose: When running tests, all the tests for the installed/updated files are done. This commit adds a 'tagged' decorator that can be used to tag tests. Combined with a new 'test-tags' CLI option, it adds the ability to filter which tests are executed. For example, @tagged('slow') will add a tag 'slow' to the test. The CLI option 'test-tags="slow"' will only run tests tagged 'slow'. One can use prefixes to select cases with tags. '+' or no prefix means that the tests tagged with this tag are selected for execution. '-' prefix will exclude the tests tagged with this tag. Exclusion takes precedence over inclusion. Also, by default, all Odoo tests cases are tagged 'standard' and with the technical name of the module. This means that when selecting tests with the 'test-tags' parameter, if '-standard' is not specified, all tests tags are going to be executed. When tagging tests, one can remove such automatic tag by prefixing the tag name with '-'. E.g. @tagged('-standard') will remove the standard tag from the test. Another example, if one wants to test the 'sale' module alone, even without adding any 'tagged' decorator thos tests can be selected like that: --test-tags="sale" Tests are selected or deselected using a TagsSelector. When instanciated, a string is passed with comma separated tests selectors like '+slow,-standard'. When the 'check' method is called with a test as argument, it returns True or False if the test has to be executed or not.
2017-04-28[FIX] Various P3-related import changesxmo-odoo
* 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
2016-09-02[FIX] adapt logger namesRaphael Collet
2016-08-31[FIX] payment_stripe: execute test on nightly onlyJeremy Kersten
Avoid runbot red with: ConnectionError: HTTPSConnectionPool(host=api.stripe.com, port=443): Max retries exceeded
2016-07-06[CLN] payment_stripe: cleaning and guidelinesThibault Delavallée
As this module is already in new API only small linting is performed.
2016-06-17[IMP] payment*,website: rename payment.method -> payment.tokenJoren Van Onder
payment.method was not a good name because it was too easy to confuse with account.payment.method.
2016-04-04[ADD] payment_stripeMartin Trigaux
https://stripe.com/docs/api Closes #11587