Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 05-10-2021 10:53:52

sqm24
Member
Registered: 01-24-2018
Posts: 37

Check out - losing user id

Hi,

We are in the process of changing our credit card processor and I have been trying to integrate the new card processing into Kryptronic. All seemed to be going well until I got some of my colleges to test the check out process for me.

You first have to be logged in to go to check out and then on returning to the check out page after going to the card processorís site to enter the card details it seems to lose the customers id and think you are not logged in. The order is accepted and if you click on to another page you find you are still logged in. Indeed the order can be found in your review orders section, but the product you bought is still in your basket.

I have made a mod to the ECOM_OLP.php file as you can get our card processor to remember cards   so I check the gateway id is the correct one and if they have requested to save the card details I store   a reference to that in a table. This is done just after the check for the response code.

Because I seem to be losing the users id, I have been grabbing it just after the valid user test and then displaying it. However, I find that it gets past the valid user test and then seems to loose the users id. I can not see how, could this be a cookie thing? It is difficult to work out, sometimes it seems to have worked and I think that I have sorted it and then it doesn't work again! I have been testing it on Chrome.

Any ideas?

Simon

Offline

 

#2 05-10-2021 14:34:04

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1672

Re: Check out - losing user id

what payment method are you trying to integrate?


- Euorpacart 8

Offline

 

#3 05-11-2021 03:00:00

sqm24
Member
Registered: 01-24-2018
Posts: 37

Re: Check out - losing user id

First Data connect gateway

Offline

 

#4 05-11-2021 04:23:15

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1672

Re: Check out - losing user id

I had a similar problem when trying to set up Sagepay, but only when I was using the test url.
Worked correctly with the live url.

Don't know if that helps.


- Euorpacart 8

Offline

 

#5 05-11-2021 08:17:33

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19687
Website

Re: Check out - losing user id

Which subversion of K9 are you using?  Are you leveraging the core_users/CORE_Session olpdata functionality to store the payment tokens?  Are you sure you have installed the software with the correct cookie path and domain entered?  Are you targeting a URL which is redirecting upon return from the processor site (a URL that does not exit)?


Nick Hendler

Offline

 

#6 05-11-2021 11:23:27

sqm24
Member
Registered: 01-24-2018
Posts: 37

Re: Check out - losing user id

K9 version is 9.0.3

The return url from the card payment is https://[Site-address]/utilities/ecomrelay.php

Not sure where the cookie paths are to check, but I believe they are right.

As for the core_users/CORE_Session olpdata, I donít think Iím using that as I donít know anything about it.

Offline

 

#7 05-12-2021 08:41:22

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19687
Website

Re: Check out - losing user id

Check the cookie domain and path in your private config.php file.

Are you by chance testing with multiple browsers and/or browser windows or tabs open, and using one then another to test intermittently?  The reason I ask is that K9.0.2 and higher use session-based logic which is tied to a cookie with a session token in it.  They are rotated every few minutes, which would cause multiple browsers to become out of synch and logged out.  Test with one browser, one browser window.

Check out the Authorize.net CIM gateway for proper session olpdata usage.  K9 is set up to maintain those payment tokens for you, it saves and modifies them, and automatically expires old ones, etc.


Nick Hendler

Offline

 

#8 05-13-2021 04:49:34

sqm24
Member
Registered: 01-24-2018
Posts: 37

Re: Check out - losing user id

Hi,

Kriptronic is in a folder /store and the cookie path is set to /store so I think that is right.
The cookie domain I would say is right, but it does start with a Ď.í character is that right? I tried it without, but it made no difference.

It is very strange, the account I have been using seems to work fine and I even tried it from home, as we are behind a proxy server in the office, and it worked fine.  However, my college when trying with his own account to make a purchase has problems. First time he attempts all goes well and on return from the card payment site we get the confirmation page and he is still logged in and the basket is empty. When he then tries to make another purchase and he returns from the card payment site, the thank you page displays, but he seems to be logged out. However, when he then goes to another page he is still logged in and the item he has purchased is still in the basket. What is more the order is processed and acknowledged as his, and he gets the email confirmation. He tried it from his mobile phone as well and had the same problem but on his first attempt at a purchase.

Thanks for the info on the Authorize.net CIM gateway, I will have a look at that.

Simon.

Offline

 

#9 05-13-2021 08:06:28

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19687
Website

Re: Check out - losing user id

Do you have any sort of caching daemons running on top of the webserver which may be caching the return URL.  That's about the only thing I can think of that would cause the behavior you're describing.  Cookie path and domain sound like they're set correctly based on what you've posted there.


Nick Hendler

Offline

 

#10 05-13-2021 08:55:07

sqm24
Member
Registered: 01-24-2018
Posts: 37

Re: Check out - losing user id

Not sure, will ask the people who look after our server and get back to you.

Offline

 

#11 05-14-2021 06:17:37

sqm24
Member
Registered: 01-24-2018
Posts: 37

Re: Check out - losing user id

I have checked and I'm told the server has the default Windows server setting and no additional caching services installed.

Offline

 

#12 05-14-2021 06:59:38

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19687
Website

Re: Check out - losing user id

I think I've exhausted what I can do via Q&A format here on the forum.  Perhaps open a support ticket.


Nick Hendler

Offline

 

#13 05-14-2021 08:13:58

sqm24
Member
Registered: 01-24-2018
Posts: 37

Re: Check out - losing user id

Thanks,

We have done some more testing using a computer not going through our proxy server in the office and it all worked as one would expect.

I wounder if its to do with the proxy server, but it has been so hit and miss. So we will have allok at what results we get on Monday and see where we go from there.

Simon.

Offline

 

#14 05-14-2021 08:29:09

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19687
Website

Re: Check out - losing user id

Perhaps there's caching (or even filtering) occurring on the proxy server.  That could affect the requests depending on how they're sent.


Nick Hendler

Offline

 

#15 05-19-2021 09:47:15

sqm24
Member
Registered: 01-24-2018
Posts: 37

Re: Check out - losing user id

I think we may have solved our problem. We found that when coming back from the card processing site via a Ďreturn to shopí form, the cookie ktokenuser was sometimes missing when checked by the CORE_session object. So I tried changing the return url to ecomrelaymeta.php and that seems to have done the trick.

It does mean the returning data is now a GET rather than a POST, but the cookie does seem to be recovered with the redirect.

Simon.

Offline

 

#16 05-20-2021 08:33:40

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19687
Website

Re: Check out - losing user id

Excellent.  Some processors emulate a post back but keep the customer on their site.  The ecomrelaymeta method is a way around that.


Nick Hendler

Offline

 

Board footer