forked from CGM_Public/pretix_original
* Add data shredders for PII * First working shredder * Add more shredders * Add new shredders and download confirmation * tmp * PayPal, Stripe, banktransfer * Add icon to logs * Untested payment log shredders * Add waiting list shredder * First tests * Add tests for shredders * Improve templats, link to shredder * Test payment info shredders * More tests * Documentation * Fix enabled flag in payment provider overview * Fix minor issues
This commit is contained in:
@@ -566,6 +566,19 @@ class BasePaymentProvider:
|
||||
messages.success(request, _('The order has been marked as refunded. Please transfer the money '
|
||||
'back to the buyer manually.'))
|
||||
|
||||
def shred_payment_info(self, order: Order):
|
||||
"""
|
||||
When personal data is removed from an event, this method is called to scrub payment-related data
|
||||
from an order. By default, it removes all info from the ``payment_info`` attribute. You can override
|
||||
this behavior if you want to retain attributes that are not personal data on their own, i.e. a
|
||||
reference to a transaction in an external system. You can also override this to scrub more data, e.g.
|
||||
data from external sources that is saved in LogEntry objects or other places.
|
||||
|
||||
:param order: An order
|
||||
"""
|
||||
order.payment_info = None
|
||||
order.save(update_fields=['payment_info'])
|
||||
|
||||
|
||||
class PaymentException(Exception):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user