wirecard_sepa 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +7 -0
  2. data/.rspec +1 -0
  3. data/Gemfile +3 -0
  4. data/Gemfile.lock +54 -0
  5. data/LICENSE +202 -0
  6. data/README.md +9 -0
  7. data/Rakefile +14 -0
  8. data/lib/templates/wirecard_sepa/direct_debit/request.xml +23 -0
  9. data/lib/templates/wirecard_sepa/recurring/first_request.xml +27 -0
  10. data/lib/templates/wirecard_sepa/recurring/recurring_request.xml +13 -0
  11. data/lib/wirecard_sepa/config.rb +61 -0
  12. data/lib/wirecard_sepa/direct_debit/request.rb +24 -0
  13. data/lib/wirecard_sepa/direct_debit/response.rb +58 -0
  14. data/lib/wirecard_sepa/errors.rb +5 -0
  15. data/lib/wirecard_sepa/gateway.rb +76 -0
  16. data/lib/wirecard_sepa/recurring/first_request.rb +24 -0
  17. data/lib/wirecard_sepa/recurring/first_response.rb +6 -0
  18. data/lib/wirecard_sepa/recurring/recurring_request.rb +22 -0
  19. data/lib/wirecard_sepa/recurring/recurring_response.rb +6 -0
  20. data/lib/wirecard_sepa/utils/params_validator.rb +18 -0
  21. data/lib/wirecard_sepa/utils/template.rb +35 -0
  22. data/lib/wirecard_sepa/version.rb +3 -0
  23. data/lib/wirecard_sepa.rb +30 -0
  24. data/spec/lib/wirecard_sepa/config_spec.rb +52 -0
  25. data/spec/lib/wirecard_sepa/direct_debit/request_spec.rb +34 -0
  26. data/spec/lib/wirecard_sepa/direct_debit/response_spec.rb +32 -0
  27. data/spec/lib/wirecard_sepa/gateway_spec.rb +65 -0
  28. data/spec/lib/wirecard_sepa/recurring/first_request_spec.rb +34 -0
  29. data/spec/lib/wirecard_sepa/recurring/first_response_spec.rb +25 -0
  30. data/spec/lib/wirecard_sepa/recurring/recurring_request_spec.rb +28 -0
  31. data/spec/lib/wirecard_sepa/recurring/recurring_response_spec.rb +25 -0
  32. data/spec/lib/wirecard_sepa_spec.rb +4 -0
  33. data/spec/spec_helper.rb +15 -0
  34. data/spec/support/direct_debit/failure/request.xml +19 -0
  35. data/spec/support/direct_debit/failure/response.xml +25 -0
  36. data/spec/support/direct_debit/success/request.xml +23 -0
  37. data/spec/support/direct_debit/success/response.xml +31 -0
  38. data/spec/support/recurring/failure/recurring_request.xml +27 -0
  39. data/spec/support/recurring/failure/recurring_response.xml +33 -0
  40. data/spec/support/recurring/success/first_request.xml +27 -0
  41. data/spec/support/recurring/success/first_response.xml +34 -0
  42. data/spec/support/recurring/success/recurring_request.xml +13 -0
  43. data/spec/support/recurring/success/recurring_response.xml +35 -0
  44. data/wirecard_sepa.gemspec +29 -0
  45. metadata +205 -0
@@ -0,0 +1,35 @@
1
+ <payment xmlns="http://www.elastic-payments.com/schema/payment">
2
+ <merchant-account-id>eefc804c-f9d3-43a8-bd15-a1c92de10000</merchant-account-id>
3
+ <transaction-id>e6604f91-663c-11e3-a07b-18037336c0b3</transaction-id>
4
+ <request-id>55566dbf-c68c-4f4e-a14b-69db83fbd555</request-id>
5
+ <transaction-type>debit</transaction-type>
6
+ <transaction-state>success</transaction-state>
7
+ <completion-time-stamp>2013-12-19T10:29:02.000Z</completion-time-stamp>
8
+ <statuses>
9
+ <status code="201.0000" description="The resource was successfully created." severity="information" />
10
+ </statuses>
11
+ <requested-amount currency="EUR">20.02</requested-amount>
12
+ <account-holder>
13
+ <first-name>John</first-name>
14
+ <last-name>Doe</last-name>
15
+ </account-holder>
16
+ <payment-methods>
17
+ <payment-method name="sepadirectdebit" />
18
+ </payment-methods>
19
+ <bank-account>
20
+ <iban>DE42512308000000060004</iban>
21
+ <bic>WIREDEMMXXX</bic>
22
+ </bank-account>
23
+ <mandate>
24
+ <mandate-id>12345678</mandate-id>
25
+ <signed-date>2013-12-19</signed-date>
26
+ </mandate>
27
+ <creditor-id>DE98ZZZ09999999999</creditor-id>
28
+ <due-date>2014-01-02</due-date>
29
+ <periodic>
30
+ <periodic-type>recurring</periodic-type>
31
+ <sequence-type>recurring</sequence-type>
32
+ </periodic>
33
+ <provider-transaction-reference-id>6A11C85484</provider-transaction-reference-id>
34
+ </payment>
35
+
@@ -0,0 +1,29 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'wirecard_sepa/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "wirecard_sepa"
8
+ spec.version = WirecardSepa::VERSION
9
+ spec.authors = ["betterplace developers"]
10
+ spec.email = ["developers@betterplace.org"]
11
+ spec.summary = %q{Wirecard SEPA implementation}
12
+ spec.description = %q{Wirecard SEPA implementation}
13
+ spec.homepage = ""
14
+ spec.license = "APACHE 2.0"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^spec/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_dependency "typhoeus"
22
+ spec.add_dependency "nokogiri"
23
+
24
+ spec.add_development_dependency "bundler", "~> 1.9"
25
+ spec.add_development_dependency "rake", "~> 10.4"
26
+ spec.add_development_dependency "rspec"
27
+ spec.add_development_dependency "byebug"
28
+ spec.add_development_dependency "simplecov"
29
+ end
metadata ADDED
@@ -0,0 +1,205 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: wirecard_sepa
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - betterplace developers
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-05-05 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: typhoeus
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: nokogiri
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.9'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.9'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '10.4'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '10.4'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: byebug
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: simplecov
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ description: Wirecard SEPA implementation
112
+ email:
113
+ - developers@betterplace.org
114
+ executables: []
115
+ extensions: []
116
+ extra_rdoc_files: []
117
+ files:
118
+ - ".rspec"
119
+ - Gemfile
120
+ - Gemfile.lock
121
+ - LICENSE
122
+ - README.md
123
+ - Rakefile
124
+ - lib/templates/wirecard_sepa/direct_debit/request.xml
125
+ - lib/templates/wirecard_sepa/recurring/first_request.xml
126
+ - lib/templates/wirecard_sepa/recurring/recurring_request.xml
127
+ - lib/wirecard_sepa.rb
128
+ - lib/wirecard_sepa/config.rb
129
+ - lib/wirecard_sepa/direct_debit/request.rb
130
+ - lib/wirecard_sepa/direct_debit/response.rb
131
+ - lib/wirecard_sepa/errors.rb
132
+ - lib/wirecard_sepa/gateway.rb
133
+ - lib/wirecard_sepa/recurring/first_request.rb
134
+ - lib/wirecard_sepa/recurring/first_response.rb
135
+ - lib/wirecard_sepa/recurring/recurring_request.rb
136
+ - lib/wirecard_sepa/recurring/recurring_response.rb
137
+ - lib/wirecard_sepa/utils/params_validator.rb
138
+ - lib/wirecard_sepa/utils/template.rb
139
+ - lib/wirecard_sepa/version.rb
140
+ - spec/lib/wirecard_sepa/config_spec.rb
141
+ - spec/lib/wirecard_sepa/direct_debit/request_spec.rb
142
+ - spec/lib/wirecard_sepa/direct_debit/response_spec.rb
143
+ - spec/lib/wirecard_sepa/gateway_spec.rb
144
+ - spec/lib/wirecard_sepa/recurring/first_request_spec.rb
145
+ - spec/lib/wirecard_sepa/recurring/first_response_spec.rb
146
+ - spec/lib/wirecard_sepa/recurring/recurring_request_spec.rb
147
+ - spec/lib/wirecard_sepa/recurring/recurring_response_spec.rb
148
+ - spec/lib/wirecard_sepa_spec.rb
149
+ - spec/spec_helper.rb
150
+ - spec/support/direct_debit/failure/request.xml
151
+ - spec/support/direct_debit/failure/response.xml
152
+ - spec/support/direct_debit/success/request.xml
153
+ - spec/support/direct_debit/success/response.xml
154
+ - spec/support/recurring/failure/recurring_request.xml
155
+ - spec/support/recurring/failure/recurring_response.xml
156
+ - spec/support/recurring/success/first_request.xml
157
+ - spec/support/recurring/success/first_response.xml
158
+ - spec/support/recurring/success/recurring_request.xml
159
+ - spec/support/recurring/success/recurring_response.xml
160
+ - wirecard_sepa.gemspec
161
+ homepage: ''
162
+ licenses:
163
+ - APACHE 2.0
164
+ metadata: {}
165
+ post_install_message:
166
+ rdoc_options: []
167
+ require_paths:
168
+ - lib
169
+ required_ruby_version: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ required_rubygems_version: !ruby/object:Gem::Requirement
175
+ requirements:
176
+ - - ">="
177
+ - !ruby/object:Gem::Version
178
+ version: '0'
179
+ requirements: []
180
+ rubyforge_project:
181
+ rubygems_version: 2.4.5
182
+ signing_key:
183
+ specification_version: 4
184
+ summary: Wirecard SEPA implementation
185
+ test_files:
186
+ - spec/lib/wirecard_sepa/config_spec.rb
187
+ - spec/lib/wirecard_sepa/direct_debit/request_spec.rb
188
+ - spec/lib/wirecard_sepa/direct_debit/response_spec.rb
189
+ - spec/lib/wirecard_sepa/gateway_spec.rb
190
+ - spec/lib/wirecard_sepa/recurring/first_request_spec.rb
191
+ - spec/lib/wirecard_sepa/recurring/first_response_spec.rb
192
+ - spec/lib/wirecard_sepa/recurring/recurring_request_spec.rb
193
+ - spec/lib/wirecard_sepa/recurring/recurring_response_spec.rb
194
+ - spec/lib/wirecard_sepa_spec.rb
195
+ - spec/spec_helper.rb
196
+ - spec/support/direct_debit/failure/request.xml
197
+ - spec/support/direct_debit/failure/response.xml
198
+ - spec/support/direct_debit/success/request.xml
199
+ - spec/support/direct_debit/success/response.xml
200
+ - spec/support/recurring/failure/recurring_request.xml
201
+ - spec/support/recurring/failure/recurring_response.xml
202
+ - spec/support/recurring/success/first_request.xml
203
+ - spec/support/recurring/success/first_response.xml
204
+ - spec/support/recurring/success/recurring_request.xml
205
+ - spec/support/recurring/success/recurring_response.xml