getting webhook events into database 3

This commit is contained in:
rizwanisready
2024-04-19 16:44:57 +05:30
parent 9cd0b9ef7c
commit 3150698c2d

View File

@@ -195,6 +195,8 @@ class StripeWebhookTest(APIView):
payment_service.process_event()
webhook_event = WebhookEvent.objects.get(event_id=event_id)
webhook_event.status = "processed"
webhook_event.processed_at = timezone.now() # Make sure to import timezone
webhook_event.save()
return ApiResponse.success(
status=status.HTTP_200_OK, message="Event processed successfully"
)