docdata 0.0.1 → 0.0.2

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.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.coveralls.yml +2 -0
  3. data/.gitignore +4 -1
  4. data/.travis.yml +10 -0
  5. data/LICENSE +1 -1
  6. data/README.md +173 -7
  7. data/Rakefile +8 -0
  8. data/docdata.gemspec +18 -11
  9. data/lib/docdata.rb +74 -1
  10. data/lib/docdata/bank.rb +27 -0
  11. data/lib/docdata/config.rb +41 -0
  12. data/lib/docdata/docdata_error.rb +8 -0
  13. data/lib/docdata/engine.rb +13 -0
  14. data/lib/docdata/ideal.rb +40 -0
  15. data/lib/docdata/line_item.rb +99 -0
  16. data/lib/docdata/payment.rb +196 -0
  17. data/lib/docdata/response.rb +173 -0
  18. data/lib/docdata/shopper.rb +112 -0
  19. data/lib/docdata/version.rb +1 -1
  20. data/lib/docdata/xml/bank-list.xml +39 -0
  21. data/lib/docdata/xml/cancel.xml.erb +9 -0
  22. data/lib/docdata/xml/create.xml.erb +98 -0
  23. data/lib/docdata/xml/start.xml.erb +67 -0
  24. data/lib/docdata/xml/status.xml.erb +9 -0
  25. data/php-example/create.xml.erb +140 -0
  26. data/php-example/index.html +78 -0
  27. data/php-example/process.php +182 -0
  28. data/php-example/return.php +36 -0
  29. data/php-example/soap.rb +21 -0
  30. data/spec/config_spec.rb +53 -0
  31. data/spec/ideal_spec.rb +19 -0
  32. data/spec/line_item_spec.rb +55 -0
  33. data/spec/payment_spec.rb +162 -0
  34. data/spec/response_spec.rb +206 -0
  35. data/spec/shopper_spec.rb +50 -0
  36. data/spec/spec_helper.rb +36 -0
  37. data/spec/xml/status-canceled-creditcard.xml +34 -0
  38. data/spec/xml/status-canceled-ideal.xml +29 -0
  39. data/spec/xml/status-new.xml +20 -0
  40. data/spec/xml/status-paid-creditcard.xml +33 -0
  41. data/spec/xml/status-paid-ideal.xml +33 -0
  42. data/spec/xml/status-paid-sofort.xml +33 -0
  43. metadata +145 -13
  44. data/LICENSE.txt +0 -22
@@ -0,0 +1,34 @@
1
+ <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
2
+ <S:Body>
3
+ <statusResponse xmlns="http://www.docdatapayments.com/services/paymentservice/1_1/">
4
+ <statusSuccess>
5
+ <success code="SUCCESS">Operation successful.</success>
6
+ <report>
7
+ <approximateTotals exchangeRateDate="2014-08-04 13:20:11" exchangedTo="EUR">
8
+ <totalRegistered>500</totalRegistered>
9
+ <totalShopperPending>0</totalShopperPending>
10
+ <totalAcquirerPending>0</totalAcquirerPending>
11
+ <totalAcquirerApproved>0</totalAcquirerApproved>
12
+ <totalCaptured>0</totalCaptured>
13
+ <totalRefunded>0</totalRefunded>
14
+ <totalChargedback>0</totalChargedback>
15
+ </approximateTotals>
16
+ <payment>
17
+ <id>4907174778</id>
18
+ <paymentMethod>MASTERCARD</paymentMethod>
19
+ <authorization>
20
+ <status>AUTHORIZED</status>
21
+ <amount currency="EUR">500</amount>
22
+ <confidenceLevel>ACQUIRER_APPROVED</confidenceLevel>
23
+ <capture>
24
+ <status>CANCELED</status>
25
+ <amount currency="EUR">500</amount>
26
+ <reason>Cancel request through order api</reason>
27
+ </capture>
28
+ </authorization>
29
+ </payment>
30
+ </report>
31
+ </statusSuccess>
32
+ </statusResponse>
33
+ </S:Body>
34
+ </S:Envelope>
@@ -0,0 +1,29 @@
1
+ <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
2
+ <S:Body>
3
+ <statusResponse xmlns="http://www.docdatapayments.com/services/paymentservice/1_1/">
4
+ <statusSuccess>
5
+ <success code="SUCCESS">Operation successful.</success>
6
+ <report>
7
+ <approximateTotals exchangeRateDate="2014-08-04 15:24:14" exchangedTo="EUR">
8
+ <totalRegistered>500</totalRegistered>
9
+ <totalShopperPending>0</totalShopperPending>
10
+ <totalAcquirerPending>0</totalAcquirerPending>
11
+ <totalAcquirerApproved>0</totalAcquirerApproved>
12
+ <totalCaptured>0</totalCaptured>
13
+ <totalRefunded>0</totalRefunded>
14
+ <totalChargedback>0</totalChargedback>
15
+ </approximateTotals>
16
+ <payment>
17
+ <id>4907176931</id>
18
+ <paymentMethod>IDEAL</paymentMethod>
19
+ <authorization>
20
+ <status>CANCELED</status>
21
+ <amount currency="EUR">500</amount>
22
+ <confidenceLevel/>
23
+ </authorization>
24
+ </payment>
25
+ </report>
26
+ </statusSuccess>
27
+ </statusResponse>
28
+ </S:Body>
29
+ </S:Envelope>
@@ -0,0 +1,20 @@
1
+ <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
2
+ <S:Body>
3
+ <statusResponse xmlns="http://www.docdatapayments.com/services/paymentservice/1_1/">
4
+ <statusSuccess>
5
+ <success code="SUCCESS">Operation successful.</success>
6
+ <report>
7
+ <approximateTotals exchangeRateDate="2014-08-02 22:16:25" exchangedTo="EUR">
8
+ <totalRegistered>500</totalRegistered>
9
+ <totalShopperPending>0</totalShopperPending>
10
+ <totalAcquirerPending>0</totalAcquirerPending>
11
+ <totalAcquirerApproved>0</totalAcquirerApproved>
12
+ <totalCaptured>0</totalCaptured>
13
+ <totalRefunded>0</totalRefunded>
14
+ <totalChargedback>0</totalChargedback>
15
+ </approximateTotals>
16
+ </report>
17
+ </statusSuccess>
18
+ </statusResponse>
19
+ </S:Body>
20
+ </S:Envelope>
@@ -0,0 +1,33 @@
1
+ <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
2
+ <S:Body>
3
+ <statusResponse xmlns="http://www.docdatapayments.com/services/paymentservice/1_1/">
4
+ <statusSuccess>
5
+ <success code="SUCCESS">Operation successful.</success>
6
+ <report>
7
+ <approximateTotals exchangeRateDate="2014-08-04 16:27:59" exchangedTo="EUR">
8
+ <totalRegistered>500</totalRegistered>
9
+ <totalShopperPending>0</totalShopperPending>
10
+ <totalAcquirerPending>0</totalAcquirerPending>
11
+ <totalAcquirerApproved>500</totalAcquirerApproved>
12
+ <totalCaptured>0</totalCaptured>
13
+ <totalRefunded>0</totalRefunded>
14
+ <totalChargedback>0</totalChargedback>
15
+ </approximateTotals>
16
+ <payment>
17
+ <id>4907177199</id>
18
+ <paymentMethod>MASTERCARD</paymentMethod>
19
+ <authorization>
20
+ <status>AUTHORIZED</status>
21
+ <amount currency="EUR">500</amount>
22
+ <confidenceLevel>ACQUIRER_APPROVED</confidenceLevel>
23
+ <capture>
24
+ <status>NEW</status>
25
+ <amount currency="EUR">500</amount>
26
+ </capture>
27
+ </authorization>
28
+ </payment>
29
+ </report>
30
+ </statusSuccess>
31
+ </statusResponse>
32
+ </S:Body>
33
+ </S:Envelope>
@@ -0,0 +1,33 @@
1
+ <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
2
+ <S:Body>
3
+ <statusResponse xmlns="http://www.docdatapayments.com/services/paymentservice/1_1/">
4
+ <statusSuccess>
5
+ <success code="SUCCESS">Operation successful.</success>
6
+ <report>
7
+ <approximateTotals exchangeRateDate="2014-08-02 22:17:34" exchangedTo="EUR">
8
+ <totalRegistered>500</totalRegistered>
9
+ <totalShopperPending>0</totalShopperPending>
10
+ <totalAcquirerPending>0</totalAcquirerPending>
11
+ <totalAcquirerApproved>500</totalAcquirerApproved>
12
+ <totalCaptured>500</totalCaptured>
13
+ <totalRefunded>0</totalRefunded>
14
+ <totalChargedback>0</totalChargedback>
15
+ </approximateTotals>
16
+ <payment>
17
+ <id>4907175461</id>
18
+ <paymentMethod>IDEAL</paymentMethod>
19
+ <authorization>
20
+ <status>AUTHORIZED</status>
21
+ <amount currency="EUR">500</amount>
22
+ <confidenceLevel>ACQUIRER_APPROVED</confidenceLevel>
23
+ <capture>
24
+ <status>CAPTURED</status>
25
+ <amount currency="EUR">500</amount>
26
+ </capture>
27
+ </authorization>
28
+ </payment>
29
+ </report>
30
+ </statusSuccess>
31
+ </statusResponse>
32
+ </S:Body>
33
+ </S:Envelope>
@@ -0,0 +1,33 @@
1
+ <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
2
+ <S:Body>
3
+ <statusResponse xmlns="http://www.docdatapayments.com/services/paymentservice/1_1/">
4
+ <statusSuccess>
5
+ <success code="SUCCESS">Operation successful.</success>
6
+ <report>
7
+ <approximateTotals exchangeRateDate="2014-08-04 16:46:08" exchangedTo="EUR">
8
+ <totalRegistered>500</totalRegistered>
9
+ <totalShopperPending>0</totalShopperPending>
10
+ <totalAcquirerPending>0</totalAcquirerPending>
11
+ <totalAcquirerApproved>500</totalAcquirerApproved>
12
+ <totalCaptured>0</totalCaptured>
13
+ <totalRefunded>0</totalRefunded>
14
+ <totalChargedback>0</totalChargedback>
15
+ </approximateTotals>
16
+ <payment>
17
+ <id>4907177272</id>
18
+ <paymentMethod>SOFORT_UEBERWEISUNG</paymentMethod>
19
+ <authorization>
20
+ <status>AUTHORIZED</status>
21
+ <amount currency="EUR">500</amount>
22
+ <confidenceLevel>ACQUIRER_APPROVED</confidenceLevel>
23
+ <capture>
24
+ <status>STARTED</status>
25
+ <amount currency="EUR">500</amount>
26
+ </capture>
27
+ </authorization>
28
+ </payment>
29
+ </report>
30
+ </statusSuccess>
31
+ </statusResponse>
32
+ </S:Body>
33
+ </S:Envelope>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docdata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henk Meijer
@@ -9,8 +9,36 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-07-17 00:00:00.000000000 Z
12
+ date: 2014-08-05 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: bundler
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - '>='
19
+ - !ruby/object:Gem::Version
20
+ version: '0'
21
+ type: :development
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - '>='
26
+ - !ruby/object:Gem::Version
27
+ version: '0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: rake
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - '>='
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - '>='
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
14
42
  - !ruby/object:Gem::Dependency
15
43
  name: rspec
16
44
  requirement: !ruby/object:Gem::Requirement
@@ -96,50 +124,139 @@ dependencies:
96
124
  - !ruby/object:Gem::Version
97
125
  version: '0'
98
126
  - !ruby/object:Gem::Dependency
99
- name: bundler
127
+ name: rubyntlm
100
128
  requirement: !ruby/object:Gem::Requirement
101
129
  requirements:
102
- - - ~>
130
+ - - '>='
103
131
  - !ruby/object:Gem::Version
104
- version: '1.3'
132
+ version: '0'
105
133
  type: :development
106
134
  prerelease: false
107
135
  version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - '>='
138
+ - !ruby/object:Gem::Version
139
+ version: '0'
140
+ - !ruby/object:Gem::Dependency
141
+ name: savon
142
+ requirement: !ruby/object:Gem::Requirement
108
143
  requirements:
109
144
  - - ~>
110
145
  - !ruby/object:Gem::Version
111
- version: '1.3'
146
+ version: '2.0'
147
+ type: :runtime
148
+ prerelease: false
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - ~>
152
+ - !ruby/object:Gem::Version
153
+ version: '2.0'
112
154
  - !ruby/object:Gem::Dependency
113
- name: rake
155
+ name: nori
114
156
  requirement: !ruby/object:Gem::Requirement
115
157
  requirements:
116
158
  - - '>='
117
159
  - !ruby/object:Gem::Version
118
160
  version: '0'
119
- type: :development
161
+ type: :runtime
162
+ prerelease: false
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - '>='
166
+ - !ruby/object:Gem::Version
167
+ version: '0'
168
+ - !ruby/object:Gem::Dependency
169
+ name: veto
170
+ requirement: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - '>='
173
+ - !ruby/object:Gem::Version
174
+ version: '0'
175
+ type: :runtime
176
+ prerelease: false
177
+ version_requirements: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - '>='
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
182
+ - !ruby/object:Gem::Dependency
183
+ name: nokogiri
184
+ requirement: !ruby/object:Gem::Requirement
185
+ requirements:
186
+ - - '>='
187
+ - !ruby/object:Gem::Version
188
+ version: '0'
189
+ type: :runtime
190
+ prerelease: false
191
+ version_requirements: !ruby/object:Gem::Requirement
192
+ requirements:
193
+ - - '>='
194
+ - !ruby/object:Gem::Version
195
+ version: '0'
196
+ - !ruby/object:Gem::Dependency
197
+ name: railties
198
+ requirement: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - '>='
201
+ - !ruby/object:Gem::Version
202
+ version: '0'
203
+ type: :runtime
120
204
  prerelease: false
121
205
  version_requirements: !ruby/object:Gem::Requirement
122
206
  requirements:
123
207
  - - '>='
124
208
  - !ruby/object:Gem::Version
125
209
  version: '0'
126
- description: A ruby binder for the DocData payment gateway.
210
+ description: A ruby binder for the Docdata Payment API.
127
211
  email:
128
212
  - meijerhenk@gmail.com
129
213
  executables: []
130
214
  extensions: []
131
215
  extra_rdoc_files: []
132
216
  files:
217
+ - .coveralls.yml
133
218
  - .gitignore
219
+ - .travis.yml
134
220
  - Gemfile
135
221
  - LICENSE
136
- - LICENSE.txt
137
222
  - README.md
138
223
  - Rakefile
139
224
  - docdata.gemspec
140
225
  - lib/docdata.rb
226
+ - lib/docdata/bank.rb
227
+ - lib/docdata/config.rb
228
+ - lib/docdata/docdata_error.rb
229
+ - lib/docdata/engine.rb
230
+ - lib/docdata/ideal.rb
231
+ - lib/docdata/line_item.rb
232
+ - lib/docdata/payment.rb
233
+ - lib/docdata/response.rb
234
+ - lib/docdata/shopper.rb
141
235
  - lib/docdata/version.rb
142
- homepage: ''
236
+ - lib/docdata/xml/bank-list.xml
237
+ - lib/docdata/xml/cancel.xml.erb
238
+ - lib/docdata/xml/create.xml.erb
239
+ - lib/docdata/xml/start.xml.erb
240
+ - lib/docdata/xml/status.xml.erb
241
+ - php-example/create.xml.erb
242
+ - php-example/index.html
243
+ - php-example/process.php
244
+ - php-example/return.php
245
+ - php-example/soap.rb
246
+ - spec/config_spec.rb
247
+ - spec/ideal_spec.rb
248
+ - spec/line_item_spec.rb
249
+ - spec/payment_spec.rb
250
+ - spec/response_spec.rb
251
+ - spec/shopper_spec.rb
252
+ - spec/spec_helper.rb
253
+ - spec/xml/status-canceled-creditcard.xml
254
+ - spec/xml/status-canceled-ideal.xml
255
+ - spec/xml/status-new.xml
256
+ - spec/xml/status-paid-creditcard.xml
257
+ - spec/xml/status-paid-ideal.xml
258
+ - spec/xml/status-paid-sofort.xml
259
+ homepage: http://rdoc.info/github/henkm/docdata/
143
260
  licenses:
144
261
  - MIT
145
262
  metadata: {}
@@ -162,6 +279,21 @@ rubyforge_project:
162
279
  rubygems_version: 2.3.0
163
280
  signing_key:
164
281
  specification_version: 4
165
- summary: This gem provides a ruby API for the DocData payment gateway.
166
- test_files: []
282
+ summary: This gem provides a ruby interface for the Docdata Payment API. You basically
283
+ create a Payment object and receive a reirect_url back to take your users to the
284
+ checkout page.
285
+ test_files:
286
+ - spec/config_spec.rb
287
+ - spec/ideal_spec.rb
288
+ - spec/line_item_spec.rb
289
+ - spec/payment_spec.rb
290
+ - spec/response_spec.rb
291
+ - spec/shopper_spec.rb
292
+ - spec/spec_helper.rb
293
+ - spec/xml/status-canceled-creditcard.xml
294
+ - spec/xml/status-canceled-ideal.xml
295
+ - spec/xml/status-new.xml
296
+ - spec/xml/status-paid-creditcard.xml
297
+ - spec/xml/status-paid-ideal.xml
298
+ - spec/xml/status-paid-sofort.xml
167
299
  has_rdoc:
data/LICENSE.txt DELETED
@@ -1,22 +0,0 @@
1
- Copyright (c) 2014 Henk Meijer
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.