lingo: increase timeout of payment notifications (#18577)

This commit is contained in:
Frédéric Péters 2017-09-11 10:49:32 +02:00
parent d6e1d0803d
commit 1e87c3b437
2 changed files with 3 additions and 3 deletions

View File

@ -239,7 +239,7 @@ class BasketItem(models.Model):
message['bank_data'] = transaction.bank_data
headers = {'content-type': 'application/json'}
r = requests.post(url, remote_service='auto',
data=json.dumps(message), headers=headers, timeout=3)
data=json.dumps(message), headers=headers, timeout=15)
r.raise_for_status()
def notify_payment(self):

View File

@ -431,9 +431,9 @@ class CallbackView(View):
if payment_response.result != eopayment.PAID:
return HttpResponse()
transaction.items.update(payment_date=transaction.end_date)
for item in transaction.items.all():
item.payment_date = transaction.end_date
item.save()
try:
item.notify_payment()
except: