getting webhook events into database 3
This commit is contained in:
@@ -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"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user