You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
501 B
21 lines
501 B
# encoding:utf-8
|
|
from datetime import date
|
|
|
|
from django.dispatch import receiver
|
|
|
|
from yandex_money.signals import payment_completed
|
|
|
|
from customer.models import License
|
|
|
|
|
|
@receiver(payment_completed)
|
|
def pay_license(sender, **kwargs):
|
|
try:
|
|
print '!!!!!!!!!!!!!'
|
|
license = License.objects.get(id=sender.order_number)
|
|
license.paid_date = date.today()
|
|
license.status = 1
|
|
license.save()
|
|
except:
|
|
print 8789879787897, '@@@@@@@@@@@@@@@@'
|
|
pass
|
|
|