From 78bdb92a4191984c60cf43291c598fe570d29277 Mon Sep 17 00:00:00 2001 From: MJ Akbari Date: Sat, 21 Sep 2024 23:48:24 +0330 Subject: [PATCH] debug 2 --- user/views.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/user/views.py b/user/views.py index e200d16..7375acb 100644 --- a/user/views.py +++ b/user/views.py @@ -533,9 +533,13 @@ def enroll(self, request): payment.save() if PAYWALL != 'idpay': + _status = result['status'] _code = result['code'] - _link = PayPingPeymentLinkGenerator(_code) - return redirect(_link) + result = { + "link": PayPingPeymentLinkGenerator(_code), + "status": _status + } + return self.set_response(message=None, data=result, status_code=status.HTTP_200_OK) else: return self.set_response(message="پیاده سازی نشده", error="Not implemented", status_code=status.HTTP_501_NOT_IMPLEMENTED)