简体   繁体   中英

The user is anonymous after returning from a redirect

we implemented a paymentmethod with saved creditcards and 3dsecure (SAP commerce/hybris), but it's not always working. Sometimes a nullpointer for the orderData is thrown, after returning from the paymentservice. The reason for this seems to be, that the user sometimes is anonynoums after the return, so the orderData isn't visible.(the orderData exists by the way)

But I have no idea why this happens. And like I said it only happens occasionally on prod, but when I debbuged local it happend most of the time. And at the paymenservice the payment is authorized.

But it's difficult to debug, because there aren't any testcards to test with 3dscure, so I have to use a real one everytime.

To be honest, I am not sure if I am allowed to show the code here, so please forgive me, for not showing it now (I didn't write it).

Are there any "common" mistakes/suggestions/best-practices or whatever? Or maybe just an idea?

Oh, and we don't face this problem with other returns like paypal.

It's a bit tricky, since I don't know the code, but here are some advices:

  1. Maybe the Session Cookie in the browser is destroyed somehow? You can check with the Browsers developer tools if the cookie is contained in all requests (Network Tab -> Click on the Request -> Request Header). This can sometimes happen if you switch between http/https or multiple subdomains.
  2. Bad timing with an automatic logout of the user?
  3. Are you using multiple cluster nodes? Maybe the session is not yet synchronised between the nodes?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM