Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Getting an error message when I create a link


katman1971

Recommended Posts

Posted

Hi

I'm really stuck with this and havent been able to find a solutions for a couple of weeks. I want to direct my customers to the paypal site after create_account.php and from the paypal site back to create_account_success.php.

 

I found this code in create_account.php:

 

      tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));

 

and I changed it to this:

      tep_redirect(<?php echo '<a href="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="HZ3KV68YJT4UL">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>'; ?>));

 

Now I get this error when I go to catalog/create_account.php:

 

Parse error: syntax error, unexpected '<', expecting ')' in /home/buildawe/public_html/store/catalog/create_account.php on line 248

 

This is line 248:

      tep_redirect(<?php echo '<a href="https://www.paypal.com/cgi-bin/webscr" method="post">

 

Any suggestions, I'd be very grateful.

Posted

PayPal have a redirect option on their site which works when people pay using their PayPal accounts (I don't think it works if people pay by credit card - which is dumb).

 

In your PayPal account, click Profile (next to Resolution Centre), and go to "Website Payment Preferences". Auto Return is the first option.

cmd-z... the best keystroke invented

Archived

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

×
×
  • Create New...