def step_four
      redirect_to '/checkout/step-one'   and return if !logged_in?
      redirect_to '/checkout/step-two'   and return if @order.shipping_address.nil? || @order.billing_address.nil?
      redirect_to '/checkout/step-three' and return if @order.shipping_method_code.nil?
      
      # Make sure all the variants still exist      
      @order.line_items.each do |li|
        v = Variant.where(:id => li.variant_id).first
        if v.nil? || v.status == 'Deleted'
          render :file => 'caboose_store/checkout/deleted_variant'
          return
        end
      end
      
      case CabooseStore::payment_processor
        when 'authorize.net'
          @sim_transaction = AuthorizeNet::SIM::Transaction.new(
            CabooseStore::authorize_net_login_id,
            CabooseStore::authorize_net_transaction_key,
            @order.total,
            :relay_url => "#{CabooseStore::root_url}/checkout/relay/#{@order.id}",
            :transaction_type => 'AUTH_ONLY',
            :test => true
          )
        when 'payscape'
          @form_url = CabooseStore::PaymentProcessor.form_url(@order)
      end
    end
def step_four
      redirect_to '/checkout/step-one'   and return if !logged_in?
      redirect_to '/checkout/step-two'   and return if @order.shipping_address.nil? || @order.billing_address.nil?
      redirect_to '/checkout/step-three' and return if @order.shipping_method_code.nil?
      
      # Make sure all the variants still exist      
      @order.line_items.each do |li|
        v = Variant.where(:id => li.variant_id).first
        if v.nil? || v.status == 'Deleted'
          render :file => 'caboose_store/checkout/deleted_variant'
          return
        end
      end
      
      case CabooseStore::payment_processor
        when 'authorize.net'
          @sim_transaction = AuthorizeNet::SIM::Transaction.new(
            CabooseStore::authorize_net_login_id,
            CabooseStore::authorize_net_transaction_key,
            @order.total,
            :relay_url => "#{CabooseStore::root_url}/checkout/relay/#{@order.id}",
            :transaction_type => 'AUTH_ONLY',
            :test => true
          )
        when 'payscape'
          @form_url = CabooseStore::PaymentProcessor.form_url(@order)
      end
    end
GET /checkout/step-four