micropayment 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -6,7 +6,7 @@ gem 'yajl-ruby'
6
6
  group :development do
7
7
  gem "shoulda", ">= 0"
8
8
  gem "rdoc", "~> 3.12"
9
- gem "bundler", "~> 1.1.0"
9
+ gem "bundler", ">= 1.0.0"
10
10
  gem "jeweler", "~> 1.8.3"
11
11
  gem "rcov", ">= 0"
12
12
  end
data/Gemfile.lock CHANGED
@@ -25,7 +25,7 @@ PLATFORMS
25
25
 
26
26
  DEPENDENCIES
27
27
  addressable
28
- bundler (~> 1.1.0)
28
+ bundler (>= 1.0.0)
29
29
  jeweler (~> 1.8.3)
30
30
  rcov
31
31
  rdoc (~> 3.12)
data/README.markdown CHANGED
@@ -1,28 +1,60 @@
1
- = micropayment
1
+ # micropayment
2
2
 
3
3
  Implemantation of the NVP API provided by micropayment.de.
4
- WIP
4
+ If you want to use it in your Rails project please use [micropayment-rails](https://github.com/GeneralScripting/micropayment-rails)
5
5
 
6
- == Installation
7
6
 
8
- ```
9
- gem install micropayment
10
- ```
7
+ WIP!
8
+
9
+ ## Installation
10
+
11
+ gem install micropayment
12
+
13
+ ## Usage
14
+
15
+ First you need to setup at least your API key:
11
16
 
12
- == Usage
17
+ Micropayment::Config.api_key = 'xxx'
18
+ # to enter sandbox mode:
19
+ Micropayment::Config.sandbox = 1
20
+
21
+ Let's try out a test payment using direct debit:
13
22
 
14
23
  ```
15
- require 'micropayment'
24
+ # create a customer
25
+ customer = Micropayment::Debit.customerCreate(
26
+ :firstName => 'Jeff',
27
+ :lastName => 'Winger'
28
+ )
29
+
30
+ # add a bank account to the customer
31
+ Micropayment::Debit.bankaccountSet(
32
+ :customerId => customer.customerId,
33
+ :bankCode => '10010010',
34
+ :accountNumber => 'something_valid',
35
+ :accountHolder => "#{customer.firstName} #{customer.lastName}"
36
+ )
16
37
 
17
- Micropayment::Config.api_key = 'api_access_key_from_micropayment_de'
38
+ # create a session
39
+ session = Micropayment::Debit.sessionCreate(
40
+ :customerId => customer.customerId,
41
+ :project => 'your-project-key',
42
+ :amount => 10.00,
43
+ :payText => 'Thank you for ...'
44
+ )
18
45
 
19
- Micropayment::Config.sandbox = 1
46
+ Micropayment::Debit.sessionApprove(
47
+ :sessionId => session["sessionId"]
48
+ )
49
+ ```
20
50
 
51
+ ```
21
52
  Micropayment::Debit.customerList
22
53
  #=> { "error"=>"0", "count"=>"2", "maxCount"=>"2", "customerIdList"=>["id1", "id2"] }
23
54
  ```
24
55
 
25
- == Contributing to micropayment
56
+
57
+ ## Contributing to micropayment
26
58
 
27
59
  * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
28
60
  * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
@@ -32,7 +64,7 @@ Micropayment::Debit.customerList
32
64
  * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
33
65
  * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
34
66
 
35
- == Copyright
67
+ ## Copyright
36
68
 
37
69
  Copyright (c) 2012 General Scripting UG (haftungsbeschränkt). See LICENSE.txt for further details.
38
70
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -54,8 +54,8 @@ module Micropayment
54
54
 
55
55
  # "erzeugt oder ändert Bankverbindung eines Kunden"
56
56
  def bankaccountSet(options={})
57
- assert_valid_keys(options, :customerId, :bankVode, :accountNumber, :accountHolder, :country)
58
- assert_keys_exists(options, :customerId, :bankVode, :accountNumber, :accountHolder)
57
+ assert_valid_keys(options, :customerId, :bankCode, :accountNumber, :accountHolder, :country)
58
+ assert_keys_exists(options, :customerId, :bankCode, :accountNumber, :accountHolder)
59
59
  execute(:bankaccountSet, options)
60
60
  end
61
61
 
data/micropayment.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "micropayment"
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jan Schwenzien"]
@@ -36,7 +36,7 @@ Gem::Specification.new do |s|
36
36
  s.homepage = "http://github.com/GeneralScripting/micropayment"
37
37
  s.licenses = ["MIT"]
38
38
  s.require_paths = ["lib"]
39
- s.rubygems_version = "1.8.23"
39
+ s.rubygems_version = "1.8.22"
40
40
  s.summary = "NVP API implementation for micropayment.de"
41
41
 
42
42
  if s.respond_to? :specification_version then
@@ -47,7 +47,7 @@ Gem::Specification.new do |s|
47
47
  s.add_runtime_dependency(%q<yajl-ruby>, [">= 0"])
48
48
  s.add_development_dependency(%q<shoulda>, [">= 0"])
49
49
  s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
50
- s.add_development_dependency(%q<bundler>, ["~> 1.1.0"])
50
+ s.add_development_dependency(%q<bundler>, [">= 1.0.0"])
51
51
  s.add_development_dependency(%q<jeweler>, ["~> 1.8.3"])
52
52
  s.add_development_dependency(%q<rcov>, [">= 0"])
53
53
  else
@@ -55,7 +55,7 @@ Gem::Specification.new do |s|
55
55
  s.add_dependency(%q<yajl-ruby>, [">= 0"])
56
56
  s.add_dependency(%q<shoulda>, [">= 0"])
57
57
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
58
- s.add_dependency(%q<bundler>, ["~> 1.1.0"])
58
+ s.add_dependency(%q<bundler>, [">= 1.0.0"])
59
59
  s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
60
60
  s.add_dependency(%q<rcov>, [">= 0"])
61
61
  end
@@ -64,7 +64,7 @@ Gem::Specification.new do |s|
64
64
  s.add_dependency(%q<yajl-ruby>, [">= 0"])
65
65
  s.add_dependency(%q<shoulda>, [">= 0"])
66
66
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
67
- s.add_dependency(%q<bundler>, ["~> 1.1.0"])
67
+ s.add_dependency(%q<bundler>, [">= 1.0.0"])
68
68
  s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
69
69
  s.add_dependency(%q<rcov>, [">= 0"])
70
70
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: micropayment
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jan Schwenzien
@@ -79,14 +79,14 @@ dependencies:
79
79
  requirement: &id005 !ruby/object:Gem::Requirement
80
80
  none: false
81
81
  requirements:
82
- - - ~>
82
+ - - ">="
83
83
  - !ruby/object:Gem::Version
84
- hash: 19
84
+ hash: 23
85
85
  segments:
86
86
  - 1
87
- - 1
88
87
  - 0
89
- version: 1.1.0
88
+ - 0
89
+ version: 1.0.0
90
90
  version_requirements: *id005
91
91
  name: bundler
92
92
  prerelease: false
@@ -174,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
174
174
  requirements: []
175
175
 
176
176
  rubyforge_project:
177
- rubygems_version: 1.8.23
177
+ rubygems_version: 1.8.22
178
178
  signing_key:
179
179
  specification_version: 3
180
180
  summary: NVP API implementation for micropayment.de