- <%= button_to t('place_order'), paypal_finish_order_checkout_url(@order, {:token => params[:token] , :PayerID => params[:PayerID], :payment_method_id =>
- params[:payment_method_id] } ), :class => "button primary" %>
+
+
+
+ <%= render :partial => 'spree/shared/error_messages', :locals => { :target => @order } %>
+
+
+
<%= t(:checkout) %>
+
<%= checkout_progress %>
+
+
+
+
+ <%= render :partial => 'spree/shared/order_details', :locals => {:order => @order} -%>
+
+ <%= button_to t('place_order'), paypal_finish_order_checkout_url(@order, {:token => params[:token] , :PayerID => params[:PayerID], :payment_method_id =>
+ params[:payment_method_id] } ), :class => "button primary" %>
+
+
+
diff --git a/spec/controllers/checkout_controller_spec.rb b/spec/controllers/checkout_controller_spec.rb
index e559811..12bcc17 100644
--- a/spec/controllers/checkout_controller_spec.rb
+++ b/spec/controllers/checkout_controller_spec.rb
@@ -2,8 +2,10 @@ require File.dirname(__FILE__) + '/../spec_helper'
module Spree
describe CheckoutController do
+ render_views
let(:token) { "EC-2OPN7UJGFWK9OYFV" }
- let(:order) { Factory(:ppx_order_with_totals, :state => "payment") }
+ let(:order) { Factory(:ppx_order_with_totals, :state => "payment", :shipping_method => shipping_method) }
+ let(:shipping_method) { FactoryGirl.create(:shipping_method, :zone => Spree::Zone.find_by_name('North America')) }
let(:order_total) { (order.total * 100).to_i }
let(:gateway_provider) { mock(ActiveMerchant::Billing::PaypalExpressGateway) }
let(:paypal_gateway) { mock(BillingIntegration::PaypalExpress, :id => 123, :preferred_review => false, :preferred_no_shipping => true, :provider => gateway_provider, :preferred_currency => "US", :preferred_allow_guest_checkout => true