Class: PayLane::Payment
- Inherits:
-
Object
- Object
- PayLane::Payment
- Defined in:
- lib/paylane/payment.rb
Instance Method Summary collapse
- #charge_card(amount) ⇒ Object
- #direct_debit(amount) ⇒ Object
-
#initialize(options = {}) ⇒ Payment
constructor
A new instance of Payment.
Constructor Details
#initialize(options = {}) ⇒ Payment
Returns a new instance of Payment.
3 4 5 6 7 8 |
# File 'lib/paylane/payment.rb', line 3 def initialize( = {}) gateway = Gateway.new(PayLane.login, PayLane.password) @api = API.new(gateway.connect) = @product = Product.new [:product] end |
Instance Method Details
#charge_card(amount) ⇒ Object
10 11 12 |
# File 'lib/paylane/payment.rb', line 10 def charge_card(amount) do_payment(amount, {'card_data' => card_data}) end |
#direct_debit(amount) ⇒ Object
14 15 16 |
# File 'lib/paylane/payment.rb', line 14 def direct_debit(amount) do_payment(amount, {'account_data' => account_data}) end |