Closed datnt closed 12 years ago
Hi fnando,
I found a solution for this.
We should put custom within action "request_payment". Here is my comment on railscast http://railscasts.com/episodes/289-paypal-recurring-billing?
def makerecurring(payment_notifications_url,current_user) process :request_payment, ipn_url: "#{notifications_url}?custom=user_id#{current_user.id}" process :create_recurring_profile, period: :daily, frequency: 1, start_at: Time.zone.now, ipn_url: notifications_url end
Note:
Hi fnando,
This is my code:
def process(action, options = {}) options = options.reverse_merge( token: @subscription.paypal_payment_token, payer_id: @subscription.paypal_customer_token, description: "Description for payment plan #{@subscription.plan.batch}", amount: @subscription.plan.price, currency: "USD" ) response = PayPal::Recurring.new(options).send(action) raise response.errors.inspect if response.errors.present?
end
I tried to put "custom" within the above options scope, i.e: options = options.reverse_merge( ... custom: "...Some thing..." )
But PayPal::Recurring display system errors.
Reference: 1> http://stackoverflow.com/questions/1364360/testing-paypal-subscription-ipn 2> https://www.paypal.com/cgi-bin/webscr?cmd=p/acc/ipn-subscriptions-outside 3> http://railscasts.com/episodes/289-paypal-recurring-billing
Thank you in advance, Dat