From dc4c4a81ed07633b9bee1ba20fd6ecced24ee30e Mon Sep 17 00:00:00 2001 From: nikita Date: Sat, 24 Nov 2018 19:04:22 +0300 Subject: [PATCH] roistat command fix --- .../commands/send_transactions_to_roistat.py | 11 +++++------ apps/payment/tasks.py | 1 - 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/apps/payment/management/commands/send_transactions_to_roistat.py b/apps/payment/management/commands/send_transactions_to_roistat.py index 76131857..f5569984 100644 --- a/apps/payment/management/commands/send_transactions_to_roistat.py +++ b/apps/payment/management/commands/send_transactions_to_roistat.py @@ -26,14 +26,13 @@ class Command(BaseCommand): for payment in payments: print('TRANSACTION: ' + str(payment.id)) - result = transaction_to_roistat( + transaction_to_roistat.delay( payment.user.id, payment.id, - f'Payment {payment.id}', + f'School payment', payment.amount, - payment.update_at.strftime('%Y-%m-%d %H:%M:%S'), - f'PINGBACK_TYPE_REGULAR', - f'Payment {payment.id}', + payment.created_at.strftime('%Y-%m-%d %H:%M:%S'), + 0, + f'school', payment.roistat_visit, ) - print('RESULT' + str(result.json())) diff --git a/apps/payment/tasks.py b/apps/payment/tasks.py index 824e7272..e30f4e19 100644 --- a/apps/payment/tasks.py +++ b/apps/payment/tasks.py @@ -56,4 +56,3 @@ def transaction_to_roistat(user_id, payment_id, event_name, amount, time, status url = settings.ROISTAT_API_URL + f'/project/add-orders?key={key}&project={project}' resp = requests.post(url, json=body) logger.info('TRANSACTION_TO_ROISTAT: ' + str(resp)) - return resp