mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-08 22:56:06 +00:00
Make update_pending_payment private
It's not used anywhere in the code, there is no reason for it to be public
This commit is contained in:
@@ -38,13 +38,6 @@ module OrderManagement
|
||||
update_pending_payment
|
||||
end
|
||||
|
||||
def update_pending_payment
|
||||
return unless order.state.in? ["payment", "confirmation"]
|
||||
return unless order.pending_payments.any?
|
||||
|
||||
order.pending_payments.first.update_attribute :amount, order.total
|
||||
end
|
||||
|
||||
# Updates the following Order total values:
|
||||
#
|
||||
# - payment_total - total value of all finalized Payments (excludes non-finalized Payments)
|
||||
@@ -239,6 +232,13 @@ module OrderManagement
|
||||
def requires_authorization?
|
||||
payments.requires_authorization.any? && payments.completed.empty?
|
||||
end
|
||||
|
||||
def update_pending_payment
|
||||
return unless order.state.in? ["payment", "confirmation"]
|
||||
return unless order.pending_payments.any?
|
||||
|
||||
order.pending_payments.first.update_attribute :amount, order.total
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user