I''m using Paypal to make payments through my Rails app and I have IPN setup so that when rails receives notification from Paypal, a record is activated. This all works fine. However, Paypal sends the notification multiple times. I think this is because my controller is not notifying Paypal that it has received the IPN call. I''m using ActiveMerchant. I tested the script on http://www.eliteweaver.co.uk/testing/ipntest.php (which is an IPN testing environment) and it said that my script was not posting back to them. Here is my code: def notify # Create a notify object we must notify = Paypal::Notification.new(request.raw_post) if notify.acknowledge #record transaction details here... begin if notify.complete? #do some validation and then activate record else #Reason to be suspicious end rescue => e #There''s a bug raise ensure #make sure we logged everything we must end end render :nothing => true end Does anyone know how to send the callback to Paypal to inform them that I''ve received the IPN? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
i a m a new one ruby on rails i want learn more things place help me On Feb 23, 6:44 pm, Lee Munroe <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I''m using Paypal to make payments through my Rails app and I have IPN > setup so that when rails receives notification from Paypal, a record is > activated. This all works fine. > > However, Paypal sends the notification multiple times. I think this is > because my controller is not notifying Paypal that it has received the > IPN call. I''m using ActiveMerchant. > > I tested the script onhttp://www.eliteweaver.co.uk/testing/ipntest.php > (which is an IPN testing environment) and it said that my script was not > posting back to them. > > Here is my code: > > def notify > # Create a notify object we must > notify = Paypal::Notification.new(request.raw_post) > > if notify.acknowledge > #record transaction details here... > begin > if notify.complete? > #do some validation and then activate record > else > #Reason to be suspicious > end > > rescue => e > #There''s a bug > raise > ensure > #make sure we logged everything we must > end > end > render :nothing => true > end > > Does anyone know how to send the callback to Paypal to inform them that > I''ve received the IPN? > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 2/23/08, Lee Munroe <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > I''m using Paypal to make payments through my Rails app and I have IPN > setup so that when rails receives notification from Paypal, a record is > activated. This all works fine. > > However, Paypal sends the notification multiple times. I think this is > because my controller is not notifying Paypal that it has received the > IPN call. I''m using ActiveMerchant. > > I tested the script on http://www.eliteweaver.co.uk/testing/ipntest.php > (which is an IPN testing environment) and it said that my script was not > posting back to them. > > Here is my code: > > > def notify > # Create a notify object we must > notify = Paypal::Notification.new(request.raw_post) > > if notify.acknowledge > #record transaction details here... > begin > if notify.complete? > #do some validation and then activate record > else > #Reason to be suspicious > end > > rescue => e > #There''s a bug > raise > ensure > #make sure we logged everything we must > end > end > render :nothing => true > end > > Does anyone know how to send the callback to Paypal to inform them that > I''ve received the IPN?That''s what the notify.acknowledge should be doing. However, I suspect that you need to somehow modify active merchant to use the url for that testing site instead of paypal itself. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---