diff --git a/apps/payment/management/commands/send_transactions_to_roistat.py b/apps/payment/management/commands/send_transactions_to_roistat.py index 15a50e38..14ee6ee6 100644 --- a/apps/payment/management/commands/send_transactions_to_roistat.py +++ b/apps/payment/management/commands/send_transactions_to_roistat.py @@ -26,7 +26,7 @@ class Command(BaseCommand): for payment in payments: print('TRANSACTION: ' + str(payment.id)) - transaction_to_roistat( + result = transaction_to_roistat( payment.user.id, payment.id, f'Payment {payment.id}', @@ -36,3 +36,4 @@ class Command(BaseCommand): f'Payment {payment.id}', payment.roistat_visit, ) + print('RESULT' + str(result)) diff --git a/apps/payment/tasks.py b/apps/payment/tasks.py index e30f4e19..3b15a50f 100644 --- a/apps/payment/tasks.py +++ b/apps/payment/tasks.py @@ -56,3 +56,5 @@ 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