Skip to content

smartkiosk/payzilla

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Payzilla

This gem is a set of gateways, that allows you easily send payments to carriers.

Installation

Add this line to your application's Gemfile:

gem 'payzilla'

And then execute:

$ bundle

Or install it yourself as:

$ gem install payzilla

Usage

To use Payzilla, you should have config, payment and gateway instances. Config can be defined with YAML, or just by passing arguments to the contructor. Payment, which you need to send, can be defined only by passing arguments to the constructor. Sending payment should comprise two steps: check and pay, and the second one should be sent only after successfull check.

    # Create config instance
    config = Payzilla::Config.new("dummy", File.new("config.yaml"))

    # Load attachments
    config.attachment_cert  = File.new("certificates/dummy.cer")
    config.attachment_key   = File.new("certificates/dummy.key")

    # Define payment, that you need to send
    payment = Payzilla::Payment.new(
      :id => 1,
      :accound => 111111111,
      :enrolled_amound => 100
    )

    # Check'n'Pay
    transport = Payzilla::Gateways::Dummy.new(config, './log/dummy.log')
    if transport.check(payment)[:success]
      transport.pay(payment)
    end
# config.yaml
dummy:
    setting_url:      "https://dummy.com/gateway"
    setting_client:   "JDoe"
    setting_contract: "123456789"
    setting_password: "1234"

Gateways status

  • Akado working
  • Beeline testing
  • Cyberplat testing
  • Mailru testing
  • Matrix testing
  • Megafon working
  • MTS testing
  • Rapida MRI only
  • Skylink testing
  • Webmoney not working
  • Yamoney testing
  • Yota not working

Credits

Contributors

LICENSE

It is free software, and may be redistributed under the terms of MIT license.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages