Sha256: d65ae781423ebb28ad1dff19bce21eb706423a29f16d2b8ded1c1ffa66ab960d
Contents?: true
Size: 686 Bytes
Versions: 3
Compression:
Stored size: 686 Bytes
Contents
module SolidusInter class PixPaymentSource < Spree::PaymentSource def actions %w[] end def can_capture?(payment) payment.pending? || payment.checkout? end def can_void?(payment) payment.can_void? end def can_credit?(payment) payment.completed? && payment.credit_allowed > 0 end def expired? expiration.past? end def active? expiration.future? end def retrieve_from_api payment_method.find_payment(txid) end def paid? inter_payment = retrieve_from_api inter_payment.paid? end def invalidate payment_method.invalidate_payment(self) end end end
Version data entries
3 entries across 3 versions & 1 rubygems