# PayPal IPN without activemerchant, please

**URL:** <https://www.ruby-forum.com/t/paypal-ipn-without-activemerchant-please/146634>\
**Category:** Rails\
**Created:** [August 23, 2008, 9:54am UTC](https://www.ruby-forum.com/t/paypal-ipn-without-activemerchant-please/146634 "2008-08-23T09:54:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulbutcher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Post date:** [August 23, 2008, 9:54am UTC](https://www.ruby-forum.com/t/paypal-ipn-without-activemerchant-please/146634/1 "2008-08-23T09:54:07Z")

</div>

Please could someone explain the communication with PayPal for IPN  
without activemerchant plugin. I couldn’t get that to work. It should be  
a matter of a few lines of code so why use a plugin.

This is what I have:

@query = ‘cmd=\_notify-validate’  
request.params.each\_pair {|key, value| @query = @query + ‘&’ + key + ‘=’

- value.first if key != ‘register/pay\_pal\_ipn.html/pay\_pal\_ipn’ }  
http = Net::HTTP.new(‘[www.sandbox.paypal.com](http://www.sandbox.paypal.com)’, 443)  
http.use\_ssl = true  
http.verify\_mode = OpenSSL::SSL::VERIFY\_PEER  
http.ca\_file = “#{RAILS\_ROOT}/lib/paypal/paypal\_cert.pem”

What about this setup? Is it ok? Please, could someone help?

The log says it can’t verify the certficate and if I take that away I  
get “Errno::ECONNRESET (Connection reset by peer)”

Btw, I don’t have SSL on our server, yet.

---

<div class="post-metadata">

**Author:** ![paulbutcher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Post date:** [August 23, 2008, 10:59am UTC](https://www.ruby-forum.com/t/paypal-ipn-without-activemerchant-please/146634/2 "2008-08-23T10:59:00Z")

</div>

PÃ¥l BergstrÃ¶m wrote:

I get “certificate verify failed”. Do I really need a certificate on my  
end in order to post to the PayPal server?
