From d377668b52e4362054344b7efc6991f78a3766fc Mon Sep 17 00:00:00 2001 From: Ivlev Denis Date: Fri, 6 Jul 2018 08:03:49 +0300 Subject: [PATCH] LIL-563. Add roistat visit to transaction_to_roistat --- apps/payment/tasks.py | 3 ++- apps/payment/views.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/payment/tasks.py b/apps/payment/tasks.py index 911235a3..f6140af6 100644 --- a/apps/payment/tasks.py +++ b/apps/payment/tasks.py @@ -38,12 +38,13 @@ def product_payment_to_mixpanel(user_id, event_name, time, properties): @app.task -def transaction_to_roistat(user_id, payment_id, event_name, amount, time, status, product_type): +def transaction_to_roistat(user_id, payment_id, event_name, amount, time, status, product_type, roistat_visit): body = [{ 'id': str(payment_id), 'name': event_name, 'date_create': time, 'status': str(status), + 'roistat': str(roistat_visit) if roistat_visit or None, 'price': str(amount), 'client_id': str(user_id), 'fields': { diff --git a/apps/payment/views.py b/apps/payment/views.py index 6facfaee..4f4a958a 100644 --- a/apps/payment/views.py +++ b/apps/payment/views.py @@ -264,6 +264,7 @@ class PaymentwallCallbackView(View): now().strftime('%Y-%m-%d %H:%M:%S'), pingback.get_type(), product_type_name, + payment.roistat_visit, ) author_balance = getattr(payment, 'author_balance', None) if author_balance and author_balance.type == AuthorBalance.IN: