I have both post and get callbacks from an external api
from the post one i need a variable to send to the get one
how can i do it?
class parspostget(View):
def __init__(self,):
print("INITTT")
self.post_hmac = ''
def get(self, request, *args, **kwargs):
print("GET DEF START")
print(request.method)
print(self.post_hmac)
print(request.session.get("hmac"))
print("GET DEF END")
return render(request, "store/card_payment.html")
# return JsonResponse("get", safe=False)
@csrf_exempt
def post(self, request, *args, **kwargs):
print("POST DEF START")
print(request.method)
self.post_hmac = paymentProcCallback(request)
print(self.post_hmac)
request.session['hmac'] = self.post_hmac
print("POST DEF END")
return render(request, "store/card_payment.html")
# return JsonResponse("post", safe=False)