0.0
No commit activity in last 3 years
No release in over 3 years
MoneyOnline (aka DengiOnline) is a payment system, that have a single interface for many payment providers
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

active_support
~> 3.0
 Project Readme

MoneyOnline

This gem implements a simple Ruby interface for the MoneyOnline service (aka DengiOnline, Деньги Онлайн).

Install

If you're on Rails, add the following line to a Gemfile:

gem "money_online"

Using

MoneyOnline requires a config file, add the initializer to config/initializers folder:

# config/money_online.yml
project: 1
secret: "password"
# config/initializers/money_online.rb
MoneyOnline.config_path = Rails.root.join("config", "money_online.yml")

List of payment systems you can find here.

Example

# app/controllers/orders_controller.rb
class OrdersController < ApplicationController

  # POST /orders/1/purchase
  def purchase
    # params #=> amount: 7300, user_id: 107, system_id: 46, order_id: 8964
    request = MoneyOnline::Request.new(params)
    redirect_to request.url
  end

  # POST /orders/1/confirm
  def confirm
    # params #=> amount: 7300, userid: 107, paymentid: 8831914, orderid: 8964, key: "d27f27b54c5c9b944685a111483e68b5"
    response = MoneyOnline::Response.new(params)
    order.confirm! if response.valid?
    render :xml => response
  end

end

TODO

  • 10 000 000 $

Copyright (c) 2011 Dimko.