Python Django session expire on redirect url is called

I have made an medium size website and am trying to implement payment gateway(paytm). In order to process the payment token is needed to start the payment, i could able to generate the token from the api request and the JS payment page is being invoked successfully. The main problem am encountering is after selecting the payment and start the payment pop up page appears to getting an error Session expired due to inactivity with in a seconds the page load.

I tried contacting the payment gateway dev team but the could able to generated the payment successfully. However they are doing it in flask or through postman. when i try to run the code i have no problem processing the payment but when i use the same code in the Django am unable to process the payment.Even they are unable to understand the problem am getting(i.e session expired due to inactivity.)

I am wondering this has to do something with the sessions and when i have stored the token in the session and call the payment page at then i do not get the error but am getting another issue is that the values are not being passed to the url when i call them.

I am attaching a video link to show that it works in flask but not in django. i have attached a link containing the video showing my problem and 2 folder one is for flask files which runs perfectly another folder named django same files dont run properly.

Note: code uploaded is only for the payment module and views.

folder link to files

Thank you.

Back to Top