mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Clarify params
Spree::Order.to_param outputs the order *number* (not the id) when used to build URLs. This makes it a bit more explicit.
This commit is contained in:
@@ -33,7 +33,7 @@ module PaymentGateways
|
||||
require_order_authentication!
|
||||
|
||||
session[:access_token] ||= params[:order_token]
|
||||
@order = Spree::Order.find_by(number: params[:id]) || current_order
|
||||
@order = Spree::Order.find_by(number: params[:order_number]) || current_order
|
||||
|
||||
if @order
|
||||
authorize! :edit, @order, session[:access_token]
|
||||
|
||||
@@ -75,7 +75,7 @@ Openfoodnetwork::Application.routes.draw do
|
||||
get "/paypal/cancel", to: "paypal#cancel", as: :cancel_paypal
|
||||
|
||||
get "/stripe/confirm", to: "stripe#confirm", as: :confirm_stripe
|
||||
get "/stripe/authorize", to: "stripe#authorize", as: :authorize_stripe
|
||||
get "/stripe/authorize/:order_number", to: "stripe#authorize", as: :authorize_stripe
|
||||
end
|
||||
|
||||
constraints SplitCheckoutConstraint.new do
|
||||
|
||||
Reference in New Issue
Block a user