supreme 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +6 -7
- data/lib/supreme/response.rb +2 -1
- data/lib/supreme/uri.rb +1 -1
- data/lib/supreme/version.rb +1 -1
- metadata +96 -61
data/README.md
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
A Ruby client that allows you to do iDEAL transactions through the [Mollie iDEAL API](http://www.mollie.nl/betaaldiensten/ideal).
|
2
2
|
|
3
|
-
|
3
|
+
[  ](http://travis-ci.org/Fingertips/Supreme )
|
4
4
|
|
5
5
|
## Install
|
6
6
|
|
7
|
-
$ gem install supreme
|
7
|
+
$ gem install supreme
|
8
8
|
|
9
9
|
## Payment flow
|
10
10
|
|
11
|
-
You start by setting the mode of the library to either
|
11
|
+
You start by setting the mode of the library to either <tt>:test</tt> or <tt>:live</tt>. The default is <tt>:test</tt>, so
|
12
12
|
for tests you don't have to change anything.
|
13
13
|
|
14
14
|
Supreme.mode = :live
|
@@ -34,11 +34,11 @@ When the user has selected a bank, you start a transaction.
|
|
34
34
|
)
|
35
35
|
transaction.transaction_id #=> '482d599bbcc7795727650330ad65fe9b'
|
36
36
|
|
37
|
-
Keep the transaction_id around for reference and redirect the customer to the indicated URL.
|
37
|
+
Keep the <tt>transaction_id</tt> around for reference and redirect the customer to the indicated URL.
|
38
38
|
|
39
39
|
Location: #{transaction.url}
|
40
40
|
|
41
|
-
Once the transaction is done you will receive a GET on the report_url with a
|
41
|
+
Once the transaction is done you will receive a GET on the <tt>report_url</tt> with a <tt>transaction_id</tt> parameter
|
42
42
|
to indicate that the transaction has changed state. You will need to check the status of the transaction.
|
43
43
|
|
44
44
|
status = Supreme.api.check(
|
@@ -53,7 +53,7 @@ to indicate that the transaction has changed state. You will need to check the s
|
|
53
53
|
# Update the local status of the payment
|
54
54
|
end
|
55
55
|
|
56
|
-
When the customer returns to your site it returns with its transaction_id attached to your provided URL.
|
56
|
+
When the customer returns to your site it returns with its <tt>transaction_id</tt> attached to your provided URL.
|
57
57
|
You can present a page depending on the status of the payment.
|
58
58
|
|
59
59
|
## Errors
|
@@ -63,7 +63,6 @@ When an error occurs you get a Supreme::Error object instead of the response obj
|
|
63
63
|
status = Supreme.api.check(
|
64
64
|
:transaction_id => '482d599bbcc7795727650330ad65fe9b'
|
65
65
|
)
|
66
|
-
|
67
66
|
if status.error?
|
68
67
|
log("#{status.message} (#{status.code})")
|
69
68
|
end
|
data/lib/supreme/response.rb
CHANGED
data/lib/supreme/uri.rb
CHANGED
@@ -19,7 +19,7 @@ module Supreme
|
|
19
19
|
str = s.to_s
|
20
20
|
if RUBY_VERSION < "1.9" && $KCODE =~ /u/i
|
21
21
|
str.gsub(/([^ a-zA-Z0-9_.-]+)/) do
|
22
|
-
'%' + $1.unpack('H2' *
|
22
|
+
'%' + $1.unpack('H2' * $1.length).join('%').upcase
|
23
23
|
end.tr(' ', '+')
|
24
24
|
else
|
25
25
|
if TBLENCWWWCOMP_.empty?
|
data/lib/supreme/version.rb
CHANGED
metadata
CHANGED
@@ -1,80 +1,104 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: supreme
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 2
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Manfred Stienstra
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
17
|
+
|
18
|
+
date: 2012-02-13 00:00:00 +01:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
15
22
|
name: nap
|
16
|
-
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
17
25
|
none: false
|
18
|
-
requirements:
|
19
|
-
- -
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
version: "0"
|
22
33
|
type: :runtime
|
23
|
-
|
24
|
-
|
25
|
-
- !ruby/object:Gem::Dependency
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
26
36
|
name: rake
|
27
|
-
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
28
39
|
none: false
|
29
|
-
requirements:
|
30
|
-
- -
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
hash: 3
|
44
|
+
segments:
|
45
|
+
- 0
|
46
|
+
version: "0"
|
33
47
|
type: :development
|
34
|
-
|
35
|
-
|
36
|
-
- !ruby/object:Gem::Dependency
|
48
|
+
version_requirements: *id002
|
49
|
+
- !ruby/object:Gem::Dependency
|
37
50
|
name: rdoc
|
38
|
-
|
51
|
+
prerelease: false
|
52
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
39
53
|
none: false
|
40
|
-
requirements:
|
41
|
-
- -
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
|
54
|
+
requirements:
|
55
|
+
- - ">="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
hash: 3
|
58
|
+
segments:
|
59
|
+
- 0
|
60
|
+
version: "0"
|
44
61
|
type: :development
|
45
|
-
|
46
|
-
|
47
|
-
- !ruby/object:Gem::Dependency
|
62
|
+
version_requirements: *id003
|
63
|
+
- !ruby/object:Gem::Dependency
|
48
64
|
name: mocha
|
49
|
-
|
65
|
+
prerelease: false
|
66
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
50
67
|
none: false
|
51
|
-
requirements:
|
52
|
-
- -
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
|
68
|
+
requirements:
|
69
|
+
- - ">="
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
hash: 3
|
72
|
+
segments:
|
73
|
+
- 0
|
74
|
+
version: "0"
|
55
75
|
type: :development
|
56
|
-
|
57
|
-
|
58
|
-
- !ruby/object:Gem::Dependency
|
76
|
+
version_requirements: *id004
|
77
|
+
- !ruby/object:Gem::Dependency
|
59
78
|
name: fakeweb
|
60
|
-
|
79
|
+
prerelease: false
|
80
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
61
81
|
none: false
|
62
|
-
requirements:
|
63
|
-
- -
|
64
|
-
- !ruby/object:Gem::Version
|
65
|
-
|
82
|
+
requirements:
|
83
|
+
- - ">="
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
hash: 3
|
86
|
+
segments:
|
87
|
+
- 0
|
88
|
+
version: "0"
|
66
89
|
type: :development
|
67
|
-
|
68
|
-
version_requirements: *70218970547280
|
90
|
+
version_requirements: *id005
|
69
91
|
description:
|
70
|
-
email:
|
92
|
+
email:
|
71
93
|
- manfred@fngtps.com
|
72
94
|
executables: []
|
95
|
+
|
73
96
|
extensions: []
|
74
|
-
|
97
|
+
|
98
|
+
extra_rdoc_files:
|
75
99
|
- LICENSE
|
76
100
|
- README.md
|
77
|
-
files:
|
101
|
+
files:
|
78
102
|
- lib/supreme/api.rb
|
79
103
|
- lib/supreme/response.rb
|
80
104
|
- lib/supreme/uri.rb
|
@@ -82,28 +106,39 @@ files:
|
|
82
106
|
- lib/supreme.rb
|
83
107
|
- README.md
|
84
108
|
- LICENSE
|
109
|
+
has_rdoc: true
|
85
110
|
homepage: http://github.com/Fingertips/Supreme
|
86
111
|
licenses: []
|
112
|
+
|
87
113
|
post_install_message:
|
88
114
|
rdoc_options: []
|
89
|
-
|
115
|
+
|
116
|
+
require_paths:
|
90
117
|
- lib
|
91
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
118
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
92
119
|
none: false
|
93
|
-
requirements:
|
94
|
-
- -
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
|
97
|
-
|
120
|
+
requirements:
|
121
|
+
- - ">="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
hash: 3
|
124
|
+
segments:
|
125
|
+
- 0
|
126
|
+
version: "0"
|
127
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
128
|
none: false
|
99
|
-
requirements:
|
100
|
-
- -
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
|
129
|
+
requirements:
|
130
|
+
- - ">="
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
hash: 3
|
133
|
+
segments:
|
134
|
+
- 0
|
135
|
+
version: "0"
|
103
136
|
requirements: []
|
137
|
+
|
104
138
|
rubyforge_project:
|
105
|
-
rubygems_version: 1.
|
139
|
+
rubygems_version: 1.6.2
|
106
140
|
signing_key:
|
107
141
|
specification_version: 3
|
108
142
|
summary: Ruby implementation of the Mollie iDEAL API
|
109
143
|
test_files: []
|
144
|
+
|