Scheduled Postgres backup, restore check, backup warnings in health, payment result logging
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -223,8 +223,11 @@ class ZarinpalCallbackView(APIView):
|
||||
# یک NOKِ ناشناس آن را «ناموفق» میکرد و با دو سفارش ۵۰۰ میداد.
|
||||
if not authority:
|
||||
raise ValidationError({'Authority': 'لازم است.'})
|
||||
order = get_object_or_404(Order, gateway_authority=authority, provider='gateway')
|
||||
|
||||
order = Order.objects.filter(gateway_authority=authority, provider='gateway').first()
|
||||
if order is None:
|
||||
# کالبکِ بیسفارش: یا Authorityِ جعلی یا سفارشی که از دیتابیس رفته؛ در دیتابیس ردی ندارد.
|
||||
logger.warning('zarinpal callback: no order for authority=%s status=%s', authority[:64], status_param[:10])
|
||||
raise Http404
|
||||
if status_param != 'OK':
|
||||
new_status, gateway_ref_id = 'failed', ''
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user