fnando / paypal-recurring

PayPal Express Checkout API Client for recurring billing.
256 stars 124 forks source link

undefined method `notify_url=' for #<PayPal::Recurring::Base:0x131651bc> #7

Closed datnt closed 12 years ago

datnt commented 12 years ago

Hi fnando,

Thank you for your great gem.

I want Paypal to notify to our app whenever monthly payment occur. But when I try to add option "notify_url" I got the above issue.

Could you please give me a hint on this ?

Reference: http://forums.devnetwork.net/viewtopic.php?f=1&t=42239 http://railscasts.com/episodes/142-paypal-notifications

fnando commented 12 years ago

There is no notify_url method. You need to use the ipn_url option.

ppr = PayPal::Recurring.new({
    :amount      => "9.00",
    :currency    => "USD",
    :description => "Awesome - Monthly Subscription",
    :ipn_url     => "http://example.com/paypal/ipn",
    :frequency   => 1,
    :token       => "EC-05C46042TU8306821",
    :period      => :monthly,
    :reference   => "1234",
    :payer_id    => "WTTS5KC2T46YU",
    :start_at    => Time.now,
    :failed      => 1,
    :outstanding => :next_billing
  })

Nando Vieira http://nandovieira.com.br

On Apr 22, 2012, at 11:43 PM, datnt wrote:

Hi fnando,

Thank you for your great gem.

I want Paypal to notify to our app whenever monthly payment occur. But when I try to add option "notify_url" I got the above issue.

Could you please give me a hint on this ?

Reference: http://forums.devnetwork.net/viewtopic.php?f=1&t=42239 http://railscasts.com/episodes/142-paypal-notifications


Reply to this email directly or view it on GitHub: https://github.com/fnando/paypal-recurring/issues/7

datnt commented 12 years ago

Hi

Thank you very much for your feedback.

I want to ensure that PayPal actually callback to my ipn_url. Is there any way I can test the ipn_url when I'm developing on localhost.

My ipn_url is: http://localhost:3000/payment_notifications

Thank you in advance, Dat

fnando commented 12 years ago

Try using something like the locatunnel gem.

Nando Vieira http://nandovieira.com.br

On Apr 23, 2012, at 12:50 AM, datnt wrote:

Hi

Thank you very much for your feedback.

I want to ensure that PayPal actually callback to my ipn_url. Is there any way I can test the ipn_url when I'm developing on localhost.

My ipn_url is: http://localhost:3000/payment_notifications

Thank you in advance, Dat


Reply to this email directly or view it on GitHub: https://github.com/fnando/paypal-recurring/issues/7#issuecomment-5274014

datnt commented 12 years ago

Hi fnando,

I've set ipn_url as per your suggestion but it does not work.

  1. I had check my IPN_URL by using Paypal tool and it works fine.
  2. I had observed since the last comment I made a month ago to check for sure.

Thank you in advance, Dat

datnt commented 12 years ago

Found a solution.

Please refer to: https://github.com/fnando/paypal-recurring/issues/10