supporters: Add recurring details to Stripe export

This commit is contained in:
Ben Sturmfels 2024-12-18 10:20:49 +11:00
parent 882d578e46
commit c80f8b41ac
Signed by: bsturmfels
GPG key ID: 023C05E2C9C068F0

View file

@ -10,7 +10,7 @@ class Command(BaseCommand):
def handle(self, *args, **options):
payments = SustainerPayment.objects.select_related('order').order_by('paid_time')
columns = ['order_time', 'payment_time', 'name', 'email', 'amount', 'transaction_id', 'public_ack', 'shirt_size', 'join_list', 'street', 'city', 'state', 'zip_code', 'country']
columns = ['order_time', 'payment_time', 'name', 'email', 'amount', 'transaction_id', 'recurring', 'subscription_id', 'public_ack', 'shirt_size', 'join_list', 'street', 'city', 'state', 'zip_code', 'country']
writer = csv.writer(sys.stdout)
writer.writerow(columns)
for payment in payments:
@ -22,6 +22,8 @@ class Command(BaseCommand):
order.email,
payment.amount,
payment.stripe_payment_intent_ref,
order.recurring,
order.stripe_subscription_ref,
order.acknowledge_publicly,
repr(order.tshirt_size if order.tshirt_size else ''),
order.add_to_mailing_list,