* move payment into pending on PENDING_REVIEW webhook
* mark approved payment as pending
* extend BasePaymentProvider to gate aborting pending payments on a payment per payment basis
* add timeout to paypal after which a pending payment can be canceled
* formatting
* add missing negation
* cleanup abort_pending_allowed methods
* Apply suggestions from code review
Co-authored-by: pajowu <pajowu@pajowu.de>
* check all capture elements
* rename method and change defaults
* remove left over Constant
* flake8 .
---------
Co-authored-by: pajowu <pajowu@pajowu.de>
* initial implementation
* factor out _resolve_base_date
* add js to prevent illegal inputs
* fix tests
* Update src/pretix/base/reldate.py
Co-authored-by: Raphael Michel <michel@pretix.eu>
* Apply suggestions from code review
Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
* move js includes of to fragment_js.html
* add type annotations
* moves logic from RelativeDateWrapper into RelativeDate and adds BaseChoice for configuring which models attributes support which relationship
* fix tests
* test upgrade behaviour
* Apply suggestions from code review
Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
* move reldate.js include in correct file
* add OptionAttrsSelect to allow select options with their own attributes per value
* add a little bit of information to the tests for future reference
* rewrite reldate.js use data-attributes
* general cleanup
* add test for order.subevents cases
* use correct choice format
* remove order.subevent variants
* various cleanup
* Apply suggestions from code review
Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
* remove empty docstrings
* add depreciation warning
* change event listener to pretix:bind-forms
---------
Co-authored-by: Raphael Michel <michel@pretix.eu>
Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
* store the state of the payment regardless of the state
control.html shows the banner that the payment is in review depending on payment.info
* handle capture ressource
* Update src/pretix/plugins/paypal2/views.py
Co-authored-by: Phin Wolkwitz <wolkwitz@pretix.eu>
* add test
* cleanup logic regarding uninteresting resource_type
* store payment.info during _execute_payment asap
---------
Co-authored-by: Phin Wolkwitz <wolkwitz@pretix.eu>
All of our API endpoints that do something in the system do at least two
SQL queries, one for the actual change and one for the log entry. Often
many more. We want all of this to happen in a transaction so we know an
API call was executed or not at all, not half-way.
* rders: Fix N+1 query issues on order detail and change page
There is one I couldn't fix: Loading the list of tax rules for every
select box on the OrderChange page. Unfortunately, Django has a
cache-breaking .all() in ModelChoiceField and that would need nasty
patching that didn't feel worth it
* Fix isort
* Fix N+1 query in gate call
* Fix leftovers
* Add local cache for objects referenced in log entries
* Update src/pretix/control/views/orders.py