Commit Graph
51 Commits
Author SHA1 Message Date
Cédric Krier 2798c66395 Add configuration for max_network_retries
issue9118
review256691003
2020-04-11 00:26:18 +02:00
Cédric Krier abee351300 Add refund of payment
issue9177
review286911002
2020-04-11 00:22:48 +02:00
Cédric Krier 1c12574b55 Always set error code
and set param for all exception with param code.

issue9119
review278691005
2020-03-17 23:19:20 +01:00
Cédric Krier 64accb375a Fix flake8 errors and warnings
We add the flake8 configuration used so we ensure everyone uses the same.
We remove the usage of __all__ for non public API.
When possible, we rationalize the class name according to its __name__ and module.

issue9082
review297061002
2020-03-01 12:33:51 +01:00
Cédric Krier e5113f5ae5 Set proper event name for webhook_charge_refunded 2020-02-19 22:58:26 +01:00
Sergi Almacellas Abellana fc826667c6 Use process method instead of stripe journal
issue8990
review260831007
2020-02-17 11:20:07 +01:00
Cédric Krier 44e0bd5e47 Retry later on some StripeError depending of the code
The code lock_timeout and token_in_use must be retried as it is an unexpected
behavior from Stripe service.
Also some calls did not catch APIConnectionError for retry.

issue8871
review270611002
2019-12-05 21:32:58 +01:00
Cédric Krier 5b8f1e4149 Add __href__ and is_secure, host and http_host to url module
This ease the composition of URL pointing to Tryton route.

issue8767
review264461005
2019-11-26 22:16:00 +01:00
Cédric Krier 444338dcd9 Update payment from charge event of payment intent
Once the payment intent is succeeded or failed, only charge events are sent.
This successful charge represents the full payment as a payment intent can have
only one successful charge.

issue8782
review264521002
2019-11-01 23:02:56 +01:00
Cédric Krier 01cc8c4b41 Ensure payment instance has the right company context
The call to save restore the context when the record was instantiated.

issue8780
review256151003
2019-11-01 23:01:43 +01:00
Cédric Krier 3715b5cee8 Create charge with token only if chargeable
issue8777
review288331002
2019-11-01 23:00:05 +01:00
Cédric Krier 4f0ffbdc2e Do not create payment intent if it already exists
issue8778
review268281002
2019-11-01 22:54:50 +01:00
Cédric Krier 0c55c3e698 Manage Setup Intent and Payment Intent
issue8456
review254141002
2019-10-10 18:45:36 +02:00
Cédric Krier 73df5ce0b8 Remove _event argument when calling webhook_source_failed
This argument does not exist on webhook_source_failed.

issue8647
review252111337
2019-09-12 22:58:57 +02:00
Cédric Krier dfb1f74958 Support charge.expired webhook event
issue8455
review257651004
2019-07-22 23:58:15 +02:00
Cédric Krier 8d7fa04db2 Use clear cache after a commit
issue8449
review251651002
2019-07-08 21:18:18 +02:00
Cédric Krier ffffb8296f Simplify cron
issue8201
issue6117
issue2286
2019-04-12 15:59:24 +02:00
Cédric Krier 4c2025e527 Add cache for sources
issue8247
review265221002
2019-04-11 18:50:54 +02:00
Cédric Krier d3ef98eafe Add setter to stripe_customer_source and write stripe_token in scenario
Since issue7985, Function fields must have a setter method if they are not
read only. And proteus does not save anymore readonly fields.
2019-03-31 13:31:29 +02:00
Cédric Krier 0fa547b01a Do not fill error fields with source failure keys on webhook
The source does not have such keys.

issue8106
review53551002
2019-02-18 18:44:33 +01:00
Cédric Krier 358d0baa21 Allow to lock records for update
issue8012
review45901002
2019-01-30 09:45:59 +01:00
Cédric Krier ce524576a4 Add ir.message and use custom exceptions
issue3672
2018-12-29 14:20:29 +01:00
Cédric Krier 7dfa6cf8b0 Use queue to charge and capture
issue7760
review47711002
2018-10-21 21:34:18 +02:00
Cédric Krier 4c0600a4f5 Improve ModelStorage.copy
* Allow callable in copy default
* Support dotted notation in copy default
* Use setdefault in copy
* Copy default when needed
* Do not set default state in copy
* Use callable and dotted notation in copy default

issue5576
issue7648
review72291002
2018-09-01 01:02:03 +02:00
Cédric Krier 8d896ad3ba Fix logger formatting in webhook_charge_succeeded 2018-08-14 09:08:21 +02:00
Cédric Krier 32a2816bff Add __table_handler__ to ModelSQL
issue7581
review48531002
2018-07-24 22:01:07 +02:00
Cédric Krier 69ef7d95bc Remove unused import 2018-07-24 21:57:10 +02:00
Cédric Krier bed77c6258 Remove support for Python 2.7
issue7497
review53261002
2018-06-26 19:11:43 +02:00
Cédric Krier 00d2d38e0a Fix label of stripe_idempotency_key
issue7309
review36141002
2018-04-05 19:11:46 +02:00
Sergi Almacellas Abellana 967513ef19 Use deactivable mixin
issue4341
review38401002
2018-03-26 14:09:29 +02:00
Sergi Almacellas Abellana 28e7a53c17 Add depends on Button
issue6919
review40811002
2018-02-19 11:37:52 +01:00
Cédric Krier 54e5cb4096 Ensure to have an idempotency key by default
issue7083
review43061002
2018-02-14 00:30:14 +01:00
Cédric Krier 8a811d9da4 Implement all charge events
issue6960
review36831002
2018-01-12 13:09:11 +01:00
Cédric Krier a3d0f1a019 Support dispute
issue6939
review42841002
2018-01-12 13:04:50 +01:00
Cédric Krier b338ac1154 Do not call hex from uuid
issue6993
review44481002
2017-12-13 18:03:56 +01:00
Cédric Krier 6af72c95b3 Search also to create customer with empty string as id
issue6990
review37871002
2017-12-09 12:05:30 +01:00
Cédric Krier f87e1e07c9 Test stripe_customer_id before using it
issue6816
review40721002
2017-10-11 22:48:24 +02:00
Cédric Krier 8524c46ef6 Clear stripe customer field when party is changed
Those fields depend on the selected party.

issue6805
review44351002
2017-10-05 10:56:52 +02:00
Cédric Krier 377cab6083 Add support for webhooks
issue6581
review41391002
2017-09-26 01:17:12 +02:00
Cédric Krier fe84806e38 Add chargeable for payment token
All the sources are not always chargeable. So the payment with source must be
marked as chargeable to be processed by the charge cron task.

issue6724
review42601002
2017-09-03 11:35:16 +02:00
Cédric Krier c40a9bdb0a Allow to select customer source on payment
issue6695
review42571002
2017-09-03 11:18:43 +02:00
Cédric Krier 7bc0ced00c Show customer and charge ids instead of token
issue6694
review38531002
2017-09-01 01:42:41 +02:00
Cédric Krier 66fc3d379a Allow to create customer with ID
issue6685
review39581002
2017-08-04 00:35:11 +02:00
Cédric Krier 6be3778dc9 Allow to create manual payment
We display Stripe token and/or customer and we use the Stripe token as record
name for customer who has one.

issue6617
review37541002
2017-07-26 23:59:16 +02:00
Cédric Krier 55bdb3be95 Add missing on_change_with_stripe_journal
The getter for stripe_journal was missing, it was not spotted because
stripe_capture, the only field depending on it, was not depending on it.

issue6615
review42481003
2017-06-30 14:46:25 +02:00
Nicolas Évrard 469fdc2f70 Delay call to stripe when there is a connection error
issue6610
review37531002
2017-06-29 11:26:30 +02:00
Cédric Krier c3e35d0a41 Fix flake8 2017-06-24 10:25:48 +02:00
Cédric Krier aafe8da3e4 Add capture
issue6466
review41301002
2017-06-24 10:24:16 +02:00
Cédric Krier f3e59acda7 Use hex property of UUID instead of undocumented get_hex method
get_hex method does not exist in Python3
2017-04-29 18:43:22 +02:00
Cédric Krier 8de07a8cb2 Do not fail pending Charge
issue6465
review34931002
2017-04-29 10:32:50 +02:00