Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

VERY weird 404, Paypal's links to me all fail during checkout?


GoldenTiger

Recommended Posts

Posted

I have an oscommerce site that I am testing (was JUST about done before this, too!), and for some reason, I can go through and pay myself with test orders on the live paypal server without issue except, the Return to Merchant link on all the pages just directs to /checkout_process.php instead of it on my domain, and of course it then 404's. It also does it after payment goes through on the last page where you can click a button to return to the merchant site. I am using Paypal_IPN v2.3.3 with oscommerce 2.2 ms2.

 

The thing that I can't figure out is, it worked fine for me last night... I've since done some small modifications such as timezone and adding a text to the checkout pages (in an existing variable above the comments field), and now it bugs when I try to do a test to make sure it works with this. Anyone have any idea how to fix it? I've gone through every related file a dozen times, and everything looks perfect on the surface, yet of course it doesn't work (the payment goes through and everything, it just seems that my site's URL path isn't being passed in the IPN).

 

Been at this for about 3 hours now, any help would be greatly appreciated.

Posted

Did you check on the PayPal side it has the full url spelled out to the checkout_success.php?

Installed Contributions: CCGV, Close Popup, Dynamic Meta Tags, Easy Populate, Froogle Data Feeder, Google Position, Infobox Header Entire Row, Live Support for OSC, PayPal Seal with CC images, Report_m Sales, Shop by Price Revised, SQL Updater, Who's Online Enhancement, Footer, GNA EP Assistant and still going.

Posted

On the last Paypal page, it just says /checkout_process.php as the link, with the session ID/cart ID as the return URL, which results in a link on paypal's domain that doesn't work, rather than mine that does work. The same thing happens with the Return to Merchant link during checkout. So, no, it isn't spelled out to my domain with my path :(.

Posted

I'm pretty sure it when you made your PayPal payment and your ready to click on the Return to Merchant it should show the full URL (http://yoursite.com/checkout_succes.php or however your shop is setup).

 

If when you hover the Return to Merchant button it only shows /checkout_success.php your going to need to change it in PayPal > My Account > Profile > Website Payment Preferences set Auto Return to ON and the Return URL to the Full URL to checkout_success.php (with the http://_____________) also set Payment Data Transfer (Optional) to ON.

 

The rest of the options are up to you.

 

Remember to SAVE the changes.

 

Hope this helps.

Installed Contributions: CCGV, Close Popup, Dynamic Meta Tags, Easy Populate, Froogle Data Feeder, Google Position, Infobox Header Entire Row, Live Support for OSC, PayPal Seal with CC images, Report_m Sales, Shop by Price Revised, SQL Updater, Who's Online Enhancement, Footer, GNA EP Assistant and still going.

Posted

It is supposed to show yoursite.com/checkout_success.php as it did before, I can't figure out what caused the change. I never had auto-return on under the Website Payment Preferences and it worked before, which is why I'm confused as to what I changed on my end that is causing this. It worked before, a couple of days ago, just fine... I went to test it again now, and it doesn't. I can't figure out what I did or how to fix it :(. Thanks for the thought.

Posted

OK, by editting paypal_ipn.php, I got it to send me to my domain, but it just returns me to the main page, ie mydomain.com/?checkout_process.php&osCid=587289797589427fjahef which shows my index instead of the function it's supposed to. Any ideas from here? It still isn't working, but at least the link appears right now?

 

// EOF parameters fix by AlexStudio

  $parameters['currency_code'] = $my_currency;
  $parameters['invoice'] = substr($cart_PayPal_IPN_ID, strpos($cart_PayPal_IPN_ID, '-')+1);
  $parameters['custom'] = $customer_id;
  $parameters['no_note'] = '1';
  $parameters['notify_url'] = tep_href_link('ext/modules/payment/paypal_ipn/ipn.php', 'language=' . $_SESSION['language'], 'SSL', false, false);
  $parameters['cbt'] = CONFIRMATION_BUTTON_TEXT;  
  $parameters['return'] = tep_href_link('http://www.XXXXXXXXXXXXXXXXX.com/', FILENAME_CHECKOUT_PROCESS, 'SSL');
  $parameters['cancel_return'] = tep_href_link('http://www.XXXXXXXXXXXXXXXXX.com/', FILENAME_CHECKOUT_PAYMENT, 'SSL');
  $parameters['bn'] = $this->identifier;
  $parameters['lc'] = $order->customer['country']['iso_code_2'];

Posted

Fixed it... took some hardcoding, but it works now... what a pain to hunt down, and I'm still not sure what caused it even. Hopefully this helps someone in the future if it happens to them, the XXXXXXXXXXXX would be your domain, and my osCommerce is in the root folder.

 

// EOF parameters fix by AlexStudio

  $parameters['currency_code'] = $my_currency;
  $parameters['invoice'] = substr($cart_PayPal_IPN_ID, strpos($cart_PayPal_IPN_ID, '-')+1);
  $parameters['custom'] = $customer_id;
  $parameters['no_note'] = '1';
  $parameters['notify_url'] = tep_href_link('http://www.XXXXXXXXXXXX.com/ext/modules/payment/paypal_ipn/ipn.php', 'language=' . $_SESSION['language'], 'SSL', false, false);
  $parameters['cbt'] = CONFIRMATION_BUTTON_TEXT;  
  $parameters['return'] = tep_href_link('http://www.XXXXXXXXXXXX.com/checkout_process.php', '', 'SSL');
  $parameters['cancel_return'] = tep_href_link('http://www.XXXXXXXXXXXX.com/checkout_payment.php', '', 'SSL');
  $parameters['bn'] = $this->identifier;
  $parameters['lc'] = $order->customer['country']['iso_code_2'];

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...