erra Posted July 3, 2008 Share Posted July 3, 2008 Hello there...I hope someone out there could help me... does anyone knows how to pass values to Paypal in PHP... Here is my codes.. The codes for passing values to paypal is in javascript...i wanted to be in PHP... <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Pay Now Text Options</title> <!-- Start of Script --> <script language="JavaScript"> <!-- function joinFields( ){ fmBuy.os0.value = "Contest title: " + fmBuy.con_title.value+ "<br/>" + "Contest Type: " + fmBuy.con_type.value + "<br/> " + " Contest Description: " + fmBuy.con_desc.value + " <br/>" + " Start date: " + fmBuy.sdate.value + " <br/> " + " End date: " + fmBuy.edate.value + " <br/> " + "Prize amount: " +fmBuy.prize_amt.value + " <br/> " + " Prize quantity: " + fmBuy.prize_qty.value; } // --> </script> <!-- End of Script --> <style type="text/css"> <!-- .style4 {font-size: 14px} --> </style> </head> <body> <!-- Start of Form --> <form target="paypal" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="get" name="fmBuy" id="fmBuy" onSubmit="joinFields()"> <p> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="return"value ="http://www.paypercontest.com/testing/pdt.php?status=T"><br> <input type="hidden" name="cancel_return" value = "http://www.paypercontest.com/testing/pdt.php?status=F"><br> <input type="hidden" name="business" value="[email protected] "> <input type="hidden" name="item_name" value="contest"> <input type="hidden" name="amount" value="50.00"> <input type="hidden" name="no_note" value="1"> <input type="hidden" name="on0" value="1"> <input type="hidden" name="os0" value="1"> <input type="hidden" name="os1" value="1"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="lc" value="SG"> <input type="hidden" name="bn" value="PP-BuyNowBF"> Link to comment https://forums.phpfreaks.com/topic/113036-solved-how-to-pass-values-to-paypal-using-php/ Share on other sites More sharing options...
MasterACE14 Posted July 3, 2008 Share Posted July 3, 2008 you can send your custom data through paypal using this field in your form. <input type="hidden" name="custom" value="your values here"> Regards ACE Link to comment https://forums.phpfreaks.com/topic/113036-solved-how-to-pass-values-to-paypal-using-php/#findComment-580656 Share on other sites More sharing options...
bluejay002 Posted July 3, 2008 Share Posted July 3, 2008 am not that familiar with e-commerce, yet. I just started learning but I think you might want to look at ZendCart for that or oscommerce. Link to comment https://forums.phpfreaks.com/topic/113036-solved-how-to-pass-values-to-paypal-using-php/#findComment-580657 Share on other sites More sharing options...
MasterACE14 Posted July 3, 2008 Share Posted July 3, 2008 he can use the custom field in the form and pass whatever values he wants, and if theres multiple values he can separate them by a comma and use explode when he gets them back after the paypal payment(IPN) has happened. Link to comment https://forums.phpfreaks.com/topic/113036-solved-how-to-pass-values-to-paypal-using-php/#findComment-580661 Share on other sites More sharing options...
thatsgreat2345 Posted July 3, 2008 Share Posted July 3, 2008 Check this out, a guy made managing paypal easy into a single class. Why re-invent the wheel when someone else already did. http://www.micahcarrick.com/04-19-2005/php-paypal-ipn-integration-class.html Link to comment https://forums.phpfreaks.com/topic/113036-solved-how-to-pass-values-to-paypal-using-php/#findComment-580678 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.