lingo: return early if transaction status didn't change (#22022)
This commit is contained in:
parent
6eba54171f
commit
de65efc33b
|
@ -434,8 +434,14 @@ class PaymentView(View):
|
|||
logger.info(u'received known payment response with id %s',
|
||||
smart_text(payment_response.order_id), extra=extra_info)
|
||||
|
||||
if transaction.status == payment_response.result:
|
||||
# return early if transaction status didn't change (it means the
|
||||
# payment service sent the response both as server to server and
|
||||
# via the user browser and we already handled one).
|
||||
return transaction
|
||||
|
||||
if transaction.status and transaction.status != payment_response.result:
|
||||
logger.warning(u'received payment notification on existing transaction '
|
||||
logger.info(u'received payment notification on existing transaction '
|
||||
'(status: %s, new status: %s)' % (
|
||||
transaction.status, payment_response.result))
|
||||
|
||||
|
|
Loading…
Reference in New Issue