大佬教程收集整理的这篇文章主要介绍了ruby-on-rails – 无法使用Stripe保存或取消订阅,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我能够检索并更新和保存客户对象:
customer = Stripe::Customer.retrieve(some_customer_id) #this works customer.save #this works
我也能够检索订阅:
subscription = customer.subscriptions.retrieve(“some_subscription_id”)#this works
但是,在尝试保存订阅时:
subscription.save #this不起作用
我一直这样:
NoMethodError: undefined method `save' for #<Stripe::StripeObject:0x007ff37147c720> from /Users/me/.rvm/gems/ruby-2.0.0-p353/gems/Stripe- 1.9.9/lib/Stripe/Stripe_object.rb:158:in `method_missing'
同样在尝试取消订阅时:
customer.subscriptions.retrieve("sub_3QM09lOz64QuSf").delete()
我明白了:
NoMethodError: undefined method `delete' for #<Stripe::StripeObject:0x007ff36d3f0d50> from /Users/me/.rvm/gems/ruby-2.0.0-p353/gems/Stripe- 1.9.9/lib/Stripe/Stripe_object.rb:158:in `method_missing'
没有这个,我无法让客户直接从网站取消.
我错过了什么?
以上是大佬教程为你收集整理的ruby-on-rails – 无法使用Stripe保存或取消订阅全部内容,希望文章能够帮你解决ruby-on-rails – 无法使用Stripe保存或取消订阅所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。