Remove paypal image button from checkout, fix redirect to paypal

This commit is contained in:
Rohan Mitchell
2014-06-27 11:52:36 +10:00
parent 4075854440
commit aa5767cd30
3 changed files with 2 additions and 3 deletions

View File

@@ -138,9 +138,8 @@ class CheckoutController < Spree::CheckoutController
render :edit and return
end
redirect_to(main_app.shop_paypal_payment_url(@order, :payment_method_id => payment_method.id))
render json: {path: main_app.paypal_payment_url(@order, :payment_method_id => payment_method.id)}, status: 200
true
end
# Overriding to customize the cancel url

View File

@@ -16,7 +16,7 @@ Openfoodnetwork::Application.routes.draw do
get '/checkout', :to => 'checkout#edit' , :as => :checkout
put '/checkout', :to => 'checkout#update' , :as => :update_checkout
get "/checkout/paypal_payment", to: 'checkout#paypal_payment', as: :paypal_payment
get '/checkout/paypal_payment/:order_id', to: 'checkout#paypal_payment', as: :paypal_payment
resources :enterprises do
collection do