Skip to content

Commit d38bc4c

Browse files
committed
Disabling refunds
1 parent cdf075e commit d38bc4c

1 file changed

Lines changed: 2 additions & 18 deletions

File tree

pretix_eth/payment.py

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -295,26 +295,10 @@ def payment_control_render(self, request: HttpRequest, payment: OrderPayment):
295295
abort_pending_allowed = True
296296

297297
def payment_refund_supported(self, payment: OrderPayment):
298-
return payment.state == OrderPayment.PAYMENT_STATE_CONFIRMED
298+
return False
299299

300300
def payment_partial_refund_supported(self, payment: OrderPayment):
301301
return self.payment_refund_supported(payment)
302302

303303
def execute_refund(self, refund: OrderRefund):
304-
if refund.payment is None:
305-
raise Exception("Invariant: No payment associated with refund")
306-
307-
wallet_queryset = None # todo WalletAddress.objects.filter(order_payment=refund.payment)
308-
309-
#todo fix
310-
# if wallet_queryset.count() != 1:
311-
# raise Exception(
312-
# "Invariant: There is not assigned wallet address to this payment"
313-
# )
314-
# refund.info_data = {
315-
# "currency_type": refund.payment.info_data["currency_type"],
316-
# "amount": refund.payment.info_data["amount"],
317-
# "wallet_address": wallet_queryset.first().hex_address,
318-
# }
319-
320-
refund.save(update_fields=["info"])
304+
raise Exception("Refunds are disabled for this payment provider for private key security reasons.")

0 commit comments

Comments
 (0)