Sha256: 793fe831d477d9ed10ec5ebe8c942b7f46e472d1dcb4c3db8fc849eec40a1ee5

Contents?: true

Size: 277 Bytes

Versions: 12

Compression:

Stored size: 277 Bytes

Contents

Spree::Order.class_eval do
  has_many :payment_notifications
  
  def payable_via_pag_seguro?
    !!self.class.pag_seguro_payment_method
  end
  
  def self.pag_seguro_payment_method
    Spree::PaymentMethod.where(type: "Spree::PaymentMethod::PagSeguroMethod").first
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
spree_pag_seguro-1.0.7 app/models/spree/order_decorator.rb
spree_pag_seguro-1.0.6 app/models/spree/order_decorator.rb
spree_pag_seguro-1.0.5 app/models/spree/order_decorator.rb
spree_pag_seguro-1.0.4 app/models/spree/order_decorator.rb
spree_pag_seguro-1.0.3 app/models/spree/order_decorator.rb
spree_pag_seguro-1.0.2 app/models/spree/order_decorator.rb
spree_pag_seguro-1.0.1 app/models/spree/order_decorator.rb
spree_pag_seguro-1.0.0.rc6 app/models/spree/order_decorator.rb
spree_pag_seguro-1.0.0.rc5 app/models/spree/order_decorator.rb
spree_pag_seguro-1.0.0.rc4 app/models/spree/order_decorator.rb
spree_pag_seguro-1.0.0.rc3 app/models/spree/order_decorator.rb
spree_pag_seguro-1.0.0.rc2 app/models/spree/order_decorator.rb