title: undefined method `amount' for nil:NilClass with Payola
body: <p>I've been following this tutorial for <a href="https://github.com/payolapayments/payola/wiki/Subscriptions" rel="nofollow noreferrer">Payola</a>. </p>
  
  <p>I've tested adding my own plans and they do appear on my dashboard and on my console. However, when I go to create a subscription, I get the following error:</p>
  
  <pre><code>undefined method `amount' for nil:NilClass
  </code></pre>
  
  <p>on the following line: </p>
  
  <pre><code>subscription = Payola::CreateSubscription.call(params, owner)
  </code></pre>
  
  <p>Here are my files for reference:</p>
  
  <p>subscriptions/new.html.erb</p>
  
  <pre><code>&lt;h1&gt;New Subscription&lt;/h1&gt;
  &lt;em&gt;&lt;%= @plan.name %&gt;&lt;em/&gt;&lt;br&gt;&lt;br&gt;
  
  &lt;!-- this header can go in &lt;head&gt; or at the bottom of &lt;body&gt; --&gt;
  &lt;%= render 'payola/transactions/stripe_header' %&gt;
  
  &lt;%= form_tag('/subscriptions', class: 'payola-onestep-subscription-form', 'data-payola-base-path' =&gt; '/payola', 'data-payola-plan-type' =&gt; @plan.plan_class, 'data-payola-plan-id' =&gt; @plan.id) do |f| %&gt;
    &lt;span class="payola-payment-error"&gt;&lt;/span&gt;
    &lt;input name="stripeEmail" data-payola="email" type="hidden" value="&lt;%= current_user.email %&gt;"/&gt;
    Card Number&lt;br&gt;
    &lt;input type="text" data-stripe="number"&gt;&lt;/input&gt;&lt;br&gt;&lt;br&gt;
    Exp Month&lt;br&gt;
    &lt;input type="text" data-stripe="exp_month"&gt;&lt;/input&gt;&lt;br&gt;&lt;br&gt;
    Exp Year&lt;br&gt;
    &lt;input type="text" data-stripe="exp_year"&gt;&lt;/input&gt;&lt;br&gt;&lt;br&gt;
    CVC&lt;br&gt;
    &lt;input type="text" data-stripe="cvc"&gt;&lt;/input&gt;&lt;br&gt;&lt;br&gt;
    &lt;input type="submit"&gt;&lt;/input&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>subscriptions_controller.erb</p>
  
  <pre><code>class SubscriptionsController &lt; ApplicationController
    # bring in the `render_payola_status` helper.
    include Payola::StatusBehavior
  
    before_action :load_plans
  
    def index
    end 
  
    def new
      @plan = EmojiPlan.find(params[:plan_id])
    end
  
    def create
      # do any required setup here, including finding or creating the owner object
      owner = current_user # this is just an example for Devise
  
      # set your plan in the params hash
      params[:plan] = EmojiPlan.find_by(id: params[:plan_id])
  
      # call Payola::CreateSubscription
      subscription = Payola::CreateSubscription.call(params, owner)
  
      # Render the status json that Payola's javascript expects
      render_payola_status(subscription)
    end
  
    protected
  
    def load_plans
      @plans = EmojiPlan.order('amount')
    end
  end
  </code></pre>
  
  <p>routes.rb</p>
  
  <pre><code>Rails.application.routes.draw do
  resources :emoji_plans
  resources :subscriptions
  devise_for :admins
  devise_for :users
  mount Payola::Engine =&gt; '/payola', as: :payola
  # For details on the DSL available within this file, see 
  http://guides.rubyonrails.org/routing.html
  end
  </code></pre>
  
  <p>emoji_plan.rb </p>
  
  <pre><code>class EmojiPlan &lt; ApplicationRecord
  include Payola::Plan
  
  def redirect_path(subscription)
      # you can return any path here, possibly referencing the given subscription
      '/'
  end
  end
  </code></pre>
  
  <p>create_emoji_plans.rb</p>
  
  <pre><code>class CreateEmojiPlans &lt; ActiveRecord::Migration[5.1]
    def change
      create_table :emoji_plans do |t|
        t.integer :amount
        t.string :interval
        t.string :stripe_id
        t.string :name
  
        t.timestamps
      end
    end
  end
  </code></pre>
  
  <p>Don't make fun of my plan names - I'm making a 'fun' project. ;) </p>