I am using Adaptive Payment in PayPal. I am following the https://github.com/paypal/adaptivepayments-sdk-ruby. All is working fine except I am not able to receive IPN notofications locally.
@api = PayPal::SDK::AdaptivePayments.new
@pay = @api.build_pay({
:actionType => "PAY",
:cancelUrl => "http://"+Rails.application.config.app_name+"/admin/dashboard",
:currencyCode => "USD",
:feesPayer => "SENDER",
:ipnNotificationUrl => "http://"+Rails.application.config.app_name+"/admin/receive_notification",
:receiverList => {
:receiver => [{
:amount => amount,
:email => @paypal_id }] },
:returnUrl => "http://"+Rails.application.config.app_name+"/admin/dashboard" })
So , how to receive notifications on localhost
Paypal will not be able to route to localhost to send the IPN. You would need to setup a publicly available domain name and the appropriate dns.
Localhost is always specific to your machine, you might be able to use dynamicdns but it would require network changes on your machine and network.