Files
openfoodnetwork/app/models/spree/payment_method/api_customer_credit.rb
Gaetan Craig-Riou ec106a8f83 Add new payment method ApiCustomerCredit
It was previously modelled by a "Check" payment method
2026-03-10 16:07:43 +11:00

31 lines
685 B
Ruby

# frozen_string_literal: true
# This payment method is not intended to be used with payment, it's used with customer account
# transaction to indicate the transaction was created via API.
module Spree
class PaymentMethod
class ApiCustomerCredit < Spree::PaymentMethod
# Name and description are translatable string, to allow instances to customise them
def name
"api_payment_method.name"
end
def description
"api_payment_method.description"
end
def payment_source_class
nil
end
def method_type
"check" # empty view
end
def source_required?
false
end
end
end
end