Commit Graph

195 Commits

Author SHA1 Message Date
Valentin Deniaud 66b12b846a misc: change django-upgrade target version to 3.2 (#75442) 2023-03-29 16:14:41 +02:00
Thomas NOËL 483f07cd61 lingo: hide TIPI service on payment backend creation (#74357)
gitea-wip/combo/pipeline/pr-main This commit looks good Details
gitea/combo/pipeline/head Something is wrong with the build of this commit Details
2023-02-12 17:15:29 +01:00
Thomas NOËL 5f90155ba6 trivial: remove dict() usage (pylint use-dict-literal) 2023-02-01 15:04:02 +01:00
Agate f77ad1bc2d replaced ugettext* calls with corresponding gettext* calls (#68183) 2022-08-29 09:35:13 +02:00
Pierre Ducroquet 76167cab03 LingoRecentTransactionsCell: optimize query (#68212)
gitea-wip/combo/pipeline/head There was a failure building this commit Details
gitea/combo/pipeline/head Something is wrong with the build of this commit Details
- use an union instead of an OR
- use the fact that union is an implicit distinct to simplify the code
- index the start_date field so it can be used to filter efficiently
2022-08-17 12:00:40 +02:00
Pierre Ducroquet 22daaad4ef PaymentBackend: skip poll faster if there is no transaction (#66487) 2022-08-02 21:27:58 +02:00
Frédéric Péters 67144e0ad8 Revert "PaymentBackend: skip poll faster if there is no transaction (#66487)"
This reverts commit 0ebe6d8233.
2022-07-12 16:28:55 +02:00
Pierre Ducroquet 0ebe6d8233 PaymentBackend: skip poll faster if there is no transaction (#66487) 2022-07-12 16:26:47 +02:00
Benjamin Dauvergne 79f061c471 lingo: remove SIPS from listed backends (#66737) 2022-06-29 17:05:18 +02:00
Corentin Sechet 2b68a863ed misc: move title fields to appearance tab (#64681) 2022-05-27 13:33:03 +02:00
Frédéric Péters 9dba7d1245 lingo: comment is_notifiable() and do not log non-errors (#64460) 2022-04-22 12:38:27 +02:00
Frédéric Péters 4ab6c803f2 trivial: remove usage of obsolete python_2_unicode_compatible (#64292) 2022-04-17 11:15:43 +02:00
Benjamin Dauvergne 5accf65139 lingo: always log notification content on errors (#61401)
- rename models.PaymentException to LingoException to prevent confusion
- attach transaction to exceptions when possible
- log in views instead of model methods, it's a better point to make
  decisions on logging
2022-02-18 08:41:09 +01:00
Thomas NOËL 6b1f7d1d4d lingo: refuse payment if an item cannot be trigged (#58210) 2022-01-28 17:33:04 +01:00
Benjamin Dauvergne f92b855774 lingo: poll backend during asynchronous rendering (#57790) 2021-10-21 08:20:28 +02:00
Lauréline Guérin 000af39adf
misc: fix invalid-str-returned pylint error (#56288) 2021-08-31 10:06:46 +02:00
Lauréline Guérin 48369ae634
misc: fix logging-not-lazy pylint error (#56288) 2021-08-31 10:06:46 +02:00
Lauréline Guérin ea10ae6b98
misc: fix import-error pylint error (#56288) 2021-08-31 10:06:45 +02:00
Lauréline Guérin 02d5299c9a
misc: fix unused-variable pylint error (#56288) 2021-08-31 10:00:38 +02:00
Lauréline Guérin ee21324c66
misc: fix unused-import pylint error (#56288) 2021-08-31 10:00:38 +02:00
Benjamin Dauvergne 18e4d09053 lingo: make BasketItem creation idempotent for paid invoices (#55876)
Using get_or_create() based on the remote_item_id field inside a
transaction is idempotent, the @self.items.add(...)@ operation also (if
the item is already linked it does nothing).

The new behaviour garantee that even if we cannot notify the regie's
web-service, a BasketItem is created to show the user its payment has
been recorded.
2021-08-04 18:29:23 +02:00
Benjamin Dauvergne ef770b4579 lingo: add remote_item_id field to BasketItem (#55876) 2021-08-04 18:29:11 +02:00
Benjamin Dauvergne 050df6b0a1 lingo: factorize basket item creation for paid remote invoices (#55876) 2021-08-04 18:29:11 +02:00
Lauréline Guérin f4615c5061
misc: apply pyupgrade (#55868) 2021-07-27 16:45:52 +02:00
Frédéric Péters f823e6cbba general: rename cell template_name attribute to default_template_name (#55792) 2021-07-26 10:16:42 +02:00
Frédéric Péters ec871b6ba6 lingo: do not crash on missing invoice creation or payment limit dates (#55686) 2021-07-20 13:08:45 +02:00
Benjamin Dauvergne 6668215594 lingo: make URL static in TipiPaymentFormCell (#55244) 2021-06-29 10:35:57 +02:00
Thomas NOËL f5918c45da lingo: update default TIPI payment service URL (#47537) 2021-06-15 11:20:38 +02:00
Lauréline Guérin 657815e82a
misc: remove django-jsonfield dependency (#52912) 2021-06-03 10:24:21 +02:00
Benjamin Dauvergne 1822b1f3c7 lingo: use payment backend's slug in default callback URL (#49145) 2021-05-10 12:19:16 +02:00
Benjamin Dauvergne 2bfb96ea95 lingo: show backend callback URL in update views (#49145) 2021-05-10 12:19:16 +02:00
Benjamin Dauvergne 760ccb41fd lingo: add poll_backend method to PaymentBackend and Transaction (#49149)
Some payment backends in eopayment (like PayFiP) allow polling the
status of currently running transaction, and can signal if a running
transaction has expired. The new can_poll_backend() and poll_backend()
method on Transaction implement this conditional behaviour in lingo.
2021-05-06 11:04:08 +02:00
Benjamin Dauvergne 99a912e255 lingo: factorize eopayment response handling (#49149) 2021-05-06 00:31:15 +02:00
Benjamin Dauvergne ccb2cb8500 lingo: check real payment status of remote_item when shown or paid (#53186)
Currently the remote_item.paid attribute comes from what the remote
regie is providing through a web service. But a remote_item can be
already paid if a transaction with a paid status (eopayment.PAID or
eopayment.ACCEPTED) already exist.

This patch add a RemoteItem.update_paid(regie, remote_items) which
update bunch of remote_item(s) by querying the correponding paid
transactions.

The methods Regie.get_invoices() and Regie.get_invoice() get a new
parameter update_paid=False, which is set to true in cells and views
which display or allow paying a remote item.
2021-04-15 21:24:01 +02:00
Lauréline Guérin 29bc8e66a9
misc: apply isort (#52797) 2021-04-08 15:54:31 +02:00
Frédéric Péters 47d67c395e trivial: apply black 2021-02-15 18:02:39 +01:00
Benjamin Dauvergne 94e666f92c lingo: set Regie.can_pay_only_one_basket_item default to True (#48281) 2021-02-02 18:01:04 +01:00
Lauréline Guérin 870238eb41
lingo: do not retry notify on 4xx error (#48393)
gitea-wip/combo/pipeline/head Build started... Details
gitea/combo/pipeline/head Build started... Details
2020-11-23 15:51:40 +01:00
Lauréline Guérin e48ede714f
lingo: don't fail on invoices listing if err is returned (#48394)
gitea-wip/combo/pipeline/head Build started... Details
gitea/combo/pipeline/head Build started... Details
2020-11-20 15:50:46 +01:00
Lauréline Guérin 2de1d73b57
lingo: display item popup with error details (#48338)
gitea-wip/combo/pipeline/head Build started... Details
gitea/combo/pipeline/head Build started... Details
2020-11-20 14:15:15 +01:00
Valentin Deniaud fcc41caa81 lingo: add backends and regies in site import/export (#46895) 2020-11-16 14:32:29 +01:00
Benjamin Dauvergne db6675abb7 lingo: declare SAGA backend (#48276) 2020-11-04 11:12:02 +01:00
Frédéric Péters e28819644f lingo: remove sp+ from eopayment supported platforms (#47596) 2020-10-13 09:07:24 +02:00
Valentin Deniaud 4ff5f921c1 lingo: allow requiring individual payment for regie (#46503) 2020-10-01 14:22:03 +02:00
Valentin Deniaud 3faa37405b lingo: add payment_url property to basket item (#46503) 2020-09-30 18:16:44 +02:00
Benjamin Dauvergne 832b8188fb lingo: allow item payment by any user (#41837) 2020-06-26 11:44:28 +02:00
Benjamin Dauvergne 0ded4ae599 lingo: report errors on invoices retrieval (#43967) 2020-06-19 17:39:07 +02:00
Nicolas Roche 7494896e9f utils: switch to pycryptodomex, replace Crypto with Cryptodome (#43563) 2020-06-17 11:39:47 +02:00
Valentin Deniaud 31d9b1f960 lingo: add mollie and keyware backends (#42581) 2020-06-15 12:13:31 +02:00
Valentin Deniaud 1bdc236839 lingo: allow passing extra basket item info (#42992) 2020-06-15 12:13:04 +02:00