mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Bring in Spree::Admin::PaypalPaymentsController
This commit is contained in:
20
app/controllers/spree/admin/paypal_payments_controller.rb
Normal file
20
app/controllers/spree/admin/paypal_payments_controller.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Spree
|
||||
module Admin
|
||||
class PaypalPaymentsController < Spree::Admin::BaseController
|
||||
before_action :load_order
|
||||
|
||||
def index
|
||||
@payments = @order.payments.includes(:payment_method).
|
||||
where(spree_payment_methods: { type: "Spree::Gateway::PayPalExpress" })
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def load_order
|
||||
@order = Spree::Order.where(number: params[:order_id]).first
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user