Jump to content

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&business=me@mybusiness.com&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="sales@lotionsource.com">
                                  <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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.