cupidare Posted November 30, 2017 Posted November 30, 2017 Hello, I installed a fresh the (latest bs-) oscommerce and configured Paypal. Everything is working (order is processed, order status set, email send) but Paypal returns to an empty cart. Of course I added PDT, set checkout_process in the return url (Indeed, if the PDT is not entered into the configuration, the checkout_process doesn't load at all with an error). I have no idea how to proceed. the only way the checkout confirmation.php is shown is when changing checkout_process.php; // if there is nothing in the customers cart, redirect them to the shopping cart page if ($cart->count_contents() < 1) { // tep_redirect(tep_href_link('shopping_cart.php')); } tep_redirect(tep_href_link('checkout_success.php')); } But this should not be the right way. It seems that the cart is emptied somewhere and then forwarding the user to the empty cart. Any hints? Thank you! Quote
frankl Posted November 30, 2017 Posted November 30, 2017 Are you using the Paypal App? Quote osCommerce user since 2003!
cupidare Posted December 1, 2017 Author Posted December 1, 2017 Thank you for your reply I am using the paypal app of course. the error is in my opinion in includes/modules/payment/paypal_standard.php function after_process() { global $cart; $cart->reset(true); // unregister session variables used during checkout tep_session_unregister('sendto'); tep_session_unregister('billto'); tep_session_unregister('shipping'); tep_session_unregister('payment'); tep_session_unregister('comments'); tep_session_unregister('cart_PayPal_Standard_ID'); //wrong //tep_redirect(tep_href_link('checkout_process.php', '', 'SSL')); //right tep_redirect(tep_href_link('checkout_success.php', '', 'SSL')); } It should be changed in the git-respository Quote
Mikepo Posted December 1, 2017 Posted December 1, 2017 i'm running 2.3.4 BS Gold, and the tep_redirect points to checkout_success.php. My paypal version is app v5.018 What version are you using? Quote osC CE live - developing osC Phoenix adding modules with no core changes(awesome and easy!)
cupidare Posted December 1, 2017 Author Posted December 1, 2017 (edited) it only affects the out-of-the-box bs installation... As far as I know v5.018 is not really official bs-compatible. It seems that the patches are still pushed out in the "old-fashion" After this tiny change everything works well for me Edited December 1, 2017 by cupidare Quote
frankl Posted December 1, 2017 Posted December 1, 2017 The official includes/modules/payment/paypal_standard.php from https://github.com/haraldpdl/oscommerce2/blob/23/catalog/includes/modules/payment/paypal_standard.php shows function after_process() { global $cart; $cart->reset(true); // unregister session variables used during checkout tep_session_unregister('sendto'); tep_session_unregister('billto'); tep_session_unregister('shipping'); tep_session_unregister('payment'); tep_session_unregister('comments'); tep_session_unregister('cart_PayPal_Standard_ID'); tep_redirect(tep_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL')); } So it looks like an error in the Bootstrap version Quote osCommerce user since 2003!
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.