wirecard_sepa 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +1 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +54 -0
- data/LICENSE +202 -0
- data/README.md +9 -0
- data/Rakefile +14 -0
- data/lib/templates/wirecard_sepa/direct_debit/request.xml +23 -0
- data/lib/templates/wirecard_sepa/recurring/first_request.xml +27 -0
- data/lib/templates/wirecard_sepa/recurring/recurring_request.xml +13 -0
- data/lib/wirecard_sepa/config.rb +61 -0
- data/lib/wirecard_sepa/direct_debit/request.rb +24 -0
- data/lib/wirecard_sepa/direct_debit/response.rb +58 -0
- data/lib/wirecard_sepa/errors.rb +5 -0
- data/lib/wirecard_sepa/gateway.rb +76 -0
- data/lib/wirecard_sepa/recurring/first_request.rb +24 -0
- data/lib/wirecard_sepa/recurring/first_response.rb +6 -0
- data/lib/wirecard_sepa/recurring/recurring_request.rb +22 -0
- data/lib/wirecard_sepa/recurring/recurring_response.rb +6 -0
- data/lib/wirecard_sepa/utils/params_validator.rb +18 -0
- data/lib/wirecard_sepa/utils/template.rb +35 -0
- data/lib/wirecard_sepa/version.rb +3 -0
- data/lib/wirecard_sepa.rb +30 -0
- data/spec/lib/wirecard_sepa/config_spec.rb +52 -0
- data/spec/lib/wirecard_sepa/direct_debit/request_spec.rb +34 -0
- data/spec/lib/wirecard_sepa/direct_debit/response_spec.rb +32 -0
- data/spec/lib/wirecard_sepa/gateway_spec.rb +65 -0
- data/spec/lib/wirecard_sepa/recurring/first_request_spec.rb +34 -0
- data/spec/lib/wirecard_sepa/recurring/first_response_spec.rb +25 -0
- data/spec/lib/wirecard_sepa/recurring/recurring_request_spec.rb +28 -0
- data/spec/lib/wirecard_sepa/recurring/recurring_response_spec.rb +25 -0
- data/spec/lib/wirecard_sepa_spec.rb +4 -0
- data/spec/spec_helper.rb +15 -0
- data/spec/support/direct_debit/failure/request.xml +19 -0
- data/spec/support/direct_debit/failure/response.xml +25 -0
- data/spec/support/direct_debit/success/request.xml +23 -0
- data/spec/support/direct_debit/success/response.xml +31 -0
- data/spec/support/recurring/failure/recurring_request.xml +27 -0
- data/spec/support/recurring/failure/recurring_response.xml +33 -0
- data/spec/support/recurring/success/first_request.xml +27 -0
- data/spec/support/recurring/success/first_response.xml +34 -0
- data/spec/support/recurring/success/recurring_request.xml +13 -0
- data/spec/support/recurring/success/recurring_response.xml +35 -0
- data/wirecard_sepa.gemspec +29 -0
- metadata +205 -0
@@ -0,0 +1,35 @@
|
|
1
|
+
module WirecardSepa
|
2
|
+
module Utils
|
3
|
+
class Template
|
4
|
+
attr_reader :request
|
5
|
+
|
6
|
+
def initialize(request)
|
7
|
+
@request = request
|
8
|
+
end
|
9
|
+
|
10
|
+
def to_xml
|
11
|
+
xml_template = File.read template_path
|
12
|
+
xml_template.gsub /{{\w+}}/, request_params
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
def request_params
|
18
|
+
request.params.each_with_object({}) do |(k,v), h|
|
19
|
+
h["{{#{k.upcase}}}"] = v
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def template_path
|
24
|
+
File.expand_path "../../../templates/#{template_file}", __FILE__
|
25
|
+
end
|
26
|
+
|
27
|
+
def template_file
|
28
|
+
request.class.name.
|
29
|
+
gsub(/(.)([A-Z])/, '\1_\2').
|
30
|
+
gsub('::_', '/').
|
31
|
+
downcase + '.xml'
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'nokogiri'
|
2
|
+
require 'wirecard_sepa/version'
|
3
|
+
require 'wirecard_sepa/errors'
|
4
|
+
require 'wirecard_sepa/utils/template'
|
5
|
+
require 'wirecard_sepa/utils/params_validator'
|
6
|
+
require 'wirecard_sepa/direct_debit/request'
|
7
|
+
require 'wirecard_sepa/direct_debit/response'
|
8
|
+
require 'wirecard_sepa/recurring/first_request'
|
9
|
+
require 'wirecard_sepa/recurring/first_response'
|
10
|
+
require 'wirecard_sepa/recurring/recurring_request'
|
11
|
+
require 'wirecard_sepa/recurring/recurring_response'
|
12
|
+
require 'wirecard_sepa/config'
|
13
|
+
require 'wirecard_sepa/gateway'
|
14
|
+
|
15
|
+
module WirecardSepa
|
16
|
+
SANDBOX_URL = 'https://api-test.wirecard.com/engine/rest/paymentmethods/'
|
17
|
+
LIVE_URL = ''
|
18
|
+
|
19
|
+
def self.sandbox!
|
20
|
+
@live = true
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.sandboxed?
|
24
|
+
!@live
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.gateway_url
|
28
|
+
sandboxed? ? SANDBOX_URL : LIVE_URL
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe WirecardSepa::Config do
|
4
|
+
let(:config) { described_class.new(valid_params) }
|
5
|
+
let(:valid_params) do
|
6
|
+
{
|
7
|
+
http_auth_username: 'alice',
|
8
|
+
http_auth_password: 'secret',
|
9
|
+
merchant_account_id: '123',
|
10
|
+
creditor_id: '31415',
|
11
|
+
}
|
12
|
+
end
|
13
|
+
|
14
|
+
describe '#initialize' do
|
15
|
+
it 'raises an Error when unexpected param keys are provided' do
|
16
|
+
expect {
|
17
|
+
described_class.new(valid_params.merge({ unexpected_key: 'foo' }))
|
18
|
+
}.to raise_error WirecardSepa::Errors::InvalidParamsError
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
describe '#request_params' do
|
23
|
+
it 'returns the params for the request' do
|
24
|
+
expect(config.request_params).to eq({
|
25
|
+
merchant_account_id: '123',
|
26
|
+
creditor_id: '31415',
|
27
|
+
})
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
describe '#http_auth_username' do
|
32
|
+
it 'returns the http auth username' do
|
33
|
+
expect(config.http_auth_username).to eq 'alice'
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
describe '#http_auth_password' do
|
38
|
+
it 'returns the http auth password' do
|
39
|
+
expect(config.http_auth_password).to eq 'secret'
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
describe '.for_sandbox' do
|
44
|
+
it 'returns a config object with the correct sandbox settings' do
|
45
|
+
config = described_class.for_sandbox
|
46
|
+
expect(config[:http_auth_username]).to eq '70000-APITEST-AP'
|
47
|
+
expect(config[:http_auth_password]).to eq 'qD2wzQ_hrc!8'
|
48
|
+
expect(config[:merchant_account_id]).to eq '4c901196-eff7-411e-82a3-5ef6b6860d64'
|
49
|
+
expect(config[:creditor_id]).to eq 'abcdef'
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe WirecardSepa::DirectDebit::Request do
|
4
|
+
subject { described_class.new(params) }
|
5
|
+
let(:params) do
|
6
|
+
{
|
7
|
+
merchant_account_id: 'eefc804c-f9d3-43a8-bd15-a1c92de10000',
|
8
|
+
request_id: '7f55aacb-3e15-4185-b80f-1e0ad5b51d6c',
|
9
|
+
requested_amount: '10.01',
|
10
|
+
account_holder_first_name: 'John',
|
11
|
+
account_holder_last_name: 'Doe',
|
12
|
+
bank_account_iban: 'DE42512308000000060004',
|
13
|
+
bank_account_bic: 'WIREDEMMXXX',
|
14
|
+
mandate_id: '12345678',
|
15
|
+
mandate_signed_date: '2013-09-24',
|
16
|
+
creditor_id: 'DE98ZZZ09999999999',
|
17
|
+
}
|
18
|
+
end
|
19
|
+
|
20
|
+
describe '#initialize' do
|
21
|
+
it 'raises an Error when unexpected param keys are provided' do
|
22
|
+
expect {
|
23
|
+
described_class.new({ unexpected_key: 'foo' })
|
24
|
+
}.to raise_error WirecardSepa::Errors::InvalidParamsError
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe '#to_xml' do
|
29
|
+
it 'builds the correct xml' do
|
30
|
+
expected_xml = read_support_file('direct_debit/success/request.xml')
|
31
|
+
expect(subject.to_xml).to eq expected_xml
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe WirecardSepa::DirectDebit::Response do
|
4
|
+
let(:success_xml) { read_support_file('direct_debit/success/response.xml') }
|
5
|
+
let(:failure_xml) { read_support_file('direct_debit/failure/response.xml') }
|
6
|
+
|
7
|
+
let(:success_response) { described_class.new success_xml }
|
8
|
+
let(:failure_response) { described_class.new failure_xml }
|
9
|
+
|
10
|
+
describe '#params' do
|
11
|
+
context 'for a successful response' do
|
12
|
+
let(:params) { success_response.params }
|
13
|
+
|
14
|
+
it('params[:transaction_id]') { expect(params[:transaction_id]).to eq '3971c2d8-250f-11e3-8d4b-005056a97162' }
|
15
|
+
it('params[:transaction_state]') { expect(params[:transaction_state]).to eq 'success' }
|
16
|
+
it('params[:status_code]') { expect(params[:status_code]).to eq '201.0000' }
|
17
|
+
it('params[:status_description]') { expect(params[:status_description]).to eq 'The resource was successfully created.' }
|
18
|
+
it('params[:due_date]') { expect(params[:due_date]).to eq '2013-10-03' }
|
19
|
+
it('params[:reference_id]') { expect(params[:reference_id]).to eq '33F7A4D125' }
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
describe '#success?' do
|
24
|
+
it 'returns true for a succesful response' do
|
25
|
+
expect(success_response.success?).to eq true
|
26
|
+
end
|
27
|
+
|
28
|
+
it 'returns false for a failure response' do
|
29
|
+
expect(failure_response.success?).to eq false
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe WirecardSepa::Gateway do
|
4
|
+
let(:config) { WirecardSepa::Config.for_sandbox }
|
5
|
+
let(:gateway) { described_class.new(config) }
|
6
|
+
|
7
|
+
describe '#debit(params)' do
|
8
|
+
let(:params) do
|
9
|
+
{
|
10
|
+
requested_amount: '12.12',
|
11
|
+
account_holder_first_name: 'John',
|
12
|
+
account_holder_last_name: 'Doe',
|
13
|
+
bank_account_iban: 'DE42512308000000060004',
|
14
|
+
bank_account_bic: 'WIREDEMMXXX',
|
15
|
+
mandate_id: '1235678',
|
16
|
+
mandate_signed_date: '2013-09-24',
|
17
|
+
}
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'posts the correct XML' do
|
21
|
+
# TODO: Record response from wirecard
|
22
|
+
response = gateway.debit(params)
|
23
|
+
# FIXME: For some reason wirecard always returns the following error:
|
24
|
+
# "The Request Identifier has not been provided. Please check your input and try again."
|
25
|
+
# Status-Code: 400.1010
|
26
|
+
# expect(response).to be_success
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
describe '#recurring_init(params)' do
|
31
|
+
let(:params) do
|
32
|
+
{
|
33
|
+
requested_amount: '15.00',
|
34
|
+
account_holder_first_name: 'Bob',
|
35
|
+
account_holder_last_name: 'Hawk',
|
36
|
+
bank_account_iban: 'DE11512308000000060002',
|
37
|
+
bank_account_bic: 'WIREDEMMXXX',
|
38
|
+
mandate_id: '2356789',
|
39
|
+
mandate_signed_date: '2013-08-11',
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
it 'posts the correct XML' do
|
44
|
+
response = gateway.recurring_init(params)
|
45
|
+
# FIXME: For some reason wirecard always returns the following error:
|
46
|
+
# "The Request Identifier has not been provided. Please check your input and try again."
|
47
|
+
# Status-Code: 400.1010
|
48
|
+
# expect(response).to be_success
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
describe '#recurring_process(params)' do
|
53
|
+
let(:params) do
|
54
|
+
{ parent_transaction_id: 'e6604f91-663c-11e3-a07b-18037336c0b3' }
|
55
|
+
end
|
56
|
+
|
57
|
+
it 'posts the correct XML' do
|
58
|
+
response = gateway.recurring_process(params)
|
59
|
+
# FIXME: For some reason wirecard always returns the following error:
|
60
|
+
# "The Request Identifier has not been provided. Please check your input and try again."
|
61
|
+
# Status-Code: 400.1010
|
62
|
+
# expect(response).to be_success
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe WirecardSepa::Recurring::FirstRequest do
|
4
|
+
subject { described_class.new(params) }
|
5
|
+
let(:params) do
|
6
|
+
{
|
7
|
+
merchant_account_id: 'eefc804c-f9d3-43a8-bd15-a1c92de10000',
|
8
|
+
request_id: '67366dbf-c68c-4f4e-a14b-69db83fbdd20',
|
9
|
+
requested_amount: '20.02',
|
10
|
+
account_holder_first_name: 'John',
|
11
|
+
account_holder_last_name: 'Doe',
|
12
|
+
bank_account_iban: 'DE42512308000000060004',
|
13
|
+
bank_account_bic: 'WIREDEMMXXX',
|
14
|
+
mandate_id: '12345678',
|
15
|
+
mandate_signed_date: '2013-12-19',
|
16
|
+
creditor_id: 'DE98ZZZ09999999999',
|
17
|
+
}
|
18
|
+
end
|
19
|
+
|
20
|
+
describe '#initialize' do
|
21
|
+
it 'raises an Error when unexpected param keys are provided' do
|
22
|
+
expect {
|
23
|
+
described_class.new({ unexpected_key: 'foo' })
|
24
|
+
}.to raise_error WirecardSepa::Errors::InvalidParamsError
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe '#to_xml' do
|
29
|
+
it 'builds the correct xml' do
|
30
|
+
expected_xml = read_support_file('recurring/success/first_request.xml')
|
31
|
+
expect(subject.to_xml).to eq expected_xml
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe WirecardSepa::Recurring::FirstResponse do
|
4
|
+
let(:success_xml) { read_support_file('recurring/success/first_response.xml') }
|
5
|
+
let(:success_response) { described_class.new success_xml }
|
6
|
+
|
7
|
+
describe '#params' do
|
8
|
+
context 'for a successful response' do
|
9
|
+
let(:params) { success_response.params }
|
10
|
+
|
11
|
+
it('params[:transaction_id]') { expect(params[:transaction_id]).to eq 'e6604f91-663c-11e3-a07b-18037336c0b3' }
|
12
|
+
it('params[:transaction_state]') { expect(params[:transaction_state]).to eq 'success' }
|
13
|
+
it('params[:status_code]') { expect(params[:status_code]).to eq '201.0000' }
|
14
|
+
it('params[:status_description]') { expect(params[:status_description]).to eq 'The resource was successfully created.' }
|
15
|
+
it('params[:due_date]') { expect(params[:due_date]).to eq '2014-01-02' }
|
16
|
+
it('params[:reference_id]') { expect(params[:reference_id]).to eq '5A00C85484' }
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
describe '#success?' do
|
21
|
+
it 'returns true for a succesful response' do
|
22
|
+
expect(success_response.success?).to eq true
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe WirecardSepa::Recurring::RecurringRequest do
|
4
|
+
subject { described_class.new(params) }
|
5
|
+
let(:params) do
|
6
|
+
{
|
7
|
+
merchant_account_id: 'eefc804c-f9d3-43a8-bd15-a1c92de10000',
|
8
|
+
request_id: '55566dbf-c68c-4f4e-a14b-69db83fbd555',
|
9
|
+
parent_transaction_id: 'e6604f91-663c-11e3-a07b-18037336c0b3',
|
10
|
+
}
|
11
|
+
end
|
12
|
+
|
13
|
+
describe '#initialize' do
|
14
|
+
it 'raises an Error when unexpected param keys are provided' do
|
15
|
+
expect {
|
16
|
+
described_class.new({ unexpected_key: 'foo' })
|
17
|
+
}.to raise_error WirecardSepa::Errors::InvalidParamsError
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
describe '#to_xml' do
|
22
|
+
it 'builds the correct xml' do
|
23
|
+
expected_xml = read_support_file('recurring/success/recurring_request.xml')
|
24
|
+
expect(subject.to_xml).to eq expected_xml
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe WirecardSepa::Recurring::RecurringResponse do
|
4
|
+
let(:success_xml) { read_support_file('recurring/success/recurring_response.xml') }
|
5
|
+
let(:success_response) { described_class.new success_xml }
|
6
|
+
|
7
|
+
describe '#params' do
|
8
|
+
context 'for a successful response' do
|
9
|
+
let(:params) { success_response.params }
|
10
|
+
|
11
|
+
it('params[:transaction_id]') { expect(params[:transaction_id]).to eq 'e6604f91-663c-11e3-a07b-18037336c0b3' }
|
12
|
+
it('params[:transaction_state]') { expect(params[:transaction_state]).to eq 'success' }
|
13
|
+
it('params[:status_code]') { expect(params[:status_code]).to eq '201.0000' }
|
14
|
+
it('params[:status_description]') { expect(params[:status_description]).to eq 'The resource was successfully created.' }
|
15
|
+
it('params[:due_date]') { expect(params[:due_date]).to eq '2014-01-02' }
|
16
|
+
it('params[:reference_id]') { expect(params[:reference_id]).to eq '6A11C85484' }
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
describe '#success?' do
|
21
|
+
it 'returns true for a succesful response' do
|
22
|
+
expect(success_response.success?).to eq true
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'simplecov'
|
2
|
+
require 'byebug'
|
3
|
+
|
4
|
+
# FIXME
|
5
|
+
# SimpleCov.adapters.define 'gem' do
|
6
|
+
# add_filter '/spec/'
|
7
|
+
# add_filter '/autotest/'
|
8
|
+
# add_group 'Libraries', '/lib/'
|
9
|
+
# end
|
10
|
+
# SimpleCov.start 'gem'
|
11
|
+
def read_support_file(file_path)
|
12
|
+
File.read File.expand_path("../support/#{file_path}", __FILE__)
|
13
|
+
end
|
14
|
+
|
15
|
+
require 'wirecard_sepa'
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<payment xmlns="http://www.elastic-payments.com/schema/payment">
|
2
|
+
<merchant-account-id>eefc804c-f9d3-43a8-bd15-a1c92de10000</merchant-account-id>
|
3
|
+
<request-id>6bc1f033-ed85-4363-955c-94d70b55f57f</request-id>
|
4
|
+
<transaction-type>debit</transaction-type>
|
5
|
+
<requested-amount currency="EUR">10.01</requested-amount>
|
6
|
+
<payment-methods>
|
7
|
+
<payment-method name="sepadirectdebit" />
|
8
|
+
</payment-methods>
|
9
|
+
<bank-account>
|
10
|
+
<iban>DE42512308000000060004</iban>
|
11
|
+
<bic>WIREDEMMXXX</bic>
|
12
|
+
</bank-account>
|
13
|
+
<mandate>
|
14
|
+
<mandate-id>12345678</mandate-id>
|
15
|
+
<signed-date>2013-09-24</signed-date>
|
16
|
+
</mandate>
|
17
|
+
<creditor-id>DE98ZZZ09999999999</creditor-id>
|
18
|
+
</payment>
|
19
|
+
|
@@ -0,0 +1,25 @@
|
|
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>4185215e-250f-11e3-8d4b-005056a97162</transaction-id>
|
4
|
+
<request-id>6bc1f033-ed85-4363-955c-94d70b55f57f</request-id>
|
5
|
+
<transaction-type>debit</transaction-type>
|
6
|
+
<transaction-state>failed</transaction-state>
|
7
|
+
<completion-time-stamp>2013-09-24T11:48:40.583Z</completion-time-stamp>
|
8
|
+
<statuses>
|
9
|
+
<status code="400.1007" description="The account holder information has not been provided. Please check your input and try again. " severity="error" />
|
10
|
+
</statuses>
|
11
|
+
<requested-amount currency="EUR">10.01</requested-amount>
|
12
|
+
<payment-methods>
|
13
|
+
<payment-method name="sepadirectdebit" />
|
14
|
+
</payment-methods>
|
15
|
+
<bank-account>
|
16
|
+
<iban>DE42512308000000060004</iban>
|
17
|
+
<bic>WIREDEMMXXX</bic>
|
18
|
+
</bank-account>
|
19
|
+
<mandate>
|
20
|
+
<mandate-id>12345678</mandate-id>
|
21
|
+
<signed-date>2013-09-24</signed-date>
|
22
|
+
</mandate>
|
23
|
+
<creditor-id>DE98ZZZ09999999999</creditor-id>
|
24
|
+
</payment>
|
25
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<payment xmlns="http://www.elastic-payments.com/schema/payment">
|
2
|
+
<merchant-account-id>eefc804c-f9d3-43a8-bd15-a1c92de10000</merchant-account-id>
|
3
|
+
<request-id>7f55aacb-3e15-4185-b80f-1e0ad5b51d6c</request-id>
|
4
|
+
<transaction-type>pending-debit</transaction-type>
|
5
|
+
<requested-amount currency="EUR">10.01</requested-amount>
|
6
|
+
<account-holder>
|
7
|
+
<first-name>John</first-name>
|
8
|
+
<last-name>Doe</last-name>
|
9
|
+
</account-holder>
|
10
|
+
<payment-methods>
|
11
|
+
<payment-method name="sepadirectdebit"/>
|
12
|
+
</payment-methods>
|
13
|
+
<bank-account>
|
14
|
+
<iban>DE42512308000000060004</iban>
|
15
|
+
<bic>WIREDEMMXXX</bic>
|
16
|
+
</bank-account>
|
17
|
+
 <mandate>
|
18
|
+
<mandate-id>12345678</mandate-id>
|
19
|
+
<signed-date>2013-09-24</signed-date>
|
20
|
+
</mandate>
|
21
|
+
<creditor-id>DE98ZZZ09999999999</creditor-id>
|
22
|
+
</payment>
|
23
|
+
|
@@ -0,0 +1,31 @@
|
|
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>3971c2d8-250f-11e3-8d4b-005056a97162</transaction-id>
|
4
|
+
<request-id>7f55aacb-3e15-4185-b80f-1e0ad5b51d6c</request-id>
|
5
|
+
<transaction-type>debit</transaction-type>
|
6
|
+
<transaction-state>success</transaction-state>
|
7
|
+
<completion-time-stamp>2013-09-24T11:48:27.528Z</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">10.01</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-09-24</signed-date>
|
26
|
+
</mandate>
|
27
|
+
<creditor-id>DE98ZZZ09999999999</creditor-id>
|
28
|
+
<due-date>2013-10-03</due-date>
|
29
|
+
<provider-transaction-reference-id>33F7A4D125</provider-transaction-reference-id>
|
30
|
+
</payment>
|
31
|
+
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<payment xmlns="http://www.elastic-payments.com/schema/payment">
|
2
|
+
<merchant-account-id>eefc804c-f9d3-43a8-bd15-a1c92de10000</merchant-account-id>
|
3
|
+
<request-id>05913099-b20e-4e2b-a8b0-e28fa9ea700c</request-id>
|
4
|
+
<transaction-type>debit</transaction-type>
|
5
|
+
<requested-amount currency="EUR">20.02</requested-amount>
|
6
|
+
<account-holder>
|
7
|
+
<first-name>John</first-name>
|
8
|
+
<last-name>Doe</last-name>
|
9
|
+
</account-holder>
|
10
|
+
<payment-methods>
|
11
|
+
<payment-method name="sepadirectdebit" />
|
12
|
+
</payment-methods>
|
13
|
+
<bank-account>
|
14
|
+
<iban />
|
15
|
+
<bic>WIREDEMMXXX</bic>
|
16
|
+
</bank-account>
|
17
|
+
<mandate>
|
18
|
+
<mandate-id>12345678</mandate-id>
|
19
|
+
<signed-date>2013-12-19</signed-date>
|
20
|
+
</mandate>
|
21
|
+
<creditor-id>DE98ZZZ09999999999</creditor-id>
|
22
|
+
<periodic>
|
23
|
+
<periodic-type>recurring</periodic-type>
|
24
|
+
<sequence-type>recurring</sequence-type>
|
25
|
+
</periodic>
|
26
|
+
</payment>
|
27
|
+
|
@@ -0,0 +1,33 @@
|
|
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>5d21ee54-663d-11e3-a07b-18037336c0b3</transaction-id>
|
4
|
+
<request-id>05913099-b20e-4e2b-a8b0-e28fa9ea700c</request-id>
|
5
|
+
<transaction-type>debit</transaction-type>
|
6
|
+
<transaction-state>failed</transaction-state>
|
7
|
+
<completion-time-stamp>2013-12-19T10:32:21.000Z</completion-time-stamp>
|
8
|
+
<statuses>
|
9
|
+
<status code="400.1021" description=" No Parent Transaction Id.The Parent Transaction Id is required, and not provided." severity="error" />
|
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 />
|
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
|
+
<periodic>
|
29
|
+
<periodic-type>recurring</periodic-type>
|
30
|
+
<sequence-type>recurring</sequence-type>
|
31
|
+
</periodic>
|
32
|
+
</payment>
|
33
|
+
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<payment xmlns="http://www.elastic-payments.com/schema/payment">
|
2
|
+
<merchant-account-id>eefc804c-f9d3-43a8-bd15-a1c92de10000</merchant-account-id>
|
3
|
+
<request-id>67366dbf-c68c-4f4e-a14b-69db83fbdd20</request-id>
|
4
|
+
<transaction-type>debit</transaction-type>
|
5
|
+
<requested-amount currency="EUR">20.02</requested-amount>
|
6
|
+
<account-holder>
|
7
|
+
<first-name>John</first-name>
|
8
|
+
<last-name>Doe</last-name>
|
9
|
+
</account-holder>
|
10
|
+
<payment-methods>
|
11
|
+
<payment-method name="sepadirectdebit" />
|
12
|
+
</payment-methods>
|
13
|
+
<bank-account>
|
14
|
+
<iban>DE42512308000000060004</iban>
|
15
|
+
<bic>WIREDEMMXXX</bic>
|
16
|
+
</bank-account>
|
17
|
+
<mandate>
|
18
|
+
<mandate-id>12345678</mandate-id>
|
19
|
+
<signed-date>2013-12-19</signed-date>
|
20
|
+
</mandate>
|
21
|
+
<creditor-id>DE98ZZZ09999999999</creditor-id>
|
22
|
+
<periodic>
|
23
|
+
<periodic-type>recurring</periodic-type>
|
24
|
+
<sequence-type>first</sequence-type>
|
25
|
+
</periodic>
|
26
|
+
</payment>
|
27
|
+
|
@@ -0,0 +1,34 @@
|
|
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>67366dbf-c68c-4f4e-a14b-69db83fbdd20</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>first</sequence-type>
|
32
|
+
</periodic>
|
33
|
+
<provider-transaction-reference-id>5A00C85484</provider-transaction-reference-id>
|
34
|
+
</payment>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<payment xmlns="http://www.elastic-payments.com/schema/payment">
|
2
|
+
<merchant-account-id>eefc804c-f9d3-43a8-bd15-a1c92de10000</merchant-account-id>
|
3
|
+
<request-id>55566dbf-c68c-4f4e-a14b-69db83fbd555</request-id>
|
4
|
+
<transaction-type>debit</transaction-type>
|
5
|
+
<parent-transaction-id>e6604f91-663c-11e3-a07b-18037336c0b3</parent-transaction-id>
|
6
|
+
<payment-methods>
|
7
|
+
<payment-method name="sepadirectdebit" />
|
8
|
+
</payment-methods>
|
9
|
+
<periodic>
|
10
|
+
<periodic-type>recurring</periodic-type>
|
11
|
+
<sequence-type>recurring</sequence-type>
|
12
|
+
</periodic>
|
13
|
+
</payment>
|