abolotov Posted May 6, 2010 Share Posted May 6, 2010 Hello. I have next problem. I installed PayPal standart as payment module using Sandbox, created acount at Sandbox as Merchant and Buyer. Then I log in to my shop as customer and try to checkout. Everithing is alright - I select shipping method, payment(paypal), then at Confirmation page, when I click continue, I go to the PayPal sandbox, enter my email and password and pay for my Shopping. Click on "Pay Now" - and go to next page where I can see that everything is alright. I check my balance on both accounts at Sandbox - I have money as Merchant and missed it as Buyer. Ok. But when I click on button "Back to merchant's shop" I have login page and after login all checkout process begins again - my cart isn't empty. I can see from code that problem is next. When I back from PayPal page I miss Session variable customer_id ($_SESSION['customer_id']). So my question is how to fix it? Regards, Alexey. P.S. Sorry for my English. Link to comment Share on other sites More sharing options...
web-project Posted May 6, 2010 Share Posted May 6, 2010 Hello. I have next problem. I installed PayPal standart as payment module using Sandbox, created acount at Sandbox as Merchant and Buyer. Then I log in to my shop as customer and try to checkout. Everithing is alright - I select shipping method, payment(paypal), then at Confirmation page, when I click continue, I go to the PayPal sandbox, enter my email and password and pay for my Shopping. Click on "Pay Now" - and go to next page where I can see that everything is alright. I check my balance on both accounts at Sandbox - I have money as Merchant and missed it as Buyer. Ok. But when I click on button "Back to merchant's shop" I have login page and after login all checkout process begins again - my cart isn't empty. I can see from code that problem is next. When I back from PayPal page I miss Session variable customer_id ($_SESSION['customer_id']). So my question is how to fix it? Regards, Alexey. P.S. Sorry for my English. to fix the issue, I recommend to install the PayPal IPN, as with standard module you will get the issue missing orders. Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here! 8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself. Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues. Any issues with oscommerce, I am here to help you. Link to comment Share on other sites More sharing options...
abolotov Posted May 8, 2010 Author Share Posted May 8, 2010 to fix the issue, I recommend to install the PayPal IPN, as with standard module you will get the issue missing orders. I've Installed PayPal IPN as You recomended and have the same problem. I've checked everything - money from customer account goes to the merchant's account and at Sandbox side everything is ok, but variable $_SESSION['customer_id'] still disapear so customer can't finish shopping correctly. Link to comment Share on other sites More sharing options...
Jan Zonjee Posted May 8, 2010 Share Posted May 8, 2010 When I back from PayPal page I miss Session variable customer_id ($_SESSION['customer_id']). I absolutely have no clue about PayPal modules but was the osCsid from the url gone when you logged-in? If the osCsid is not gone from the url (which it should at least in a few clicks on the site) than that would explain the problem? Link to comment Share on other sites More sharing options...
abolotov Posted May 8, 2010 Author Share Posted May 8, 2010 I absolutely have no clue about PayPal modules but was the osCsid from the url gone when you logged-in? If the osCsid is not gone from the url (which it should at least in a few clicks on the site) than that would explain the problem? Yes, osCsid is going from site in a hidden field like this: <input type="hidden" name="osCsid" value="69r0me1110oet5srh2ns3tbrb6"> Link to comment Share on other sites More sharing options...
Jan Zonjee Posted May 8, 2010 Share Posted May 8, 2010 Yes, osCsid is going from site in a hidden field like this: <input type="hidden" name="osCsid" value="69r0me1110oet5srh2ns3tbrb6"> That's not the same thing. If the osCsid stays in the url all the time the customer doesn't keep or get a cookie with osCsid. Then one link without the osCsid as a get variable in the url will make the osCsid being lost and when the customer returns to the site he/she gets a new osCsid that doesn't match the hidden one. Link to comment Share on other sites More sharing options...
abolotov Posted May 8, 2010 Author Share Posted May 8, 2010 That's not the same thing. If the osCsid stays in the url all the time the customer doesn't keep or get a cookie with osCsid. Then one link without the osCsid as a get variable in the url will make the osCsid being lost and when the customer returns to the site he/she gets a new osCsid that doesn't match the hidden one. You are right - when I come from PayPal page I have another osCsid. So, as I see, I must save this osCsid and come back to my shop width it. Any ideas why PayPal starts new session after I visit it? And one more thing that I've found. When I am on page with button "Return to the merchants shop" (after transaction), I can see the form: and osCsid is equals to osCsid that was when I went to the PayPal! So why if the form's action is correct, I trapped to the page with another osCsid? Link to comment Share on other sites More sharing options...
Jan Zonjee Posted May 8, 2010 Share Posted May 8, 2010 You are right - when I come from PayPal page I have another osCsid. So, as I see, I must save this osCsid and come back to my shop width it. Any ideas why PayPal starts new session after I visit it? It's not PayPay's problem but yours. You have to change the includes/configure.php in such a way that cookies are set correctly so that the osCsid disappears from the url. Link to comment Share on other sites More sharing options...
abolotov Posted May 8, 2010 Author Share Posted May 8, 2010 It's not PayPay's problem but yours. You have to change the includes/configure.php in such a way that cookies are set correctly so that the osCsid disappears from the url. Can you give me an advice what I must change in config.php to make it work correctly? Link to comment Share on other sites More sharing options...
Jan Zonjee Posted May 8, 2010 Share Posted May 8, 2010 Can you give me an advice what I must change in config.php to make it work correctly? Perhaps if you post the first lines in your configure.php (you can disguise your shops url if you don't like to have it found). These are those lines on the catalog side I use for a local copy of osC in the folder catalog: define('HTTP_SERVER', 'http://localhost'); define('HTTPS_SERVER', 'http://localhost'); define('ENABLE_SSL', false); define('HTTP_COOKIE_DOMAIN', 'localhost'); define('HTTPS_COOKIE_DOMAIN', 'localhost'); define('HTTP_COOKIE_PATH', '/catalog/'); define('HTTPS_COOKIE_PATH', '/catalog/'); define('DIR_WS_HTTP_CATALOG', '/catalog/'); define('DIR_WS_HTTPS_CATALOG', '/catalog/'); Link to comment Share on other sites More sharing options...
abolotov Posted May 8, 2010 Author Share Posted May 8, 2010 Perhaps if you post the first lines in your configure.php (you can disguise your shops url if you don't like to have it found). These are those lines on the catalog side I use for a local copy of osC in the folder catalog: define('HTTP_SERVER', 'http://localhost'); define('HTTPS_SERVER', 'http://localhost'); define('ENABLE_SSL', false); define('HTTP_COOKIE_DOMAIN', 'localhost'); define('HTTPS_COOKIE_DOMAIN', 'localhost'); define('HTTP_COOKIE_PATH', '/catalog/'); define('HTTPS_COOKIE_PATH', '/catalog/'); define('DIR_WS_HTTP_CATALOG', '/catalog/'); define('DIR_WS_HTTPS_CATALOG', '/catalog/'); And, please, what I must change here to save osCsid (I have the same thing as You in my config.php). And I still can not understand - as I wrote, form at PayPal's page has action to right file with right url (right osCsid means). But why when I submit it, osCsid change to another? Link to comment Share on other sites More sharing options...
Jan Zonjee Posted May 8, 2010 Share Posted May 8, 2010 And, please, what I must change here to save osCsid (I have the same thing as You in my config.php). PayPal cannot send someone back to localhost so you if you have the same lines in your configure.php then it will never work anyway. Link to comment Share on other sites More sharing options...
abolotov Posted May 8, 2010 Author Share Posted May 8, 2010 PayPal cannot send someone back to localhost so you if you have the same lines in your configure.php then it will never work anyway. Sure. But "the same" I mean their order). I have this problem when site is on server. So what I must change? Link to comment Share on other sites More sharing options...
Jan Zonjee Posted May 8, 2010 Share Posted May 8, 2010 Sure. But "the same" I mean their order). I have this problem when site is on server. So what I must change? See e.g. this topic which has likely dozens of examples of how your configure.php should look like. See also the Knowledge Base on what a valid cookie domain looks like. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.