• Welcome to KonaKart Community Forum. Please login or sign up.
 

New Payment Gateway Installation - Session Problem

Started by Satish Shah, May 03, 2016, 02:54:37 pm

Previous topic - Next topic

Satish Shah

Hello,

I have installed Payment Gateway that successfully works but after ipn callback I am getting error as follows,

The session "Session id" is not found.

Would you please help me to get out of this.

I am following Paypal payment gateway code files.

Payment done successfully, orders and inventory updates successfully.

from IPN callback i am forwarding users to CheckoutFinishedAction.

Thank You


Brian

Have you configured the module correctly in the Admin Console.  Are any credentials that are required accurately specified?

Satish Shah

Yes brian..

All set correctly..

The problem is..

in ipn callback, the seesion we get from SSOToken get logout in finally block..

And then i am forwarding to the CheckoutFinishedAction.. bt there session not found.. and it redirects to login page..

I am also getting xsrf attack possible for current user ID

Please help..

Thanks a lot

Satish Shah

On checkoutfinishedAction.java , custId not found..

Sometimes  it forwarded to login page.. and sometime gives error message that The session 'some session id' not found..


Pleas reply

Thank you

Satish Shah

When error comes it always comes at

CatalogAfterLoginAction.java at line 70

kkAppEng.getOrderMgr().populateCustomerOrders();

Brian

You have the code for the module so you can easily diagnose this.   Add some debug statements if you can't make do with the standard logging.

You'll see in there where the SSOToken is created and saved in the database.  In order to get a sessionId it needs to log in using your callback username and password.  Check these are entered correctly for the module.

Once the SSOToken is saved it returns a UUID so that it can be accessed later.   This UUID is put in the custom field of the PayPal message.

When you get a callback from PayPal the UUID is picked up again from the custom field of the callback message from PayPal.   This is used to read the SSOToken.  The SSOToken has the sessionId.

Have you verified the contents of the callback from PayPal?

Have you verified that the order status is actually updated after the callback arrives?

Are you sure the return URL isn't causing a new session to be created?   Is it the same host and port as your user doing the shopping.

Add debug statements to the code to help you figure out what's going on or add logging such as:

# Database
log4j.logger.com.konakart.db                  = INFO

# Payemnt modules
log4j.logger.com.konakart.bl.modules.payment    = DEBUG

# IPNs
log4j.logger.com.konakart.actions.ipn           = DEBUG

# Storefront Actions
log4j.logger.com.konakart.actions               = DEBUG



Satish Shah

Thanks Brian for your time.

yes every thing works fine. Order status is getting updated, stock is also updated and at the end when this session (getting from SSOToken) is logged out and the current user is also getting logged out. And the user is forwarded to login page.

As of now what i am doing is storing session id of current customer in SSOToken. and getting the same on callback from UUID. and i am not logging out this session after orders status and stock updation. so can get current user logged in.

is it correct practice..?

Brian

No I would never recommend that you log out the user just because he's made a payment.

I would recommend you revert to the original code and keep the customer logged-in.   If the customer's session is being lost you should investigate why...  check the URLs in use at each stage to see why it considers that your customer has switched to another session.


Satish Shah

oh..I see.

Ok I ll try to find out that.

Thank You so much for correcting me..

Thank you

cav

Statish,

Did you get it corrected?  I have the same issue.

Brian,

My return url is also directing me to login page.  I have version 7.4.  Is this due to Paypal changes or possibly new browser feature?  The return URL is the same host and port as your user doing the shopping.  I do notice after payment in Paypal it takes it to another paypal page to thank user for purchase and then does a redirect to the return URL.  Is this causing the session to be lost?

Thanks.

cav

Nevemind...I figured out my issue.  My return URL needed to return to an SSL URL.  You may want to update the tooltip for that field to indicate it needs to be HTTPS URL.  Thanks.