From f256de8710a844794676191a16a9c1223d77f2fc Mon Sep 17 00:00:00 2001 From: Adibov Date: Sat, 16 Dec 2023 01:20:23 +0330 Subject: [PATCH] fix(backend): get clientrefid from queryparam --- backend/backend_api/urls.py | 2 +- backend/backend_api/views.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/backend_api/urls.py b/backend/backend_api/urls.py index 3b7b362..a35ec7e 100644 --- a/backend/backend_api/urls.py +++ b/backend/backend_api/urls.py @@ -90,5 +90,5 @@ def __init__(self, *args, **kwargs): path('', include(committee_routes)), path('', include(user_route)), path('payment/', views.PaymentViewSet.as_view({'post': 'payment'})), - path('payment/verify/', views.PaymentViewSet.as_view({'post': 'verify'})), + path('payment/verify/', views.PaymentViewSet.as_view({'get': 'verify', 'post': 'verify'})), ] diff --git a/backend/backend_api/views.py b/backend/backend_api/views.py index bde7170..a08003a 100644 --- a/backend/backend_api/views.py +++ b/backend/backend_api/views.py @@ -244,9 +244,9 @@ def payment(self, request): return Response( new_detailed_response(response['status'], response["message"])) - @action(methods=['POST'], detail=False) + @action(methods=['GET', 'POST'], detail=False) def verify(self, request): - pid = request.data.get('clientrefid') + pid = request.query_params.get('clientrefid') if pid is None: return Response(new_detailed_response( status.HTTP_400_BAD_REQUEST, "clientrefid is required"))