Module: BreadMachine::SecureTrading::PaymentMethods

Included in:
BreadMachine
Defined in:
lib/breadmachine/secure_trading/payment_methods.rb

Instance Method Summary collapse

Instance Method Details

#auth(*args) ⇒ Object



6
7
8
9
# File 'lib/breadmachine/secure_trading/payment_methods.rb', line 6

def auth(*args)
  request = SecureTrading::AuthRequest.new(*args)
  return SecureTrading::XPay.exchange(request)
end

#moto_auth(*args) ⇒ Object



15
16
17
18
# File 'lib/breadmachine/secure_trading/payment_methods.rb', line 15

def moto_auth(*args)
  request = SecureTrading::MotoAuthRequest.new(*args)
  return SecureTrading::XPay.exchange(request)
end

#repeat_auth(*args) ⇒ Object



11
12
13
# File 'lib/breadmachine/secure_trading/payment_methods.rb', line 11

def repeat_auth(*args)
  auth(*args)
end

#repeat_moto_auth(*args) ⇒ Object



20
21
22
# File 'lib/breadmachine/secure_trading/payment_methods.rb', line 20

def repeat_moto_auth(*args)
  moto_auth(*args)
end

#reverse(*args) ⇒ Object



40
41
42
43
# File 'lib/breadmachine/secure_trading/payment_methods.rb', line 40

def reverse(*args)
  request = SecureTrading::AuthReversalRequest.new(*args)
  return SecureTrading::XPay.exchange(request)
end

#three_d_auth(*args) ⇒ Object



35
36
37
38
# File 'lib/breadmachine/secure_trading/payment_methods.rb', line 35

def three_d_auth(*args)
  request = SecureTrading::St3dAuthRequest.new(*args)
  return SecureTrading::XPay.exchange(request)
end

#three_d_secure_enrolled?(*args) ⇒ Boolean

Checks to see whether a card is enrolled in 3-D Secure. Returns a ST3DCardQueryResponse which can tell us whether the card is enrolled and what kind of authorisation to perform.

Arguments are: amount, creditcard, customer_info, order_info

Returns:

  • (Boolean)


30
31
32
33
# File 'lib/breadmachine/secure_trading/payment_methods.rb', line 30

def three_d_secure_enrolled?(*args)
  request = SecureTrading::St3dCardQueryRequest.new(*args)
  return SecureTrading::XPay.exchange(request)
end