LIL-563. Add roistat visit to transaction_to_roistat

remotes/origin/feature/effective_amount
Ivlev Denis 8 years ago
parent 7782042377
commit d377668b52
  1. 3
      apps/payment/tasks.py
  2. 1
      apps/payment/views.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': {

@ -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:

Loading…
Cancel
Save