Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
8754 มุมมอง

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?

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ก.ค. 24
6730
1
ต.ค. 24
2305
4
ก.ย. 20
5619
0
มิ.ย. 18
3141
0
ก.พ. 25
954