Wednesday, 21 August 2013

PayPal IPN Listener Not Working without notify_url

PayPal IPN Listener Not Working without notify_url

My understanding with the PayPal API and IPN is that if it is enabled in
your settings (Profile -> My Selling Tools -> Instant Payment
Notifications) then the IPN will be interacted with during any transaction
that goes through your seller profile.
I've be able to successfully use the IPN by including the notify_url in my
POST data that I send to the PayPal API but I need it to function without
notify_url. I need this to happen mainly because I'm using 'Subscriptions'
and I need the IPN to work so when users cancel a subscription, it will
fire off an event from the IPN listener. I won't have the option of using
notify_url if they go to cancel a subscription.
Here's my HTML form that I'm using with notify_url (the working model).
Not sure if it's needed in this case but figured I'd include it anyhow
(I'm still working in the Sandbox FYI):
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr"
id="paypal_form" method="post" target="_top">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="item_name" value="Monthly Subscription">
<input type="hidden" name="business" value="test@mysite.net">
<input type="hidden" name="a3" value="7.00">
<input type="hidden" name="p3" value="1">
<input type="hidden" name="t3" value="M">
<input type="hidden" name="src" value="1">
<input type="hidden" name="custom" value="5">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="cancel_return" value="http://www.mysite.net">
<input type="hidden" name="return"
value="http://www.mysite.net/thankyou.php">
<input type="hidden" name="notify_url"
value="http://www.mysite.net/ipn_listener.php">
</form>
Am I understanding the functioning of the IPN correctly? Thanks!

No comments:

Post a Comment