Add HTTP status codes to responses in VerifyPaymentView for payment verification
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 2m49s

This commit is contained in:
i701 2025-05-30 22:56:13 +05:00
parent 09591bf825
commit f8d6e78f90
Signed by: i701
GPG Key ID: 54A0DA1E26D8E587

View File

@ -186,11 +186,13 @@ class VerifyPaymentView(StaffEditorPermissionMixin, generics.UpdateAPIView):
device.save()
return Response(
{"message": f"Payment verified successfully using [{method}]."}
{"message": f"Payment verified successfully using [{method}]."},
status=status.HTTP_200_OK,
)
else:
return Response(
{"message": f"Payment verification FAILED using [{method}]."}
{"message": f"Payment verification FAILED using [{method}]."},
status=status.HTTP_400_BAD_REQUEST,
)
def process_wallet_payment(self, user, payment):