Ruby on rails NoMethodError(Koudoku Rails 6的未定义方法“更新订阅”
我正试图通过Koudoku购买一个带有我的用户模型的计划,我从concer/subscription.rb文件中收到一个错误,原因是缺少一个方法。在收费时更新订阅不存在,如何修复此错误?引发错误的代码如下: koudoku-2.0.0/app/concerns/koudoku/subscription.rb 使用条带更新包级别 服务器开发日志 在stripe ruby v5.0.0版本中,更新订阅方法已被弃用并删除: stripe ruby的当前版本是v5.26.0,Koudoku可能正在使用一个非常旧的版本,因为它已经3年多没有更新了Ruby on rails NoMethodError(Koudoku Rails 6的未定义方法“更新订阅”,ruby-on-rails,ruby,stripe-payments,Ruby On Rails,Ruby,Stripe Payments,我正试图通过Koudoku购买一个带有我的用户模型的计划,我从concer/subscription.rb文件中收到一个错误,原因是缺少一个方法。在收费时更新订阅不存在,如何修复此错误?引发错误的代码如下: koudoku-2.0.0/app/concerns/koudoku/subscription.rb 使用条带更新包级别 服务器开发日志 在stripe ruby v5.0.0版本中,更新订阅方法已被弃用并删除: stripe ruby的当前版本是v5.26.0,Koudoku可能正在使用一
Koudoku目前远远落后于Stripe SDK。您可以使用v5.0.0之前的Stripe ruby版本,但我不建议您使用它,因为您将错过许多现代功能,如PaymentIntents,这些功能现在用于计费。我建议您查看Stripe文档,了解如何构建所需内容:好的。我将介绍一些内容使用stripe的sdk发布我的订阅模型
line #37: customer.update_subscription(:plan => self.plan.stripe_id, :prorate => Koudoku.prorate)
Started POST "/koudoku/enterprise_users/67ce5018-497c-43ae-af3f-55454y40a1a37f9/subscriptions" for 127.0.0.1 at 2020-10-04 15:51:40 -0400
Processing by Koudoku::SubscriptionsController#create as HTML
Parameters: {"authenticity_token"=>"CXIMMgr1LDTC5B54YcageAUz/U+ErdHnTHvDwY83co1Ob8U6no2H4434LjeiIMMXvEqWs9OZJROMYI8f6zfNhy8w==", "subscription"=>{"plan_id"=>"1", "credit_card_token"=>"tok_1HYdFA2xuZZdQdXfxf444yitL", "last_four"=>"undefined", "card_type"=>"undefined"}, "owner_id"=>"67ce5018-497c-43ae-af3f-5576780a1a37f9"}
EnterpriseUser Load (0.3ms) SELECT "enterprise_users".* FROM "enterprise_users" WHERE "enterprise_users"."id" = $1 ORDER BY "enterprise_users"."id" ASC LIMIT $2 [["id", 1], ["LIMIT", 1]]
EnterpriseUser Load (0.3ms) SELECT "enterprise_users".* FROM "enterprise_users" WHERE "enterprise_users"."id" = $1 LIMIT $2 [["id", 67], ["LIMIT", 1]]
EnterpriseUser Load (0.4ms) SELECT "enterprise_users".* FROM "enterprise_users" WHERE "enterprise_users"."slug" = $1 LIMIT $2 [["slug", "67ce5018-497c-43ae-af3f-55770a1a37f9"], ["LIMIT", 1]]
Subscription Load (0.2ms) SELECT "subscriptions".* FROM "subscriptions" WHERE "subscriptions"."enterprise_user_id" = $1 LIMIT $2 [["enterprise_user_id", 1], ["LIMIT", 1]]
(0.1ms) BEGIN
Plan Load (0.2ms) SELECT "plans".* FROM "plans" WHERE "plans"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
(0.3ms) ROLLBACK
Completed 500 Internal Server Error in 754ms (ActiveRecord: 1.9ms | Allocations: 17127)
NoMethodError (undefined method `update_subscription' for #<Stripe::Customer:0x00007f956444e9a0>
Did you mean? update_attributes):