تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3 الردود
8707 أدوات العرض

Hi,

I have configured cybersource as my payment gateway, I am able to navigate to cybersource and make a payment and able to return back to the site successfully.

But, user is getting logged out on redirecting back from the payment gateway, this is not happening all the time, but it is occurring randomly.

I identified in my networks that the cookies are getting removed on redirection. Is there any reason for that ? I have set Samesite=None and Secure=False in cookies.

Thanks!

الصورة الرمزية
إهمال

is it solved? let me know if it's solved .

الكاتب أفضل إجابة

Yes, it worked fine. The issue was because of the latest changes made by firefox and chrome restricting the cookies based on samesite. If samesite=None and Secure it is working fine


الصورة الرمزية
إهمال

where do i need add this configuration?

الكاتب

You need to set those configuration at webserver level.. it is not working with python requests.

apache?

الكاتب

I did that in nginx, I don't use apache much.

أفضل إجابة

I was also facing this issue, after searching in odoo code I found  save_session=False in the controller, which worked for me.

So just add  save_session=False in the controller 

this is the controller for the reference :

@http.route('/payment/takepayment/response', type='http', auth='public', csrf=False, save_session=False)

الصورة الرمزية
إهمال
أفضل إجابة

Can you post your nginx.conf Ajay?

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
يوليو 24
6702
1
أكتوبر 24
2276
4
سبتمبر 20
5612
0
يونيو 18
3124
0
فبراير 25
939