We are using IPN for receiving customer details for recurring payments. In testing, using sandbox account for recurring payment is working well and its IPN listener provides 'verified' status. so my requirement is fulfill in that case, But in live site, my IPN listener didn't provide 'verified' status for successful recurring payment. I attached part of my code(implementing IPN) for references def ipn_paypal
response = validate_IPN_notification(request.raw_post)
case response
when "VERIFIED"
if params[:payment_status] == "Completed" && params[:receiver_email] == "#{ENV['PAYPAL_MERCHANT_EMAIL']}"
contributor = build_contributor(params)
#trigger mail for successful payment
end
when "INVALID"
#need require actions
else
end
head :ok
end
def validate_IPN_notification(raw)
uri = URI.parse("#{ENV['PAYPAL_IPN_URL']}")
http = Net::HTTP.new(uri.host, uri.port)
http.open_timeout = 60
http.read_timeout = 60
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
http.use_ssl = true
response = http.post(uri.request_uri, raw,
'Content-Length' => "#{raw.size}",
'User-Agent' => "My custom user agent"
).body
end . I don't know why? I followed https://github.com/paypal/ipn-code-samples/blob/master/ruby/paypal_ipn_rails.rb these documentation to implement IPN my site
... View more