Sha256: eb7272255cc469a8a03d6647d6a5f23d34a4859f4583b3154e11f58dbb97fef4

Contents?: true

Size: 728 Bytes

Versions: 40

Compression:

Stored size: 728 Bytes

Contents

module CatarsePagarme
  class PaymentEngine
    def name
      'Pagarme'
    end

    def review_path contribution
    end

    def locale
      'pt'
    end

    def can_do_refund?
      true
    end

    def direct_refund contribution
      contribution.pagarme_delegator.refund
    end

    def transfer contribution
      contribution.pagarme_delegator.transfer_funds
    end

    def can_generate_second_slip?
      true
    end

    def second_slip_path(payment)
      # The second slip generates a new payment base on the contribution ID
      url_helpers.second_slip_pagarme_path(id: payment.contribution.id)
    end

    protected

    def url_helpers
      CatarsePagarme::Engine.routes.url_helpers
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
catarse_pagarme-2.14.1 lib/catarse_pagarme/payment_engine.rb
catarse_pagarme-2.14.0 lib/catarse_pagarme/payment_engine.rb
catarse_pagarme-2.13.0 lib/catarse_pagarme/payment_engine.rb
catarse_pagarme-2.12.0 lib/catarse_pagarme/payment_engine.rb
catarse_pagarme-2.11.0 lib/catarse_pagarme/payment_engine.rb
catarse_pagarme-2.10.15 lib/catarse_pagarme/payment_engine.rb
catarse_pagarme-2.10.14 lib/catarse_pagarme/payment_engine.rb
catarse_pagarme-2.10.13 lib/catarse_pagarme/payment_engine.rb
catarse_pagarme-2.10.12 lib/catarse_pagarme/payment_engine.rb
catarse_pagarme-2.10.11 lib/catarse_pagarme/payment_engine.rb
catarse_pagarme-2.10.10 lib/catarse_pagarme/payment_engine.rb
catarse_pagarme-2.10.9 lib/catarse_pagarme/payment_engine.rb
catarse_pagarme-2.10.8 lib/catarse_pagarme/payment_engine.rb
catarse_pagarme-2.10.7 lib/catarse_pagarme/payment_engine.rb
catarse_pagarme-2.10.6 lib/catarse_pagarme/payment_engine.rb
catarse_pagarme-2.10.5 lib/catarse_pagarme/payment_engine.rb
catarse_pagarme-2.10.4 lib/catarse_pagarme/payment_engine.rb
catarse_pagarme-2.10.2 lib/catarse_pagarme/payment_engine.rb
catarse_pagarme-2.10.1 lib/catarse_pagarme/payment_engine.rb
catarse_pagarme-2.10.0 lib/catarse_pagarme/payment_engine.rb