Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am not 100% clear about this when using IPN for let's say 3 websites, and if someone with the knowledge could explain this to me according to my scenario, I will appreciate it.

I have setup my sanbox test business account to use the IPN listener : site1.com/listener.php (Working just fine).

I am wondering about how to setup more listeners for my other sites, using the same paypal account.

In my scenario, I am working with only subscription payments for all sites.

Question 1: The ipn_notification_url variable. Will this variable, if set, tell paypal when the payment is made, to always use this as the listener ipn url? Example; if the subscription fail or something like that when next montly payment is made?

So when paypal have the need to IPN my listener, it will use the listener from the variable and not the set url in account profile settings? Or will this variable ONLY be used for the actual payment when beeing processed?

Question 2: Is it possible to distinct the websites apart, if need to have a master listener, that handles the forwarding to the correct listener url? Example: custom = userId , receiver_id = Sitename

Question 2 is actually similar to the question 1. Will the POSTED variables from the initial payment, STICK to the payments that are going automaticly in the future for my subscriptions. So that when paypal need to send me IPN updates, it will always use the url from my variable set on initial payment??

Thanks for any enlightment on this.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
217 views
Welcome To Ask or Share your Answers For Others

1 Answer

There are three URLs you can provide via hidden input elements in the form, with these names:

  1. notify_url: this is the URL to which all notifications for this purchase will be sent.
  2. return: this is the URL to which the user will be returned on successfully completing checkout.
  3. cancel_return: this is the URL to which the user will be returned on cancelling checkout at paypal.

So if you use notify_url in the button, it can be different per site, per button, and even per button render, if you have a use for such a thing.

Note that notify_url overrides whatever you set in Payment Preferences.

Regarding (2), you can also provide an rm variable as follows:

0: User is returned via GET 1: User is returned via GET with no payment variables. 2. User is returned via PUT with all payment variables returned, i.e. as an echo of what the button sent to PayPal.

I'm not clear on the difference between 0 and 1.

See PayPal HTML Variables.

EDIT In another answer at SO which I cannot now find, a PayPal person states that you can pass arbitrary arguments in the notify_url itself, which will come back the same way you sent them.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...