title: Using Express Checkout Paypal on Ruby On Rails , Return Blank Page
body: <p>i am encountered some problem in my apps .
  i am following tutorial from <a href="https://launchschool.com/blog/basic-paypal-checkout-processing-in-rails" rel="nofollow noreferrer">https://launchschool.com/blog/basic-paypal-checkout-processing-in-rails</a> to Process Payments With Paypal but when my apps redirect to the sandbox paypal it just show a blank page.</p>
  
  <p>Here is my code </p>
  
  <h1>Orders Controller</h1>
  
  <pre><code>def create
      @order = Order.new(order_params)
      @order.add_line_items_from_cart(@cart)
      respond_to do |format|
      if @order.save
        redirect_to @order.paypal_url(orders_path(@order))
      else
        render :new 
      end
    end
  </code></pre>
  
  <h1>Order Model</h1>
  
  <pre><code>protect_from_forgery except: [:hook]
    def hook
      params.permit! # Permit all Paypal input params
      status = params[:payment_status]
      if status == "Completed"
        @order = Order.find params[:invoice]
        @order.update_attributes notification_params: params, status: status, transaction_id: params[:txn_id], purchased_at: Time.now
      end
      render nothing: true
    end
  </code></pre>
  
  <h1>secret.yml</h1>
  
  <pre><code>development:
    secret_key_base: 0351c7e4eb70df5503d739c085d7a75dae662a55e95cf257b4a2e3edaa6985623372b7d20fc3ea59fe58d9ec94243e36a7250007ad2d9734b68cf29f90cca682
    paypal_host: https://www.sandbox.paypal.com
    app_host: http://0.0.0.0:3000
  </code></pre>
  
  <h1>Routes.rb</h1>
  
  <pre><code>post "/hook" =&gt; "orders#hook"
  post "/orders/:id" =&gt; "orders#show"
  </code></pre>
  
  <p>Sorry for the my bad english ..</p>