mollie-payment 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,6 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
5
+ .rbenv-gemsets
6
+ .rbenv-version
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in mollie-ideal.gemspec
4
+ gemspec
@@ -0,0 +1,51 @@
1
+ Mollie Payment
2
+ ========
3
+
4
+ This repository is currently an act of [Readme Driven Development](http://tom.preston-werner.com/2010/08/23/readme-driven-development.html); an empty box with no implementation, only an interface.
5
+
6
+ Methods are documented using [Tomdoc](http://tomdoc.org/).
7
+
8
+ Requirements
9
+ ------------
10
+
11
+ Installation
12
+ ------------
13
+
14
+ $ gem install mollie-payment
15
+
16
+
17
+ Usage
18
+ ------------
19
+
20
+ Please check out the documentation.
21
+
22
+ Author
23
+ ------
24
+
25
+ Gert Goet (eval) :: gert@thinkcreate.nl :: @gertgoet
26
+
27
+ License
28
+ ------
29
+
30
+ (The MIT license)
31
+
32
+ Copyright (c) 2011 Gert Goet, ThinkCreate
33
+
34
+ Permission is hereby granted, free of charge, to any person obtaining
35
+ a copy of this software and associated documentation files (the
36
+ "Software"), to deal in the Software without restriction, including
37
+ without limitation the rights to use, copy, modify, merge, publish,
38
+ distribute, sublicense, and/or sell copies of the Software, and to
39
+ permit persons to whom the Software is furnished to do so, subject to
40
+ the following conditions:
41
+
42
+ The above copyright notice and this permission notice shall be
43
+ included in all copies or substantial portions of the Software.
44
+
45
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
46
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
47
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
48
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
49
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
50
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
51
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,64 @@
1
+ <ul>
2
+ </ul>
3
+ <ul><li><b>Mollie::Ideal.banklist</b><pre>Public: All supported banks.
4
+
5
+ Examples
6
+
7
+ Mollie::Ideal.banklist
8
+ # => [{:id => '0031', :name => 'ABN AMRO'}, ...]
9
+
10
+ Returns an Array of Hash representing banks (keys: String id,
11
+ String name).</pre></li>
12
+ <li><b>Mollie::Ideal#fetch(options)</b><pre>Public: Request a payment.
13
+
14
+ options - Hash options:
15
+ :amount - Fixnum the amount *in cents*
16
+ :bank_id - String id of the bank
17
+ :description - String description of the transaction (max. 30
18
+ characters)
19
+ :report_url - String url where the result of the transaction
20
+ is sent
21
+ :return_url - String url where the visitor is sent
22
+ :profile_key - String profile this transaction should be linked
23
+ to (default: nil)
24
+
25
+ Examples
26
+
27
+ mi = Mollie::Ideal.new(12345)
28
+ mi.fetch(:amount => 1465, :bank_id => '0721',
29
+ :description => "Charlie Brown's Tree",
30
+ :report_url => 'http://example.org/report',
31
+ :return_url => 'http://example.org/return')
32
+ # => {
33
+ :transaction_id => '482d599bbcc7795727650330ad65fe9b',
34
+ :amount => 1465,
35
+ :currency => 'EUR',
36
+ :url => 'https://mijn.postbank.nl/...',
37
+ }
38
+
39
+ Returns a Hash representing the transaction (keys: Fixnum amount,
40
+ String currency, String transaction_id, String url).</pre></li><li><b>Mollie::Ideal#check(options)</b><pre>Public: Verify the status of a transaction.
41
+
42
+ options - Hash options:
43
+ :transaction_id - String id of the transaction
44
+
45
+ Examples
46
+
47
+ mi = Mollie::Ideal.new(12345)
48
+ mi.check(:transaction_id => '12345')
49
+ # => {
50
+ :transaction_id => '482d599bbcc7795727650330ad65fe9b',
51
+ :amount => 1465,
52
+ :currency => 'EUR',
53
+ :payed => true,
54
+ :consumer => {
55
+ :name => 'Hr J Janssen',
56
+ :account => 'P001234567',
57
+ :city => 'Amsterdam'
58
+ },
59
+ :message => 'This iDEAL-order has successfuly been payed for,
60
+ and this is the first time you check it.'
61
+ }
62
+ TODO: docs mention 'status' instead of 'message'
63
+
64
+ Returns A Hash representing the result of the transaction (see Examples).</pre></li></ul>
@@ -0,0 +1 @@
1
+ require "mollie/ideal"
@@ -0,0 +1,80 @@
1
+ module Mollie
2
+ class Ideal
3
+ # Public: All supported banks.
4
+ #
5
+ # Examples
6
+ #
7
+ # Mollie::Ideal.banklist
8
+ # # => [{:id => '0031', :name => 'ABN AMRO'}, ...]
9
+ #
10
+ # Returns an Array of Hash representing banks (keys: String id,
11
+ # String name).
12
+ def self.banklist;end
13
+ class << self
14
+ alias :banks :banklist
15
+ end
16
+
17
+ def banklist
18
+ self.class.banklist
19
+ end
20
+ alias :banks :banklist
21
+
22
+ # Public: Request a payment.
23
+ #
24
+ # options - Hash options:
25
+ # :amount - Fixnum the amount *in cents*
26
+ # :bank_id - String id of the bank
27
+ # :description - String description of the transaction (max. 30
28
+ # characters)
29
+ # :report_url - String url where the result of the transaction
30
+ # is sent
31
+ # :return_url - String url where the visitor is sent
32
+ # :profile_key - String profile this transaction should be linked
33
+ # to (default: nil)
34
+ #
35
+ # Examples
36
+ #
37
+ # mi = Mollie::Ideal.new(12345)
38
+ # mi.fetch(:amount => 1465, :bank_id => '0721',
39
+ # :description => "Charlie Brown's Tree",
40
+ # :report_url => 'http://example.org/report',
41
+ # :return_url => 'http://example.org/return')
42
+ # # => {
43
+ # :transaction_id => '482d599bbcc7795727650330ad65fe9b',
44
+ # :amount => 1465,
45
+ # :currency => 'EUR',
46
+ # :url => 'https://mijn.postbank.nl/...',
47
+ # }
48
+ #
49
+ # Returns a Hash representing the transaction (keys: Fixnum amount,
50
+ # String currency, String transaction_id, String url).
51
+ def fetch(options);end
52
+
53
+ # Public: Verify the status of a transaction.
54
+ #
55
+ # options - Hash options:
56
+ # :transaction_id - String id of the transaction
57
+ #
58
+ # Examples
59
+ #
60
+ # mi = Mollie::Ideal.new(12345)
61
+ # mi.check(:transaction_id => '12345')
62
+ # # => {
63
+ # :transaction_id => '482d599bbcc7795727650330ad65fe9b',
64
+ # :amount => 1465,
65
+ # :currency => 'EUR',
66
+ # :payed => true,
67
+ # :consumer => {
68
+ # :name => 'Hr J Janssen',
69
+ # :account => 'P001234567',
70
+ # :city => 'Amsterdam'
71
+ # },
72
+ # :message => 'This iDEAL-order has successfuly been payed for,
73
+ # and this is the first time you check it.'
74
+ # }
75
+ # TODO: docs mention 'status' instead of 'message'
76
+ #
77
+ # Returns A Hash representing the result of the transaction (see Examples).
78
+ def check(options);end
79
+ end
80
+ end
@@ -0,0 +1,5 @@
1
+ module Mollie
2
+ class Ideal
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,24 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "mollie/ideal/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "mollie-payment"
7
+ s.version = Mollie::Ideal::VERSION
8
+ s.authors = ["Gert Goet"]
9
+ s.email = ["gert@thinkcreate.nl"]
10
+ s.homepage = ""
11
+ s.summary = %q{WIP}
12
+ s.description = %q{WIP}
13
+
14
+ s.rubyforge_project = "mollie-payment"
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.require_paths = ["lib"]
20
+
21
+ s.add_development_dependency "tomdoc"
22
+ # s.add_development_dependency "nokogiri"
23
+ # s.add_runtime_dependency "rest-client"
24
+ end
metadata ADDED
@@ -0,0 +1,65 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mollie-payment
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Gert Goet
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-10-12 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: tomdoc
16
+ requirement: &70321337106080 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: *70321337106080
25
+ description: WIP
26
+ email:
27
+ - gert@thinkcreate.nl
28
+ executables: []
29
+ extensions: []
30
+ extra_rdoc_files: []
31
+ files:
32
+ - .gitignore
33
+ - Gemfile
34
+ - README.md
35
+ - Rakefile
36
+ - index.html
37
+ - lib/mollie-ideal.rb
38
+ - lib/mollie/ideal.rb
39
+ - lib/mollie/ideal/version.rb
40
+ - mollie-ideal.gemspec
41
+ homepage: ''
42
+ licenses: []
43
+ post_install_message:
44
+ rdoc_options: []
45
+ require_paths:
46
+ - lib
47
+ required_ruby_version: !ruby/object:Gem::Requirement
48
+ none: false
49
+ requirements:
50
+ - - ! '>='
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
53
+ required_rubygems_version: !ruby/object:Gem::Requirement
54
+ none: false
55
+ requirements:
56
+ - - ! '>='
57
+ - !ruby/object:Gem::Version
58
+ version: '0'
59
+ requirements: []
60
+ rubyforge_project: mollie-payment
61
+ rubygems_version: 1.8.10
62
+ signing_key:
63
+ specification_version: 3
64
+ summary: WIP
65
+ test_files: []