title: Error : No route matches [GET] "/cgi-bin/webscr"
body: <p>I am trying to use basic Paypal to fund a task in a Rails crowdfunding project. When I click the fund button for the specific task, I create a new funding form which saves the amount the user chooses to fund, ...etc. On the new funding action however, when the user clicks Fund, I want Paypal to process the funding. However,
  I am currently getting the error: <strong>"No route matches [GET] "/cgi-bin/webscr"</strong>  </p>
  
  <p>Here is <strong>my funding controller:</strong> </p>
  
  <pre><code>class FundingsController &lt; ApplicationController
  def new
  if params[:todo_item_id]
    @todo_item = TodoItem.find(params[:todo_item_id])
    @funding =  Funding.new
    #(todo_item: @todo_item, user_id: current_user.id)
    raise ActiveRecord::RecordNotFound if @todo_item.nil?
  end
  
  end
  
  def create
    @funding = Funding.new(funding_params)
  if @funding.save
    redirect_to @funding.paypal_url(funding_path(@funding))
  else
    render :new
  end
  end
  
  
  protect_from_forgery except: [:hook]
  def hook
  params.permit! # Permit all Paypal input params
  status = params[:payment_status]
  if status == "Completed"
    @funding = Funding.find params[:invoice]
    @funding.update_attributes notification_params: params, status: status, transaction_id: params[:txn_id], funded_at: Time.now
   end
   render nothing: true
   end
  
  
  private
  
  def funding_params
    params.require(:funding).permit(:todo_item_id, :user_id, :amount)
  end
  end
  </code></pre>
  
  <p>Here is my Funding model: </p>
  
  <pre><code> class Funding &lt; ActiveRecord::Base
   has_one :card
   belongs_to :todo_item
   has_one :user
  
   accepts_nested_attributes_for :card
  
  def payment_method
  if card.nil? then "paypal"; else "card"; end
  end
  serialize :notification_params, Hash
  def paypal_url(return_path)
  values = {
      business: "mybusinesssandbox@gmail.com",
      cmd: "_xclick",
      upload: 1,
      return: "#{Rails.application.secrets.app_host}#{return_path}",
      invoice: id,
      amount: self.amount,
      item_name: self.todo_item.content,
      item_number: self.todo_item.id,
      quantity: '1',
      notify_url: "#{Rails.application.secrets.app_host}/hook"
  }
  "#{Rails.application.secrets.paypal_host}/cgi-bin/webscr?" + values.to_query
   end
   end
  </code></pre>
  
  <p>I am not sure why this routing is not working for me . Also, here is my   <strong>app/views/fundings/new.html.erb:</strong>:</p>
  
  <pre><code>  &lt;h1&gt;&lt;strong&gt;Task:&lt;/strong&gt; &lt;%=@todo_item.content%&gt;&lt;br&gt;
    &lt;strong&gt;Project:&lt;/strong&gt; &lt;%= @todo_item.todo_list.title%&gt; &lt;/h1&gt;
    &lt;%= form_for @funding, method: :post do |f| %&gt;
    &lt;%= f.hidden_field :todo_item_id, value: @todo_item.id %&gt;
    &lt;%= f.hidden_field :user_id, value: current_user.id %&gt;
    &lt;%= f.label :amount, "Amount you wish to donate in $" %&gt;
    &lt;%= f.number_field :amount %&gt;
    &lt;%= submit_tag "Fund", class: 'btn btn_primary' %&gt;
    &lt;%= link_to "Cancel", todo_list_path(@todo_item.todo_list_id, @todo_i), class: 'btn' %&gt;&lt;br&gt;
    &lt;%end%&gt;
  </code></pre>
  
  <p>Where did I get it wrong ?            </p>