works but cannot change address
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user