Jump to content

paypal integration


khatri

Recommended Posts

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="[email protected]">
<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

Khatri

 

Edit: Added code blocks

Link to comment
https://forums.phpfreaks.com/topic/138415-paypal-integration/
Share on other sites

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.