Guest Posted March 13, 2008 Posted March 13, 2008 >_< I have set up new OsCommerce site, and I'm trying to connect the Paypal Direct Payment. It doesn't work because the path is wrong. The cart is at http://www.in-sightinc.net/cart. If I click on the Paypal link on the shopping cart, the link is to http://www.in-sightinc.net/cart/cartshoppingcart.php. It should be http://www.in-sightinc.net/cart/shoppingcart.php. If I go farther into the checkout process, on the page after entering address information, I can go to Paypal. When I try to pay, I get a message "/cart/cartcheckout_payment.php was not found" In both cases, it's adding "cart" after the final /. Can anyone point me to the file ? I've checked filenames.php, and there it's correct. It appears that everywhere else OsCommerce is working. Thanks in advance. Ed Quote
Guest Posted March 13, 2008 Posted March 13, 2008 >_< I have set up new OsCommerce site, and I'm trying to connect the Paypal Direct Payment. It doesn't work because the path is wrong. The cart is at http://www.in-sightinc.net/cart. If I click on the Paypal link on the shopping cart, the link is to http://www.in-sightinc.net/cart/cartshoppingcart.php. It should be http://www.in-sightinc.net/cart/shoppingcart.php. If I go farther into the checkout process, on the page after entering address information, I can go to Paypal. When I try to pay, I get a message "/cart/cartcheckout_payment.php was not found" In both cases, it's adding "cart" after the final /. Can anyone point me to the file ? I've checked filenames.php, and there it's correct. It appears that everywhere else OsCommerce is working. Thanks in advance. Ed You messed up your configure.php files and need to fix them. Quote
Guest Posted March 13, 2008 Posted March 13, 2008 You messed up your configure.php files and need to fix them. No, there's nothing wrong with my configure.php. I just fixed the problem, and it looks a lot like a bug to me. In /includes/paypal_wpp/paypal_wpp_include.php, at about line 47 you will see this: echo tep_href_link(str_replace('/', '', $_SERVER['SCRIPT_NAME']), 'action=express_checkout&return_to=' . $return_to, 'SSL'); Now in my system I had installed osCommerce at /cart. So when viewing shopping_cart.php, $_SERVER['SCRIPT_NAME'] returns "/cart/shopping_cart.php". The str_replace changes that to "cartshopping_cart.php". What I did was change that to two lines: $path_parts = pathinfo($_SERVER['SCRIPT_NAME']); echo tep_href_link($path_parts['basename'], 'action=express_checkout&return_to=' . $return_to, 'SSL'); And it works correctly now. Quote
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.