views:

53

answers:

1

I have searched for more than 4 hours now on how to do callback with PayPal after a payment have been proceeded.

The thing is, I have a site the sells tickets to a LAN Party, and the only way to pay is with PayPal.
Here is my PayPal buy button code:

<form target="paypal" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="add" value="1">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="_MY_PAYPAL_EMAIL_">
<input type="hidden" name="item_number" value="<?php echo mktime(); ?>">
<input type="hidden" name="cn" value="<?php echo $_SESSION['userid']; ?>">
<input type="hidden" name="return" value="http://80.202.213.240/apps/tickets/buy/success/" />
<input type="hidden" name="cancel_return" value="http://80.202.213.240/apps/tickets/buy/cancelled/" />
<input type="hidden" name="notify_url" value="http://80.202.213.240/apps/tickets/buy/ipn/" />
<input type="hidden" name="lc" value="NO">
<input type="hidden" name="item_name" value="BitHack - Standard Ticket">
<input type="hidden" name="amount" value="100.00">
<input type="hidden" name="currency_code" value="NOK">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="button_subtype" value="Tickets">
<input type="hidden" name="add" value="1">
<input type="hidden" name="bn" value="PP-ShopCartBF:btn_cart_LG.gif:NonHostedGuest">
<input type="submit" value="Add to Cart" class="ticketShowButton submit" title="Payment via PayPal">

The info should then be inserted into a database, that part I have finished. Just need the callback system to work. Anyone know any good callback script examples?

BTW, is it possible do use custom inputs?

If there is some answers to this someplace on Stack Overflow, please let me know.

Thanks for any help.

A: 

A commercial but low cost solution is the LinkLokIPN script at:

http://www.vibralogix.com/linklokipn/

No connection other than as a satisfied customer of the PHP version. Sometimes it is MUCH easier to buy (and perhaps adapt) a working solution than to reinvent the wheel.

winwaed
Thanks, will take a look into that.
Endre Hovde