Jump to content

Converting a Website to Paypal


tbrama

Recommended Posts

I have tried everything and i just cannot figure this out. Here's the situation. I have a client that had his site made by someone else and wants to stop using the Shopping cart that they set him up for and wants to use paypal. I need someone to point me in the right direction or write the code snippet to pass the variables of each DVD he's selling to paypal.

 

Here is the old code

<form action=\"http://www.cartserver.com/sc/cart.cgi\" target=\"_blank\" method=\"post\">
			<input name=\"item\" value=\"s-2990^CAT".$this_data['id']."D^Catfishing with the Pros, ".$this_data['title']." (DVD)^".$dvd_price."^1\" height=\"0\" type=\"hidden\" width=\"0\">
			<input name=\"add\" src=\"images/buttombuy.gif\" border=\"0\" height=\"15\" type=\"image\" width=\"60\">
			</form>

 

I need to update it to use paypal. I have the link to pass the variables but could someone give me a hand at writing the url for each button...

 

I am probably just missing a comma or apostrophe...

 

https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&[email protected]&currency_code=USD

 

Thats the link, now I need to append &item_name=, for the Items name, and &amount=, for the price, to that url. I need to fetch those 2 things using variables. Can someone help me out with that?

Link to comment
https://forums.phpfreaks.com/topic/164018-converting-a-website-to-paypal/
Share on other sites

example

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
                                  <input type="hidden" name="cmd" value="_cart">

                                  <input type="hidden" name="return" value="http://www.lotionsource.com/thank_you_for_your_order.htm">
                                  <input type="hidden" name="business" value="[email protected]">
                                  <input type="hidden" name="item_name" value="Hempz ORIGINAL Herbal Moisturizer 18oz">
                                  <input type="hidden" name="amount" value="10.60">
                                  <input type="hidden" name="handling" value="0">
                                  <input type="hidden" name="weight" value="1.2">
                                  <input type="hidden" name="currency_code" value="USD">
                                  <input type="image" src="http://www.lotionsource.com/design/addmini.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
                                  <input type="hidden" name="add" value="1">

                                </form>

 

see here for more

http://www.lotionsource.com/

 

Hope it helps

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.