Private
Public Access
1
0

adding plan id

This commit is contained in:
Sander Roosendaal
2021-11-09 11:20:08 +01:00
parent 42925b393a
commit 863fcc251b
2 changed files with 8 additions and 2 deletions

View File

@@ -189,6 +189,12 @@ def make_payment(rower,data):
amount = data['amount'] amount = data['amount']
amount = '{amount}'.format(amount=amount) amount = '{amount}'.format(amount=amount)
if 'plan' in data:
theplan = data['plan']
additional_text = 'Rowsandall Purchase Plan nr {theplan}'.format(theplan=theplan)
else:
additional_text = 'Rowsandall Purchase'
result = gateway.transaction.sale({ result = gateway.transaction.sale({
"amount": amount, "amount": amount,
"payment_method_nonce": nonce_from_the_client, "payment_method_nonce": nonce_from_the_client,
@@ -208,7 +214,7 @@ def make_payment(rower,data):
if not fakturoid_contact_id: if not fakturoid_contact_id:
fakturoid_contact_id = fakturoid.create_contact(rower) fakturoid_contact_id = fakturoid.create_contact(rower)
id = fakturoid.create_invoice(rower,amount,transaction.id,dosend=True,contact_id=fakturoid_contact_id, id = fakturoid.create_invoice(rower,amount,transaction.id,dosend=True,contact_id=fakturoid_contact_id,
name='Rowsandall Purchase') name=additional_text)
try: try:
job = myqueue(queuehigh,handle_send_email_transaction, job = myqueue(queuehigh,handle_send_email_transaction,

View File

@@ -1331,7 +1331,7 @@ def handle_send_email_transaction(
d = { d = {
'name': username, 'name': username,
'siteurl': siteurl, 'siteurl': siteurl,
'amount': amount 'amount': amount,
} }
res = send_template_email(from_email,[useremail], res = send_template_email(from_email,[useremail],