From 0b48fa540a67dfd0d3ac0ce169c83e9cb32e7b35 Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Sat, 4 Dec 2021 11:52:35 +0000 Subject: [PATCH] Move paypal routes out of spree namespace --- config/routes.rb | 7 +++++++ config/routes/spree.rb | 6 ------ 2 files changed, 7 insertions(+), 6 deletions(-) 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