Open archonic opened 8 years ago
session[:koudoku_coupon_code]
is something I added in order to support koudoku_coupons.
Koudoku works without that extension.
As for the undefined method error, I am at a loss here right now. I think that belongs to the early implementation that someone else wrote. I found that implementation to be lacking and created koudoku_coupons as a result.
I've run into a few hiccups trying to install this. Coupon can't be blank for subscription, but
session[:koudoku_coupon_code]
isn't populated or mentioned as a part of setup. I'm under the impression that subscriptions should be allowed without coupons, but there should at least be read me instructions on populating the session coupon code or otherwise assigning.It would ease installation to mention putting Plan and Coupon creation into seeds.rb and running
rake db:seed
.From there, there's reference to nil methods on coupon here: https://github.com/andrewculver/koudoku/blob/master/app/concerns/koudoku/subscription.rb#L78
I'm guessing there was an incomplete commit meant to build out coupons. When commenting out references to things that don't exist, the plan doesn't exist in Stripe. When are the plans meant to be created on the Stripe side? There's no instance of
Stripe::Plan.create
anywhere, and it's not mentioned in the readme.