tbrama Posted June 28, 2009 Share Posted June 28, 2009 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¤cy_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? Quote Link to comment https://forums.phpfreaks.com/topic/164018-converting-a-website-to-paypal/ Share on other sites More sharing options...
MadTechie Posted June 29, 2009 Share Posted June 29, 2009 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 Quote Link to comment https://forums.phpfreaks.com/topic/164018-converting-a-website-to-paypal/#findComment-865269 Share on other sites More sharing options...
tbrama Posted June 29, 2009 Author Share Posted June 29, 2009 Sorta but I need to include variables for amount and item name Quote Link to comment https://forums.phpfreaks.com/topic/164018-converting-a-website-to-paypal/#findComment-865340 Share on other sites More sharing options...
MadTechie Posted June 29, 2009 Share Posted June 29, 2009 See my last post, and notice <input type="hidden" name="item_name" value="Hempz ORIGINAL Herbal Moisturizer 18oz"> <input type="hidden" name="amount" value="10.60"> Quote Link to comment https://forums.phpfreaks.com/topic/164018-converting-a-website-to-paypal/#findComment-865495 Share on other sites More sharing options...
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.