fix(payment): update payment verification response status to 200 OK and set payment status to PAID ✨
This commit is contained in:
+2
-1
@@ -206,7 +206,7 @@ class VerifyPaymentView(StaffEditorPermissionMixin, generics.UpdateAPIView):
|
|||||||
"status": True,
|
"status": True,
|
||||||
"message": "Payment verified successfully using wallet.",
|
"message": "Payment verified successfully using wallet.",
|
||||||
},
|
},
|
||||||
status=status.HTTP_400_BAD_REQUEST,
|
status=status.HTTP_200_OK,
|
||||||
)
|
)
|
||||||
if method == "TRANSFER":
|
if method == "TRANSFER":
|
||||||
data = {
|
data = {
|
||||||
@@ -269,6 +269,7 @@ class VerifyPaymentView(StaffEditorPermissionMixin, generics.UpdateAPIView):
|
|||||||
payment.paid = True
|
payment.paid = True
|
||||||
payment.paid_at = timezone.now()
|
payment.paid_at = timezone.now()
|
||||||
payment.method = "WALLET"
|
payment.method = "WALLET"
|
||||||
|
payment.status = "PAID"
|
||||||
payment.save()
|
payment.save()
|
||||||
|
|
||||||
user.deduct_wallet_funds(
|
user.deduct_wallet_funds(
|
||||||
|
|||||||
Reference in New Issue
Block a user