espago 0.1.8 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +15 -8
- data/Gemfile +2 -0
- data/Gemfile.lock +254 -130
- data/README.md +13 -15
- data/app/views/espago_secure_web_page/_form.html.haml +3 -2
- data/espago.gemspec +13 -12
- data/lib/espago/api_connection/charges_complete_post.rb +1 -1
- data/lib/espago/api_connection/refunds_post.rb +9 -0
- data/lib/espago/api_connection/secure_web_page_register_post.rb +9 -0
- data/lib/espago/api_connection/tokens_post.rb +1 -1
- data/lib/espago/api_connection/visacheckout_post.rb +9 -0
- data/lib/espago/api_connection.rb +4 -2
- data/lib/espago/client.rb +5 -6
- data/lib/espago/secure_web_page.rb +13 -10
- data/lib/espago/version.rb +1 -1
- data/spec/espago/api_connection_spec.rb +1 -1
- data/spec/espago/back_request_spec.rb +11 -11
- data/spec/espago/client_spec.rb +8 -8
- data/spec/espago/error_spec.rb +4 -3
- data/spec/espago/response_spec.rb +10 -10
- data/spec/espago/router_spec.rb +5 -6
- data/spec/features/apis_spec.rb +2 -2
- data/spec/features/charges_spec.rb +19 -19
- data/spec/features/charges_spec_with_params_spec.rb +22 -22
- data/spec/features/clients_spec.rb +28 -28
- data/spec/features/dcc_decision_spec.rb +7 -7
- data/spec/features/invoice_items_spec.rb +9 -9
- data/spec/features/invoices_spec.rb +6 -6
- data/spec/features/line_items_spec.rb +5 -5
- data/spec/features/plans_spec.rb +14 -14
- data/spec/features/secure_web_page_register_spec.rb +23 -0
- data/spec/features/subscriptions_spec.rb +13 -13
- data/spec/features/tokens_spec.rb +15 -16
- data/spec/fixtures/cassettes/api_2.yml +1 -1
- data/spec/fixtures/cassettes/api_3.yml +1 -1
- data/spec/fixtures/cassettes/charges_complete.yml +1 -1
- data/spec/fixtures/cassettes/charges_complete_deprecation.yml +1 -1
- data/spec/fixtures/cassettes/charges_destroy.yml +1 -1
- data/spec/fixtures/cassettes/charges_get.yml +1 -1
- data/spec/fixtures/cassettes/charges_get_pay_mTOngouLTJWZ0w.yml +3 -1
- data/spec/fixtures/cassettes/charges_post.yml +3 -1
- data/spec/fixtures/cassettes/charges_refund.yml +3 -1
- data/spec/fixtures/cassettes/clients_authorize.yml +3 -1
- data/spec/fixtures/cassettes/clients_delete.yml +3 -1
- data/spec/fixtures/cassettes/clients_get.yml +3 -1
- data/spec/fixtures/cassettes/clients_get_cli_w0Se2smYwyQ0Uw.yml +3 -1
- data/spec/fixtures/cassettes/clients_invoices.yml +3 -1
- data/spec/fixtures/cassettes/clients_post.yml +3 -1
- data/spec/fixtures/cassettes/clients_put.yml +3 -1
- data/spec/fixtures/cassettes/clients_subscriptions.yml +3 -1
- data/spec/fixtures/cassettes/dcc_decision_post.yml +3 -1
- data/spec/fixtures/cassettes/error_400.yml +3 -1
- data/spec/fixtures/cassettes/error_401.yml +3 -1
- data/spec/fixtures/cassettes/error_500.yml +3 -1
- data/spec/fixtures/cassettes/invoice_items_delete_ii_WDzszvhTshe78Xd.yml +3 -1
- data/spec/fixtures/cassettes/invoice_items_get_ii_5LS-YR7S1QaJBl3.yml +3 -1
- data/spec/fixtures/cassettes/invoice_items_post_ii_5LS-YR7S1QaJBl3.yml +3 -1
- data/spec/fixtures/cassettes/invoices_get.yml +3 -1
- data/spec/fixtures/cassettes/invoices_get_in_tUCMhwlg2nkvAaL.yml +3 -1
- data/spec/fixtures/cassettes/line_items_get.yml +1 -1
- data/spec/fixtures/cassettes/plans_delete.yml +1 -1
- data/spec/fixtures/cassettes/plans_get.yml +1 -1
- data/spec/fixtures/cassettes/plans_get_pl_12345.yml +1 -1
- data/spec/fixtures/cassettes/plans_post.yml +3 -1
- data/spec/fixtures/cassettes/plans_put.yml +3 -1
- data/spec/fixtures/cassettes/secure_web_page_register_post.yml +56 -0
- data/spec/fixtures/cassettes/subscriptions_delete_sub_8yYuCBKdywr7e2.yml +3 -1
- data/spec/fixtures/cassettes/subscriptions_get.yml +1 -1
- data/spec/fixtures/cassettes/subscriptions_get_sub_8yYuCBKdywr7e2.yml +1 -1
- data/spec/fixtures/cassettes/subscriptions_post.yml +3 -1
- data/spec/fixtures/cassettes/tokens_get.yml +3 -1
- data/spec/fixtures/cassettes/tokens_post.yml +3 -1
- data/spec/spec_helper.rb +4 -7
- metadata +58 -23
@@ -5,18 +5,18 @@ describe 'Espago.invoices' do
|
|
5
5
|
it "should get list of invoices" do
|
6
6
|
VCR.use_cassette('invoices get') do
|
7
7
|
response = Espago.invoices :get
|
8
|
-
response.count.
|
9
|
-
response.invoices.size.
|
8
|
+
expect(response.count).to eq(1)
|
9
|
+
expect(response.invoices.size).to eq(1)
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
13
|
it "should get info abount invoices" do
|
14
14
|
VCR.use_cassette('invoices get in_tUCMhwlg2nkvAaL') do
|
15
15
|
response = Espago.invoices :get,{invoice_id:'in_tUCMhwlg2nkvAaL'}
|
16
|
-
response.paid.
|
17
|
-
response.client.
|
18
|
-
response.amount.
|
19
|
-
response.created_at.
|
16
|
+
expect(response.paid).to eq(true)
|
17
|
+
expect(response.client).to eq('cli_90Pi6Jf0ndl_PP')
|
18
|
+
expect(response.amount).to eq('123.45')
|
19
|
+
expect(response.created_at).to eq Time.at(1417030497)
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
@@ -5,11 +5,11 @@ describe 'Espago.line_items' do
|
|
5
5
|
it "should get info abount line_items" do
|
6
6
|
VCR.use_cassette('line_items get') do
|
7
7
|
response = Espago.line_items :get,{invoice_id:'in_tUCMhwlg2nkvAaL'}
|
8
|
-
response.count.
|
9
|
-
response.invoice_items[0]['client'].
|
10
|
-
response.invoice_items[0]['amount'].
|
11
|
-
response.invoice_items[0]['description'].
|
12
|
-
response.invoice_items[0]['created_at'].
|
8
|
+
expect(response.count).to eq(1)
|
9
|
+
expect(response.invoice_items[0]['client']).to eq('cli_90Pi6Jf0ndl_PP')
|
10
|
+
expect(response.invoice_items[0]['amount']).to eq('123.45')
|
11
|
+
expect(response.invoice_items[0]['description']).to eq('Golden plan')
|
12
|
+
expect(response.invoice_items[0]['created_at']).to eq(1417030496)
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
data/spec/features/plans_spec.rb
CHANGED
@@ -5,19 +5,19 @@ describe 'Espago.plans' do
|
|
5
5
|
it "should get list of plans" do
|
6
6
|
VCR.use_cassette('plans get') do
|
7
7
|
response = Espago.plans :get
|
8
|
-
response.count.
|
9
|
-
response.plans.size.
|
8
|
+
expect(response.count).to eq(1)
|
9
|
+
expect(response.plans.size).to eq(1)
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
13
|
it "should get info abount plans" do
|
14
14
|
VCR.use_cassette('plans get pl_12345') do
|
15
15
|
response = Espago.plans :get,{plan_id:'pl_12345'}
|
16
|
-
response.description.
|
17
|
-
response.period.
|
18
|
-
response.period_unit.
|
19
|
-
response.amount.
|
20
|
-
response.created_at.
|
16
|
+
expect(response.description).to eq('Golden plan')
|
17
|
+
expect(response.period).to eq(5)
|
18
|
+
expect(response.period_unit).to eq('days')
|
19
|
+
expect(response.amount).to eq(123.45)
|
20
|
+
expect(response.created_at).to eq Time.at(1413807490)
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
@@ -29,11 +29,11 @@ describe 'Espago.plans' do
|
|
29
29
|
currency: 'pln',
|
30
30
|
description: 'Test Plan'
|
31
31
|
}
|
32
|
-
response.status.
|
33
|
-
response.description.
|
34
|
-
response.period.
|
35
|
-
response.period_unit.
|
36
|
-
response.amount.
|
32
|
+
expect(response.status).to eq(201)
|
33
|
+
expect(response.description).to eq('Test Plan')
|
34
|
+
expect(response.period).to eq(14)
|
35
|
+
expect(response.period_unit).to eq('day')
|
36
|
+
expect(response.amount).to eq('49.99')
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
@@ -47,14 +47,14 @@ describe 'Espago.plans' do
|
|
47
47
|
currency: 'pln',
|
48
48
|
description: 'Test Plan'
|
49
49
|
}
|
50
|
-
response.status.
|
50
|
+
expect(response.status).to eq(204)
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
54
|
it "should get 204 after deleted plan" do
|
55
55
|
VCR.use_cassette('plans delete') do
|
56
56
|
response = Espago.plans :delete, { plan_id: 'pl_XczKHr_42CRiKXZ'}
|
57
|
-
response.status.
|
57
|
+
expect(response.status).to eq(204)
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'Espago.secure_web_page_register' do
|
4
|
+
it 'should get params from new charge' do
|
5
|
+
VCR.use_cassette('secure_web_page_register post') do
|
6
|
+
Espago.app_id = 'app12345'
|
7
|
+
Espago.app_password = 'Api12345'
|
8
|
+
Espago.api_version = '3'
|
9
|
+
response = Espago.secure_web_page_register :post,
|
10
|
+
amount: '49.99',
|
11
|
+
currency: 'PLN',
|
12
|
+
description: 'Test12345',
|
13
|
+
client_description: 'Jan Kowalski',
|
14
|
+
kind: 'sale'
|
15
|
+
expect(response.status).to eq(201)
|
16
|
+
expect(response.state).to eq('new')
|
17
|
+
expect(response.currency).to eq('PLN')
|
18
|
+
expect(response.description).to eq('Test12345')
|
19
|
+
expect(response.id).to eq('pay_770swCpLvm5dzrqk')
|
20
|
+
expect(response.created_at).to eq Time.at(1_555_344_189)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -5,37 +5,37 @@ describe 'Espago.subscriptions' do
|
|
5
5
|
it "should get list of subscriptions" do
|
6
6
|
VCR.use_cassette('subscriptions get') do
|
7
7
|
response = Espago.subscriptions :get
|
8
|
-
response.count.
|
9
|
-
response.subscriptions.size.
|
8
|
+
expect(response.count).to eq(1)
|
9
|
+
expect(response.subscriptions.size).to eq(1)
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
13
|
it "should get info abount subscriptions" do
|
14
14
|
VCR.use_cassette('subscriptions get sub_8yYuCBKdywr7e2') do
|
15
15
|
response = Espago.subscriptions :get,{subscription_id:'sub_8yYuCBKdywr7e2'}
|
16
|
-
response.status.
|
17
|
-
response.state.
|
18
|
-
response.client.
|
19
|
-
response.plan.
|
20
|
-
response.last_invoice.
|
16
|
+
expect(response.status).to eq(200)
|
17
|
+
expect(response.state).to eq('active')
|
18
|
+
expect(response.client).to eq('cli_90Pi6Jf0ndl_PP')
|
19
|
+
expect(response.plan).to eq('pl_12345')
|
20
|
+
expect(response.last_invoice).to be_kind_of(Hash)
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
24
|
it "should get params from new plan" do
|
25
25
|
VCR.use_cassette('subscriptions post') do
|
26
26
|
response = Espago.subscriptions :post,{ plan:'pl_12345',client:'cli_90Pi6Jf0ndl_PP'}
|
27
|
-
response.status.
|
28
|
-
response.state.
|
29
|
-
response.client.
|
30
|
-
response.plan.
|
31
|
-
response.last_invoice.
|
27
|
+
expect(response.status).to eq(201)
|
28
|
+
expect(response.state).to eq('active')
|
29
|
+
expect(response.client).to eq('cli_90Pi6Jf0ndl_PP')
|
30
|
+
expect(response.plan).to eq('pl_12345')
|
31
|
+
expect(response.last_invoice).to be_kind_of(Hash)
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
35
|
it "should get info after deleted subscription" do
|
36
36
|
VCR.use_cassette('subscriptions delete sub_8yYuCBKdywr7e2') do
|
37
37
|
response = Espago.subscriptions :delete,{subscription_id:'sub_8yYuCBKdywr7e2'}
|
38
|
-
response.status.
|
38
|
+
expect(response.status).to eq(204)
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
1
|
+
require 'spec_helper'
|
2
2
|
|
3
3
|
describe 'Espago.tokens' do
|
4
4
|
|
@@ -14,27 +14,26 @@ describe 'Espago.tokens' do
|
|
14
14
|
month:'2'
|
15
15
|
},
|
16
16
|
}
|
17
|
-
response.status.
|
18
|
-
response.id.
|
19
|
-
response.used.
|
20
|
-
response.created_at.
|
21
|
-
response.card['company'].
|
22
|
-
response.card['last4'].
|
23
|
-
response.card['authorized'].
|
17
|
+
expect(response.status).to eq(201)
|
18
|
+
expect(response.id).to_not eq(nil)
|
19
|
+
expect(response.used).to eq(false)
|
20
|
+
expect(response.created_at).to eq Time.at(1417029320)
|
21
|
+
expect(response.card['company']).to eq('VI')
|
22
|
+
expect(response.card['last4']).to eq('4242')
|
23
|
+
expect(response.card['authorized']).to eq(nil)
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
27
|
it "should get token params" do
|
28
28
|
VCR.use_cassette('tokens get') do
|
29
29
|
response = Espago.tokens :get, {token_id: 'cc_166YDMhrVcemFb3'}
|
30
|
-
response.status.
|
31
|
-
response.id.
|
32
|
-
response.used.
|
33
|
-
response.created_at.
|
34
|
-
response.card['company'].
|
35
|
-
response.card['last4'].
|
36
|
-
response.card['authorized'].
|
30
|
+
expect(response.status).to eq(200)
|
31
|
+
expect(response.id).to eq('cc_166YDMhrVcemFb3')
|
32
|
+
expect(response.used).to eq(false)
|
33
|
+
expect(response.created_at).to eq Time.at(1417029320)
|
34
|
+
expect(response.card['company']).to eq('VI')
|
35
|
+
expect(response.card['last4']).to eq('4242')
|
36
|
+
expect(response.card['authorized']).to eq(nil)
|
37
37
|
end
|
38
38
|
end
|
39
|
-
|
40
39
|
end
|
@@ -2,13 +2,15 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://sandbox.espago.com/api/charges/pay_mTOngouLTJWZ0w
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
11
|
- application/vnd.espago.v2+json
|
12
|
+
Authorization:
|
13
|
+
- Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
|
12
14
|
Accept-Encoding:
|
13
15
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
16
|
User-Agent:
|
@@ -2,13 +2,15 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: https://
|
5
|
+
uri: https://sandbox.espago.com/api/charges
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: amount=49.99¤cy=PLN&description=Test12345&card%5Bfirst_name%5D=Jan&card%5Blast_name%5D=Kowalski&card%5Bnumber%5D=4242424242424242&card%5Bverification_value%5D=123&card%5Byear%5D=2015&card%5Bmonth%5D=2
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
11
|
- application/vnd.espago.v2+json
|
12
|
+
Authorization:
|
13
|
+
- Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
|
12
14
|
Content-Type:
|
13
15
|
- application/x-www-form-urlencoded
|
14
16
|
Accept-Encoding:
|
@@ -2,13 +2,15 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: https://
|
5
|
+
uri: https://sandbox.espago.com/api/charges/pay_lQGyIon5qG59O5/refund
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: charge_id=pay_lQGyIon5qG59O5
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
11
|
- application/vnd.espago.v2+json
|
12
|
+
Authorization:
|
13
|
+
- Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
|
12
14
|
Content-Type:
|
13
15
|
- application/x-www-form-urlencoded
|
14
16
|
Accept-Encoding:
|
@@ -2,13 +2,15 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: https://
|
5
|
+
uri: https://sandbox.espago.com/api/clients/cli_w0Se2smYwyQ0Uw/authorize
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
11
|
- application/vnd.espago.v2+json
|
12
|
+
Authorization:
|
13
|
+
- Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
|
12
14
|
Content-Length:
|
13
15
|
- '0'
|
14
16
|
Accept-Encoding:
|
@@ -2,13 +2,15 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: delete
|
5
|
-
uri: https://
|
5
|
+
uri: https://sandbox.espago.com/api/clients/cli_5rDoJyvKDM4RbM
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
11
|
- application/vnd.espago.v2+json
|
12
|
+
Authorization:
|
13
|
+
- Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
|
12
14
|
Accept-Encoding:
|
13
15
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
16
|
User-Agent:
|
@@ -2,13 +2,15 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://sandbox.espago.com/api/clients
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
11
|
- application/vnd.espago.v2+json
|
12
|
+
Authorization:
|
13
|
+
- Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
|
12
14
|
Accept-Encoding:
|
13
15
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
16
|
User-Agent:
|
@@ -2,13 +2,15 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://sandbox.espago.com/api/clients/cli_w0Se2smYwyQ0Uw
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
11
|
- application/vnd.espago.v2+json
|
12
|
+
Authorization:
|
13
|
+
- Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
|
12
14
|
Accept-Encoding:
|
13
15
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
16
|
User-Agent:
|
@@ -2,13 +2,15 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://sandbox.espago.com/api/clients/cli_w0Se2smYwyQ0Uw/invoices
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
11
|
- application/vnd.espago.v2+json
|
12
|
+
Authorization:
|
13
|
+
- Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
|
12
14
|
Accept-Encoding:
|
13
15
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
16
|
User-Agent:
|
@@ -2,13 +2,15 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: https://
|
5
|
+
uri: https://sandbox.espago.com/api/clients
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: card%5Bfirst_name%5D=Jan&card%5Blast_name%5D=Kowalski&card%5Bnumber%5D=4242424242424242&card%5Bverification_value%5D=123&card%5Byear%5D=2015&card%5Bmonth%5D=2
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
11
|
- application/vnd.espago.v2+json
|
12
|
+
Authorization:
|
13
|
+
- Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
|
12
14
|
Content-Type:
|
13
15
|
- application/x-www-form-urlencoded
|
14
16
|
Accept-Encoding:
|
@@ -2,13 +2,15 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: put
|
5
|
-
uri: https://
|
5
|
+
uri: https://sandbox.espago.com/api/clients/cli_w0Se2smYwyQ0Uw
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: client_id=cli_w0Se2smYwyQ0Uw&card%5Bfirst_name%5D=Jan&card%5Blast_name%5D=Kowalski&card%5Bnumber%5D=4242424242424242&card%5Bverification_value%5D=123&card%5Byear%5D=2015&card%5Bmonth%5D=2
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
11
|
- application/vnd.espago.v2+json
|
12
|
+
Authorization:
|
13
|
+
- Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
|
12
14
|
Content-Type:
|
13
15
|
- application/x-www-form-urlencoded
|
14
16
|
Accept-Encoding:
|
@@ -2,13 +2,15 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://sandbox.espago.com/api/clients/cli_w0Se2smYwyQ0Uw/subscriptions
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
11
|
- application/vnd.espago.v2+json
|
12
|
+
Authorization:
|
13
|
+
- Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
|
12
14
|
Accept-Encoding:
|
13
15
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
16
|
User-Agent:
|
@@ -2,13 +2,15 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: https://
|
5
|
+
uri: https://sandbox.espago.com/api/charges/pay_mTOngouLTJWZ0w/dcc_decision
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: decision=Y
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
11
|
- application/vnd.espago.v2+json
|
12
|
+
Authorization:
|
13
|
+
- Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
|
12
14
|
Content-Type:
|
13
15
|
- application/x-www-form-urlencoded
|
14
16
|
Accept-Encoding:
|
@@ -2,13 +2,15 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://sandbox.espago.com/api/plans
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
11
|
- application/vnd.espago.v2+json
|
12
|
+
Authorization:
|
13
|
+
- Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
|
12
14
|
Accept-Encoding:
|
13
15
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
16
|
User-Agent:
|
@@ -2,13 +2,15 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://sandbox.espago.com/api/plans
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
11
|
- application/vnd.espago.v2+json
|
12
|
+
Authorization:
|
13
|
+
- Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
|
12
14
|
Accept-Encoding:
|
13
15
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
16
|
User-Agent:
|
@@ -2,13 +2,15 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://sandbox.espago.com/api/plans
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
11
|
- application/vnd.espago.v2+json
|
12
|
+
Authorization:
|
13
|
+
- Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
|
12
14
|
Accept-Encoding:
|
13
15
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
16
|
User-Agent:
|
@@ -2,13 +2,15 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: delete
|
5
|
-
uri: https://
|
5
|
+
uri: https://sandbox.espago.com/api/invoice_items/ii_WDzszvhTshe78Xd
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
11
|
- application/vnd.espago.v2+json
|
12
|
+
Authorization:
|
13
|
+
- Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
|
12
14
|
Accept-Encoding:
|
13
15
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
16
|
User-Agent:
|
@@ -2,13 +2,15 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://sandbox.espago.com/api/invoice_items/ii_5LS-YR7S1QaJBl3
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
11
|
- application/vnd.espago.v2+json
|
12
|
+
Authorization:
|
13
|
+
- Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
|
12
14
|
Accept-Encoding:
|
13
15
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
16
|
User-Agent:
|
@@ -2,13 +2,15 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: https://
|
5
|
+
uri: https://sandbox.espago.com/api/invoice_items
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: amount=49.99¤cy=pln&date=1417126942&description=Test+invoice+items&client=cli_90Pi6Jf0ndl_PP
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
11
|
- application/vnd.espago.v2+json
|
12
|
+
Authorization:
|
13
|
+
- Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
|
12
14
|
Content-Type:
|
13
15
|
- application/x-www-form-urlencoded
|
14
16
|
Accept-Encoding:
|
@@ -2,13 +2,15 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://sandbox.espago.com/api/invoices
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
11
|
- application/vnd.espago.v2+json
|
12
|
+
Authorization:
|
13
|
+
- Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
|
12
14
|
Accept-Encoding:
|
13
15
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
16
|
User-Agent:
|
@@ -2,13 +2,15 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://sandbox.espago.com/api/invoices/in_tUCMhwlg2nkvAaL
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
Accept:
|
11
11
|
- application/vnd.espago.v2+json
|
12
|
+
Authorization:
|
13
|
+
- Basic YXBwX2lkX3Rlc3Q6YXBwX3Bhc3N3b3JkX3Rlc3Q=
|
12
14
|
Accept-Encoding:
|
13
15
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
16
|
User-Agent:
|