Sha256: 6035052c1aabc57a73e215f821ca32cfd406cc6b69b2cec129534e6f89c66e45

Contents?: true

Size: 728 Bytes

Versions: 1

Compression:

Stored size: 728 Bytes

Contents

# -*- encoding : utf-8 -*-
require 'rubykassa/engine'
require 'rubykassa/client'
require 'rubykassa/payment_interface'
require 'rubykassa/xml_interface'
require 'rubykassa/notification'

module Rubykassa
  extend self

  def configure &block
    Rubykassa::Client.configure &block
  end

  %w(login first_password second_password mode http_method xml_http_method).map do |name|
    define_method name do
      Rubykassa::Client.configuration.send(name)
    end
  end

  def pay_url invoice_id, total, custom_params, extra_params = {}
    Rubykassa::PaymentInterface.new do
      self.total              = total
      self.invoice_id         = invoice_id
      self.params = custom_params
    end.pay_url(extra_params)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rubykassa-0.2.6 lib/rubykassa.rb