From e00971e7f1f48ae2ee2842cfabe77400b9e4289b Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Wed, 3 Feb 2021 19:09:14 +0100 Subject: [PATCH] ix --- rowers/braintreestuff.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rowers/braintreestuff.py b/rowers/braintreestuff.py index e524bcf3..3c7020f2 100644 --- a/rowers/braintreestuff.py +++ b/rowers/braintreestuff.py @@ -84,12 +84,15 @@ def send_invoice(subscription): f.write('Fakturoid Contact ID '+str(fakturoid_contact_id)+'\n') if not fakturoid_contact_id: fakturoid_contact_id = fakturoid.create_contact(r) + with open('braintreewebhooks.log','a') as f: + f.write('Created Fakturoid Contact ID '+str(fakturoid_contact_id)+'\n') transactions = subscription.transactions if transactions: amount = transactions[0].amount with open('braintreewebhooks.log','a') as f: f.write('Transaction amount '+str(amount)+'\n') - id = fakturoid.create_invoice(r,amount,subscription_id,dosend=True) + id = fakturoid.create_invoice(r,amount,subscription_id,dosend=True, + contact_id=fakturoid_contact_id) return id return 0