khatri
12-25-2008, 07:42 AM
Hi
I am trying to integrate paypal in my php website:
I created an id at paypal and made code like this:
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" id="pp_form" target="_blank">
<input type="hidden" name="cmd" value="_cart" >
<input type="hidden" name="business" value="abc@yahoo.com">
<input type="hidden" name="upload" value="1" >
<input type="hidden" name="item_name_1" value="Testitem1">
<?php
echo "<input type=\"hidden\" name=\"amount_1\" id=\"amountText\">"
?>
<input type="hidden" name="return" value = "../views/notify.php?status=T"><br>
<input type="hidden" name="cancel_return" value = "../views/notify.php?status=F"><br>
<input type="image" src="../img/x-click.gif" border="0" name="submit" alt="PayPal - the safer, easier way to pay" width="5" height="50" class="button"/>
</form>
It is going to paypal page and I am sending the amount but how will i send 'n' different articles to paypal where it will show 'n' different articles with the cost individually .... and then final cost ....
Another thing that I wanted to ask that I am really not sure of making database entries:
suppose from my page a user selects the classes he wants to attend , i am using javascript function that displays the cost of classes on page ... then the user hits add to cart button that goes to paypal page... but at the same time when user will complete his transaction at paypal I want to make these entries in database with userid ...Like there is a table which will have entries of userid and classid ... how can I do that ..
Thanks
Varun
I am trying to integrate paypal in my php website:
I created an id at paypal and made code like this:
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" id="pp_form" target="_blank">
<input type="hidden" name="cmd" value="_cart" >
<input type="hidden" name="business" value="abc@yahoo.com">
<input type="hidden" name="upload" value="1" >
<input type="hidden" name="item_name_1" value="Testitem1">
<?php
echo "<input type=\"hidden\" name=\"amount_1\" id=\"amountText\">"
?>
<input type="hidden" name="return" value = "../views/notify.php?status=T"><br>
<input type="hidden" name="cancel_return" value = "../views/notify.php?status=F"><br>
<input type="image" src="../img/x-click.gif" border="0" name="submit" alt="PayPal - the safer, easier way to pay" width="5" height="50" class="button"/>
</form>
It is going to paypal page and I am sending the amount but how will i send 'n' different articles to paypal where it will show 'n' different articles with the cost individually .... and then final cost ....
Another thing that I wanted to ask that I am really not sure of making database entries:
suppose from my page a user selects the classes he wants to attend , i am using javascript function that displays the cost of classes on page ... then the user hits add to cart button that goes to paypal page... but at the same time when user will complete his transaction at paypal I want to make these entries in database with userid ...Like there is a table which will have entries of userid and classid ... how can I do that ..
Thanks
Varun