feat: added product variants
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import logging
|
||||
|
||||
from django.http.response import HttpResponse
|
||||
from django.shortcuts import get_object_or_404
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
@@ -5,6 +7,8 @@ from django.views.decorators.csrf import csrf_exempt
|
||||
from shop.models import Order
|
||||
from shop.utils import add_payment_to_order, validate_payment_for_order
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@csrf_exempt
|
||||
def webhook(request, uuid):
|
||||
@@ -16,6 +20,7 @@ def webhook(request, uuid):
|
||||
|
||||
return HttpResponse(status=200)
|
||||
except Exception:
|
||||
logger.exception('Error processing payment webhook for order %s', order.uuid)
|
||||
order.status = Order.Statuses.STATUS_ERROR
|
||||
order.save()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user