chargebee / chargebee-ruby

Ruby library for the Chargebee API.
https://apidocs.chargebee.com/docs/api?lang=ruby
MIT License
32 stars 60 forks source link

undefined method `update_payment_method' for ChargeBee::HostedPage:Class #3

Closed anonoz closed 9 years ago

anonoz commented 9 years ago

I have been trying to follow the API guide to generate a hosted page link for customers to update their card info. Apparently ChargeBee::HostedPage.update_payment_method is not defined.

I have also tried ChargeBee::HostedPage.update_card but it gave me this error:

ChargeBee::APIError: 
from /Users/.../gems/chargebee-1.5.0/lib/chargebee/rest.rb:85:in `handle_for_error'

Any idea?

anonoz commented 9 years ago

Alright so when I use the cURL version it tells me that I need configure Return URL for the payment method update page. Paiseh

saravana-cb commented 9 years ago

Hello Anonz,

To configure redirect URL for payment method pages login to ChargeBee app and navigate to Settings >Payment Method Pages. Fill a redirect URL.

Now cURL API call will work.

If you still get the error from client library even after configuring redirect URL please send us your ChargeBee gem version.

anonoz commented 9 years ago

Right I was using 1.5.0, apparently it has been fixed in 1.5.1.