Class: SimplePayment::Test::Gateway

Inherits:
Object
  • Object
show all
Defined in:
lib/simple_payment/test/gateway.rb

Instance Method Summary collapse

Instance Method Details

#calculate_fee(payment) ⇒ Object



29
30
31
# File 'lib/simple_payment/test/gateway.rb', line 29

def calculate_fee(payment)
  1.23
end

#cancel(payment) ⇒ Object



15
16
17
18
19
20
# File 'lib/simple_payment/test/gateway.rb', line 15

def cancel(payment)
  [
    Request.new,
    Response.new
  ]
end

#completed?(payment) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/simple_payment/test/gateway.rb', line 11

def completed?(payment)
  true
end

#execute(payment, nonce) ⇒ Object



4
5
6
7
8
9
# File 'lib/simple_payment/test/gateway.rb', line 4

def execute(payment, nonce)
  [
    Request.new,
    Response.new
  ]
end

#refund(payment) ⇒ Object



22
23
24
25
26
27
# File 'lib/simple_payment/test/gateway.rb', line 22

def refund(payment)
  [
    Request.new,
    Response.new
  ]
end