robokassaclient 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest +4 -0
- data/README +0 -0
- data/Rakefile +12 -0
- data/lib/robokassaclient.rb +32 -0
- data/robokassaclient.gemspec +29 -0
- metadata +66 -0
data/Manifest
ADDED
data/README
ADDED
File without changes
|
data/Rakefile
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
require 'echoe'
|
4
|
+
|
5
|
+
Echoe.new('robokassaclient', '0.0.2') do |p|
|
6
|
+
p.description = "Robokassa Service Consumer"
|
7
|
+
p.url = "http://github.com/kohgpat/robokassaclient"
|
8
|
+
p.author = "Nikolay Burlov"
|
9
|
+
p.email = "kohgpat@gmail.com"
|
10
|
+
p.ignore_pattern = ["tmp/*", "script/*"]
|
11
|
+
p.development_dependencies = []
|
12
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'digest/md5'
|
5
|
+
|
6
|
+
module RobokassaClient
|
7
|
+
|
8
|
+
VERSION = '0.0.2'
|
9
|
+
|
10
|
+
class Client
|
11
|
+
|
12
|
+
def initialize(login, password1, password2, url)
|
13
|
+
@login = login
|
14
|
+
@password1 = password1
|
15
|
+
@password2 = password2
|
16
|
+
|
17
|
+
@url = url
|
18
|
+
end
|
19
|
+
|
20
|
+
def get_signature(amount, id)
|
21
|
+
return Digest::MD5.hexdigest(@login + ":" + amount.to_s + ":" + id.to_s + ":" + @password1)
|
22
|
+
end
|
23
|
+
|
24
|
+
def get_result_signature(outsum, id)
|
25
|
+
return Digest::MD5.hexdigest(outsum.to_s + ":" + id.to_s + ":" + @password2)
|
26
|
+
end
|
27
|
+
|
28
|
+
def get_url(amount, id)
|
29
|
+
return @url + "MrchLogin=" + @login + "&OutSum=" + amount.to_s + "&InvId=" + id.to_s + "&Desc=" + "Deposit" + "&SignatureValue=" + get_signature(amount, id)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = %q{robokassaclient}
|
5
|
+
s.version = "0.0.2"
|
6
|
+
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.authors = ["Nikolay Burlov"]
|
9
|
+
s.date = %q{2011-02-17}
|
10
|
+
s.description = %q{Robokassa Service Consumer}
|
11
|
+
s.email = %q{kohgpat@gmail.com}
|
12
|
+
s.extra_rdoc_files = ["README", "lib/robokassaclient.rb"]
|
13
|
+
s.files = ["Manifest", "README", "Rakefile", "lib/robokassaclient.rb", "robokassaclient.gemspec"]
|
14
|
+
s.homepage = %q{http://github.com/kohgpat/robokassaclient}
|
15
|
+
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Robokassaclient", "--main", "README"]
|
16
|
+
s.require_paths = ["lib"]
|
17
|
+
s.rubyforge_project = %q{robokassaclient}
|
18
|
+
s.rubygems_version = %q{1.5.0}
|
19
|
+
s.summary = %q{Robokassa Service Consumer}
|
20
|
+
|
21
|
+
if s.respond_to? :specification_version then
|
22
|
+
s.specification_version = 3
|
23
|
+
|
24
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
25
|
+
else
|
26
|
+
end
|
27
|
+
else
|
28
|
+
end
|
29
|
+
end
|
metadata
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: robokassaclient
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 0.0.2
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Nikolay Burlov
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2011-02-17 00:00:00 -05:00
|
14
|
+
default_executable:
|
15
|
+
dependencies: []
|
16
|
+
|
17
|
+
description: Robokassa Service Consumer
|
18
|
+
email: kohgpat@gmail.com
|
19
|
+
executables: []
|
20
|
+
|
21
|
+
extensions: []
|
22
|
+
|
23
|
+
extra_rdoc_files:
|
24
|
+
- README
|
25
|
+
- lib/robokassaclient.rb
|
26
|
+
files:
|
27
|
+
- Manifest
|
28
|
+
- README
|
29
|
+
- Rakefile
|
30
|
+
- lib/robokassaclient.rb
|
31
|
+
- robokassaclient.gemspec
|
32
|
+
has_rdoc: true
|
33
|
+
homepage: http://github.com/kohgpat/robokassaclient
|
34
|
+
licenses: []
|
35
|
+
|
36
|
+
post_install_message:
|
37
|
+
rdoc_options:
|
38
|
+
- --line-numbers
|
39
|
+
- --inline-source
|
40
|
+
- --title
|
41
|
+
- Robokassaclient
|
42
|
+
- --main
|
43
|
+
- README
|
44
|
+
require_paths:
|
45
|
+
- lib
|
46
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
47
|
+
none: false
|
48
|
+
requirements:
|
49
|
+
- - ">="
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: "0"
|
52
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
53
|
+
none: false
|
54
|
+
requirements:
|
55
|
+
- - ">="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: "1.2"
|
58
|
+
requirements: []
|
59
|
+
|
60
|
+
rubyforge_project: robokassaclient
|
61
|
+
rubygems_version: 1.5.0
|
62
|
+
signing_key:
|
63
|
+
specification_version: 3
|
64
|
+
summary: Robokassa Service Consumer
|
65
|
+
test_files: []
|
66
|
+
|