diff --git a/config/routes.rb b/config/routes.rb index 1909d56b5a..df8970aefc 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -68,6 +68,13 @@ Openfoodnetwork::Application.routes.draw do resources :callbacks, only: [:index] resources :webhooks, only: [:create] end + + namespace :payment_gateways do + get "/paypal", to: "paypal#express", as: :paypal_express + get "/paypal/confirm", to: "paypal#confirm", as: :confirm_paypal + get "/paypal/cancel", to: "paypal#cancel", as: :cancel_paypal + get "/paypal/notify", to: "paypal#notify", as: :notify_paypal + end constraints SplitCheckoutConstraint.new do get '/checkout', to: 'split_checkout#edit' diff --git a/config/routes/spree.rb b/config/routes/spree.rb index c405a761db..1e495f3122 100644 --- a/config/routes/spree.rb +++ b/config/routes/spree.rb @@ -167,10 +167,4 @@ Spree::Core::Engine.routes.draw do end resources :products - - # Used by spree_paypal_express - get '/paypal', :to => "paypal#express", :as => :paypal_express - get '/paypal/confirm', :to => "paypal#confirm", :as => :confirm_paypal - get '/paypal/cancel', :to => "paypal#cancel", :as => :cancel_paypal - get '/paypal/notify', :to => "paypal#notify", :as => :notify_paypal end