Payment Method
This commit is contained in:
@@ -1,4 +1,23 @@
|
||||
class PaymentMethodSetting < ApplicationRecord
|
||||
# validations
|
||||
validates_presence_of :payment_method , :gateway_communication_type #, :gateway_url, :auth_token, :merchant_account_id
|
||||
validates_presence_of :payment_method , :gateway_communication_type #, :gateway_url, :auth_token, :merchant_account_id
|
||||
|
||||
def self.cash_exist
|
||||
temp = PaymentMethodSetting.where(payment_method: "Cash", is_active: true)
|
||||
if temp.present?
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
end
|
||||
def self.credit_exist
|
||||
temp = PaymentMethodSetting.where(payment_method: "Credit", is_active: true)
|
||||
if temp.present?
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user