Class: PaymentMethod::Pagseguro

Inherits:
PaymentMethod
  • Object
show all
Defined in:
app/models/spree/payment_method/pagseguro.rb

Instance Method Summary collapse

Instance Method Details

#actionsObject



49
50
51
# File 'app/models/spree/payment_method/pagseguro.rb', line 49

def actions
  %w(capture void)
end

#auto_capture?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'app/models/spree/payment_method/pagseguro.rb', line 26

def auto_capture?
  false
end

#can_void?(payment) ⇒ Boolean

Indicates whether its possible to void the payment.

Returns:

  • (Boolean)


35
36
37
# File 'app/models/spree/payment_method/pagseguro.rb', line 35

def can_void?(payment)
  payment.state != 'void'
end

#cancel(response) ⇒ Object



43
# File 'app/models/spree/payment_method/pagseguro.rb', line 43

def cancel(response); end

#capture(*args) ⇒ Object



39
40
41
# File 'app/models/spree/payment_method/pagseguro.rb', line 39

def capture(*args)
  ActiveMerchant::Billing::Response.new(true, "", {}, {})
end

#method_typeObject



30
31
32
# File 'app/models/spree/payment_method/pagseguro.rb', line 30

def method_type
  'pag_seguro'
end

#payment_profiles_supported?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'app/models/spree/payment_method/pagseguro.rb', line 6

def payment_profiles_supported?
  false
end

#providerObject



18
19
20
# File 'app/models/spree/payment_method/pagseguro.rb', line 18

def provider
  provider_class.new
end

#provider_classObject



14
15
16
# File 'app/models/spree/payment_method/pagseguro.rb', line 14

def provider_class
  Billing::Pagseguro
end

#source_required?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'app/models/spree/payment_method/pagseguro.rb', line 22

def source_required?
  false
end

#supports?(source) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
# File 'app/models/spree/payment_method/pagseguro.rb', line 10

def supports?(source)
  true
end

#void(*args) ⇒ Object



45
46
47
# File 'app/models/spree/payment_method/pagseguro.rb', line 45

def void(*args)
  ActiveMerchant::Billing::Response.new(true, "", {}, {})
end