Private
Public Access
1
0

works but cannot change address

This commit is contained in:
Sander Roosendaal
2021-03-24 06:35:25 +01:00
parent 9a06a8902f
commit a9091bfed7
12 changed files with 419 additions and 10 deletions

View File

@@ -83,11 +83,14 @@ def create_contact(rower):
# this should be triggered by a Braintree webhook
def create_invoice(rower,amount,braintreeid,dosend=True,
contact_id=None):
contact_id=None,name=None):
if not contact_id:
contact_id = get_contacts(rower)
if not name:
name = 'Rowsandall Subscription'
with open('braintreewebhooks.log','a') as f:
f.write('Creating invoice for contact iD '+str(contact_id)+'\n')
@@ -104,7 +107,7 @@ def create_invoice(rower,amount,braintreeid,dosend=True,
'paid_amount': str(amount),
'status': 'paid',
'lines': [{
'name': 'Rowsandall Subscription',
'name': name,
'quantity': '1',
'unit_price': str(amount),
'vat_rate': 0,