Sha256: 715b4f331936ef271ac546337b0c07fd5cb77d86b35fc67dec9aa1ff3c093082
Contents?: true
Size: 552 Bytes
Versions: 5
Compression:
Stored size: 552 Bytes
Contents
module Moneytree class Payment < Transaction has_many :refunds, class_name: 'Refund' validates_absence_of :payment_id validates_numericality_of :amount, greater_than: 0 validates_numericality_of :app_fee_amount, greater_than_or_equal_to: 0 private def execute_transaction(metadata: {}) process_response( payment_gateway.charge( amount, details, app_fee_amount: app_fee_amount, metadata: metadata.merge(moneytree_transaction_id: id) ) ) end end end
Version data entries
5 entries across 5 versions & 1 rubygems