github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

eagleas / webmoney

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 12
    • 4
  • Source
  • Commits
  • Network (4)
  • Issues (0)
  • Downloads (6)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (6)
    • 0.0.4.8
    • 0.0.4.7
    • 0.0.4.6
    • 0.0.4.5
    • 0.0.4.4
    • 0.0.4.3
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Interface library for WebMoney Transfer payment system. Gem. — Read more

  cancel

http://www.wmtransfer.com

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Fix warning message 
eagleas (author)
Wed Jan 20 03:10:46 -0800 2010
commit  9e9c97d66cfb423255b4bff8239148dc641d8de2
tree    7eff481005f7bc9c6593362fe6729963b5a63126
parent  98c8a9692fefa21474a56bca797401169a74f02b
webmoney /
name age
history
message
file .gitignore Mon Nov 30 11:02:19 -0800 2009 Using jeweler+rake-compiler [eagleas]
file ChangeLog Sat Oct 03 05:20:39 -0700 2009 Version 0.0.4.8 [eagleas]
file README Tue Jan 19 07:57:10 -0800 2010 Add warning on libxml2 < 2.7.0 [eagleas]
file RUNNING_TESTS Wed Aug 12 09:27:28 -0700 2009 New CA certificates in bundle [eagleas]
file VERSION Mon Nov 30 11:02:19 -0800 2009 Using jeweler+rake-compiler [eagleas]
directory ext/ Sat May 31 00:09:01 -0700 2008 first commit [eagleas]
directory lib/ Wed Jan 20 03:10:46 -0800 2010 Fix warning message [eagleas]
file rakefile Tue Jan 19 07:57:10 -0800 2010 Add warning on libxml2 < 2.7.0 [eagleas]
directory spec/ Mon Jan 18 03:30:05 -0800 2010 Add new fields to attestat [eagleas]
file webmoney.gemspec Mon Nov 30 11:02:19 -0800 2009 Using jeweler+rake-compiler [eagleas]
README
== About Webmoney library

This library should help to make requests to WebMoney Transfer http://www.wmtransfer.com
XML-interfaces: http://www.wmtransfer.com/eng/developers/interfaces/index.shtml

Gem have built-in native *wmsigner*.

Reqirements: Nokogiri >= 1.4.1 built with libxml2 >= 2.7 (IMPORTANT!)

Author::    Alexander Oryol (mailto:eagle.alex@gmail.com)
License::   MIT License

== Request types

Completed:
- send_message       - x6
- get_passport       - x11
- find_wm            - x8
- bussines_level

Incompleted (help need!):
- create_invoice     - x1
- create_transaction - x2
- operation_history  - x3
- outgoing_invoices  - x4
- finish_protect     - x5
- check_sign         - x7
- balance            - x9
- incoming_invoices  - x10
- reject_protection  - x13
- transaction_moneyback - x14
- i_trust               - x15
- trust_me              - x15
- trust_save            - x15
- create_purse          - x16
- create_contract       - x17
- transaction_get       - x18


Please, see relative documentation and parameters on wiki:

http://wiki.wmtransfer.com/wiki/list/XML-Interfaces

http://wiki.webmoney.ru/wiki/list/XML-%D0%B8%D0%BD%D1%82%D0%B5%D1%80%D1%84%D0%B5%D0%B9%D1%81%D1%8B (in russian)

or official sites:

http://www.wmtransfer.com/eng/developers/interfaces/xml/index.shtml

http://www.webmoney.ru/rus/developers/interfaces/xml/index.shtml (in russian)

== Examples

= Setup

class MyWM
  include Webmoney
end

@wm = MyWM.new(:wmid => '123456789012', :password => 'my_pass', :key => 'gQABAIR6...2cC8FZTyKyjBM=')

wmid = '111222333444'

= Passport (X11)

Get attestat data:
passport = Webmoney::Passport.new(wmid)
passport.attestat     # { # hash
                      #   :attestat => 110, # == FORMAL attestat, as example
                      #   :created_at => Wed Feb 25 21:54:01 +0300 2004 # Time object
                      #   :cid => "103453"
                      #   and etc.
                      # }
passport.wmids        # All wmids attached to the attestat
passport.userinfo[:country]          # => 'Russia' # Userinfo fields in string context
passport.userinfo[:country].checked  # => true     # with checked/locked attribute
passport.directory    # Base dictionary

= Bussines level

bl = @wm.request(:bussines_level, :wmid => wmid)       #  => 15

= Sending message

... for one message:
@wm.request(:send_message, :wmid => wmid, :subj => 'Subject', :text => 'Body of \<b>message\</b>')

... for many messages (with queue):
@wm.send_message(:wmid => wmid, :subj => 'Subject', :text => 'Body of \<b>message\</b>') do |msg, result|
  File.open("logfile", "w") do |file|
    case result
    when Hash
      file.puts "Message #{msg.inspect} sended in:#{result[:date]} with id:#{result[:id]}"
    else
      file.puts "Error sent message #{msg.inspect}: #{result.message}"
    end
  end
end

= Purses and WMIDs

@wm.wmid_exist?('123456789012')                   # => true

purse = Purse.new('Z123456789012')
purse.wmid                                        # => '123456789012'
purse.belong_to?('123456789012')                  # => true


Also, see spec/* for examples.
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server