wepay-api 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +21 -0
- data/.travis.yml +6 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +118 -0
- data/Rakefile +7 -0
- data/lib/wepay-api.rb +2 -0
- data/lib/wepay.rb +23 -0
- data/lib/wepay/api.rb +27 -0
- data/lib/wepay/api/account.rb +86 -0
- data/lib/wepay/api/base.rb +25 -0
- data/lib/wepay/api/checkout.rb +68 -0
- data/lib/wepay/api/preapproval.rb +50 -0
- data/lib/wepay/api/subscription.rb +50 -0
- data/lib/wepay/api/subscription_plan.rb +59 -0
- data/lib/wepay/api/withdrawal.rb +41 -0
- data/lib/wepay/client.rb +63 -0
- data/lib/wepay/client/data.rb +31 -0
- data/lib/wepay/client/token.rb +30 -0
- data/lib/wepay/configuration.rb +34 -0
- data/lib/wepay/error.rb +28 -0
- data/lib/wepay/middleware.rb +44 -0
- data/lib/wepay/oauth.rb +32 -0
- data/lib/wepay/version.rb +3 -0
- data/spec/fixtures/vcr_cassettes/Wepay_Middleware/Wepay_Middleware_CheckStatus/raises_a_Wepay_ApiError_with_proper_error_type_message_and_code.yml +35 -0
- data/spec/fixtures/vcr_cassettes/wepay_account.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_account_add_bank.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_account_balance.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_account_create.yml +46 -0
- data/spec/fixtures/vcr_cassettes/wepay_account_delete.yml +48 -0
- data/spec/fixtures/vcr_cassettes/wepay_account_find.yml +43 -0
- data/spec/fixtures/vcr_cassettes/wepay_account_get_tax.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_account_modify.yml +49 -0
- data/spec/fixtures/vcr_cassettes/wepay_account_set_tax.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_checkout.yml +40 -0
- data/spec/fixtures/vcr_cassettes/wepay_checkout_cancel.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_checkout_capture.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_checkout_create.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_checkout_find.yml +51 -0
- data/spec/fixtures/vcr_cassettes/wepay_checkout_modify.yml +40 -0
- data/spec/fixtures/vcr_cassettes/wepay_checkout_refund.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_preapproval.yml +39 -0
- data/spec/fixtures/vcr_cassettes/wepay_preapproval_cancel.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_preapproval_create.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_preapproval_find.yml +39 -0
- data/spec/fixtures/vcr_cassettes/wepay_preapproval_modify.yml +39 -0
- data/spec/fixtures/vcr_cassettes/wepay_subscription.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_subscription_cancel.yml +36 -0
- data/spec/fixtures/vcr_cassettes/wepay_subscription_create.yml +48 -0
- data/spec/fixtures/vcr_cassettes/wepay_subscription_find.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_subscription_modify.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_subscription_plan.yml +39 -0
- data/spec/fixtures/vcr_cassettes/wepay_subscription_plan_create.yml +48 -0
- data/spec/fixtures/vcr_cassettes/wepay_subscription_plan_delete.yml +48 -0
- data/spec/fixtures/vcr_cassettes/wepay_subscription_plan_find.yml +39 -0
- data/spec/fixtures/vcr_cassettes/wepay_subscription_plan_get_button.yml +48 -0
- data/spec/fixtures/vcr_cassettes/wepay_subscription_plan_modify.yml +49 -0
- data/spec/fixtures/vcr_cassettes/wepay_withdrawal.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_withdrawal_create.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_withdrawal_find.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_withdrawal_modify.yml +38 -0
- data/spec/settings.yml.example +6 -0
- data/spec/spec_helper.rb +12 -0
- data/spec/support/matchers.rb +5 -0
- data/spec/support/rspec_helper.rb +30 -0
- data/spec/support/settings.rb +14 -0
- data/spec/support/vcr.rb +17 -0
- data/spec/wepay/api/account_spec.rb +110 -0
- data/spec/wepay/api/checkout_spec.rb +86 -0
- data/spec/wepay/api/preapproval_spec.rb +69 -0
- data/spec/wepay/api/subscription_plan_spec.rb +83 -0
- data/spec/wepay/api/subscription_spec.rb +65 -0
- data/spec/wepay/api/withdrawal_spec.rb +53 -0
- data/spec/wepay/api_spec.rb +9 -0
- data/spec/wepay/configuration_spec.rb +25 -0
- data/spec/wepay/middleware_spec.rb +21 -0
- data/spec/wepay/oauth_spec.rb +23 -0
- data/wepay-api.gemspec +29 -0
- metadata +273 -0
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://stage.wepayapi.com/v2/account
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"account_id":"123456"}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.8
|
12
|
+
Authorization:
|
13
|
+
- Bearer access_token
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- nginx
|
23
|
+
date:
|
24
|
+
- Thu, 05 Dec 2013 10:46:19 GMT
|
25
|
+
content-type:
|
26
|
+
- application/json
|
27
|
+
transfer-encoding:
|
28
|
+
- chunked
|
29
|
+
connection:
|
30
|
+
- close
|
31
|
+
strict-transport-security:
|
32
|
+
- max-age=2592000
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: '{"account_id":123456,"name":"Test account","state":"active","description":"abc","account_uri":"https:\/\/stage.wepay.com\/account\/123456","payment_limit":50000,"verification_state":"unverified","type":"personal","auto_withdrawal":false,"create_time":1386239642,"verification_uri":"https:\/\/stage.wepay.com\/api\/account_verify\/123456\/d953f41e"}'
|
36
|
+
http_version:
|
37
|
+
recorded_at: Thu, 05 Dec 2013 10:46:19 GMT
|
38
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://stage.wepayapi.com/v2/account/add_bank
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"account_id":"123456"}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.8
|
12
|
+
Authorization:
|
13
|
+
- Bearer access_token
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- nginx
|
23
|
+
date:
|
24
|
+
- Fri, 13 Dec 2013 08:11:12 GMT
|
25
|
+
content-type:
|
26
|
+
- application/json
|
27
|
+
transfer-encoding:
|
28
|
+
- chunked
|
29
|
+
connection:
|
30
|
+
- close
|
31
|
+
strict-transport-security:
|
32
|
+
- max-age=2592000
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: '{"account_id":123456,"add_bank_uri":"https:\/\/stage.wepay.com\/api\/account_add_bank\/123456\/65d2737e"}'
|
36
|
+
http_version:
|
37
|
+
recorded_at: Fri, 13 Dec 2013 08:11:12 GMT
|
38
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://stage.wepayapi.com/v2/account/balance
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"account_id":"123456"}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.8
|
12
|
+
Authorization:
|
13
|
+
- Bearer access_token
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- nginx
|
23
|
+
date:
|
24
|
+
- Fri, 13 Dec 2013 08:09:49 GMT
|
25
|
+
content-type:
|
26
|
+
- application/json
|
27
|
+
transfer-encoding:
|
28
|
+
- chunked
|
29
|
+
connection:
|
30
|
+
- close
|
31
|
+
strict-transport-security:
|
32
|
+
- max-age=2592000
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: '{"pending_balance":0,"available_balance":0,"pending_amount":0,"reserved_amount":0,"disputed_amount":0,"currency":"USD"}'
|
36
|
+
http_version:
|
37
|
+
recorded_at: Fri, 13 Dec 2013 08:09:49 GMT
|
38
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,46 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://stage.wepayapi.com/v2/account/create
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"name":"New+Account", "description":"Created by API"}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.8
|
12
|
+
Authorization:
|
13
|
+
- Bearer access_token
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- nginx
|
23
|
+
date:
|
24
|
+
- Thu, 05 Dec 2013 10:46:22 GMT
|
25
|
+
content-type:
|
26
|
+
- application/json
|
27
|
+
transfer-encoding:
|
28
|
+
- chunked
|
29
|
+
connection:
|
30
|
+
- close
|
31
|
+
set-cookie:
|
32
|
+
- wepay=28q0mcvp2c90sjn6bn43e7s0t5; path=/; domain=stage.wepay.com; secure; HttpOnly, wepay=28q0mcvp2c90sjn6bn43e7s0t5; path=/; domain=stage.wepay.com; secure; httponly
|
33
|
+
expires:
|
34
|
+
- Thu, 19 Nov 1981 08:52:00 GMT
|
35
|
+
cache-control:
|
36
|
+
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0
|
37
|
+
pragma:
|
38
|
+
- no-cache
|
39
|
+
strict-transport-security:
|
40
|
+
- max-age=2592000
|
41
|
+
body:
|
42
|
+
encoding: UTF-8
|
43
|
+
string: '{"account_id":123456,"account_uri":"https:\/\/stage.wepay.com\/account\/123456"}'
|
44
|
+
http_version:
|
45
|
+
recorded_at: Thu, 05 Dec 2013 10:46:22 GMT
|
46
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,48 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://stage.wepayapi.com/v2/account/delete
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"account_id":"123456"}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.8
|
12
|
+
Authorization:
|
13
|
+
- Bearer access_token
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- nginx
|
23
|
+
date:
|
24
|
+
- Fri, 13 Dec 2013 08:01:54 GMT
|
25
|
+
content-type:
|
26
|
+
- application/json
|
27
|
+
transfer-encoding:
|
28
|
+
- chunked
|
29
|
+
connection:
|
30
|
+
- close
|
31
|
+
set-cookie:
|
32
|
+
- wepay=u9p97k43btg1qi7j99od7n6s00; path=/; domain=stage.wepay.com; secure;
|
33
|
+
HttpOnly, wepay=u9p97k43btg1qi7j99od7n6s00; path=/; domain=stage.wepay.com;
|
34
|
+
secure; httponly
|
35
|
+
expires:
|
36
|
+
- Thu, 19 Nov 1981 08:52:00 GMT
|
37
|
+
cache-control:
|
38
|
+
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0
|
39
|
+
pragma:
|
40
|
+
- no-cache
|
41
|
+
strict-transport-security:
|
42
|
+
- max-age=2592000
|
43
|
+
body:
|
44
|
+
encoding: UTF-8
|
45
|
+
string: '{"account_id":123456,"state":"deleted"}'
|
46
|
+
http_version:
|
47
|
+
recorded_at: Fri, 13 Dec 2013 08:01:55 GMT
|
48
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,43 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://stage.wepayapi.com/v2/account/find
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.8
|
12
|
+
Authorization:
|
13
|
+
- Bearer access_token
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- nginx
|
23
|
+
date:
|
24
|
+
- Fri, 13 Dec 2013 07:52:42 GMT
|
25
|
+
content-type:
|
26
|
+
- application/json
|
27
|
+
transfer-encoding:
|
28
|
+
- chunked
|
29
|
+
connection:
|
30
|
+
- close
|
31
|
+
strict-transport-security:
|
32
|
+
- max-age=2592000
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: '[{"account_id":123456,"name":"ABC","state":"active","description":"This
|
36
|
+
account was created by ABC","account_uri":"https:\/\/stage.wepay.com\/account\/123456","payment_limit":"50000","verification_state":"unverified","type":"personal","auto_withdrawal":false,"create_time":1386243069,"verification_uri":"https:\/\/stage.wepay.com\/api\/account_verify\/123456\/65d2737e"},{"account_id":1245716361,"name":"Payment
|
37
|
+
account for ABC","state":"active","description":"This account was
|
38
|
+
created by ABC","account_uri":"https:\/\/stage.wepay.com\/account\/1245716361","payment_limit":"50000","verification_state":"unverified","type":"personal","auto_withdrawal":false,"create_time":1386242810,"verification_uri":"https:\/\/stage.wepay.com\/api\/account_verify\/1245716361\/65d2737e"},{"account_id":2067308492,"name":"New
|
39
|
+
Account","state":"active","description":"Created by API","account_uri":"https:\/\/stage.wepay.com\/account\/2067308492","payment_limit":"50000","verification_state":"unverified","type":"personal","auto_withdrawal":false,"create_time":1386240381,"verification_uri":"https:\/\/stage.wepay.com\/api\/account_verify\/2067308492\/65d2737e"},{"account_id":1234567,"name":"Test
|
40
|
+
account","state":"active","description":"abc","account_uri":"https:\/\/stage.wepay.com\/account\/1234567","payment_limit":"50000","verification_state":"unverified","type":"personal","auto_withdrawal":false,"create_time":1386239642,"verification_uri":"https:\/\/stage.wepay.com\/api\/account_verify\/1234567\/65d2737e"}]'
|
41
|
+
http_version:
|
42
|
+
recorded_at: Fri, 13 Dec 2013 07:52:42 GMT
|
43
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://stage.wepayapi.com/v2/account/get_tax
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"account_id":123456"}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.8
|
12
|
+
Authorization:
|
13
|
+
- Bearer access_token
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- nginx
|
23
|
+
date:
|
24
|
+
- Mon, 16 Dec 2013 03:05:17 GMT
|
25
|
+
content-type:
|
26
|
+
- application/json
|
27
|
+
transfer-encoding:
|
28
|
+
- chunked
|
29
|
+
connection:
|
30
|
+
- close
|
31
|
+
strict-transport-security:
|
32
|
+
- max-age=2592000
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: '[{"zip":94025,"state":"CA","country":"US","percent":10}]'
|
36
|
+
http_version:
|
37
|
+
recorded_at: Mon, 16 Dec 2013 03:05:19 GMT
|
38
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,49 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://stage.wepayapi.com/v2/account/modify
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"account_id":"123456", "name":"New Account Name"}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.8
|
12
|
+
Authorization:
|
13
|
+
- Bearer access_token
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- nginx
|
23
|
+
date:
|
24
|
+
- Fri, 13 Dec 2013 07:59:13 GMT
|
25
|
+
content-type:
|
26
|
+
- application/json
|
27
|
+
transfer-encoding:
|
28
|
+
- chunked
|
29
|
+
connection:
|
30
|
+
- close
|
31
|
+
set-cookie:
|
32
|
+
- wepay=1gnrmnud3ajgl9l0fheg14gbj5; path=/; domain=stage.wepay.com; secure;
|
33
|
+
HttpOnly, wepay=1gnrmnud3ajgl9l0fheg14gbj5; path=/; domain=stage.wepay.com;
|
34
|
+
secure; httponly
|
35
|
+
expires:
|
36
|
+
- Thu, 19 Nov 1981 08:52:00 GMT
|
37
|
+
cache-control:
|
38
|
+
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0
|
39
|
+
pragma:
|
40
|
+
- no-cache
|
41
|
+
strict-transport-security:
|
42
|
+
- max-age=2592000
|
43
|
+
body:
|
44
|
+
encoding: UTF-8
|
45
|
+
string: '{"account_id":123456,"name":"New Account Name","state":"active","description":"This
|
46
|
+
account was created by ABC","account_uri":"https:\/\/stage.wepay.com\/account\/123456","payment_limit":"50000","verification_state":"unverified","type":"personal","auto_withdrawal":false,"create_time":1386243069,"verification_uri":"https:\/\/stage.wepay.com\/api\/account_verify\/123456\/65d2737e"}'
|
47
|
+
http_version:
|
48
|
+
recorded_at: Fri, 13 Dec 2013 07:59:13 GMT
|
49
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://stage.wepayapi.com/v2/account/set_tax
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"account_id":"123456","taxes":[{"percent":10,"country":"US","state":"CA","zip":"94025"}]}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.8
|
12
|
+
Authorization:
|
13
|
+
- Bearer access_token
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- nginx
|
23
|
+
date:
|
24
|
+
- Mon, 16 Dec 2013 03:05:15 GMT
|
25
|
+
content-type:
|
26
|
+
- application/json
|
27
|
+
transfer-encoding:
|
28
|
+
- chunked
|
29
|
+
connection:
|
30
|
+
- close
|
31
|
+
strict-transport-security:
|
32
|
+
- max-age=2592000
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: '[{"zip":94025,"state":"CA","country":"US","percent":10}]'
|
36
|
+
http_version:
|
37
|
+
recorded_at: Mon, 16 Dec 2013 03:05:18 GMT
|
38
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,40 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://stage.wepayapi.com/v2/checkout
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"checkout_id":"1234567890"}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.8
|
12
|
+
Authorization:
|
13
|
+
- Bearer access_token
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- nginx
|
23
|
+
date:
|
24
|
+
- Wed, 04 Dec 2013 04:08:41 GMT
|
25
|
+
content-type:
|
26
|
+
- application/json
|
27
|
+
transfer-encoding:
|
28
|
+
- chunked
|
29
|
+
connection:
|
30
|
+
- close
|
31
|
+
strict-transport-security:
|
32
|
+
- max-age=2592000
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: '{"checkout_id":1234567890,"account_id":123456,"type":"GOODS","checkout_uri":"https:\/\/stage.wepay.com\/api\/checkout\/1234567890\/541d45b8","short_description":"test
|
36
|
+
checkout creation","currency":"USD","amount":10,"fee_payer":"payer","state":"expired","soft_descriptor":"WPY*Descriptor
|
37
|
+
","redirect_uri":"","auto_capture":false,"app_fee":0,"create_time":1386054830,"mode":"regular","amount_refunded":0,"amount_charged_back":0,"tax":0,"dispute_uri":""}'
|
38
|
+
http_version:
|
39
|
+
recorded_at: Wed, 04 Dec 2013 04:08:42 GMT
|
40
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://stage.wepayapi.com/v2/checkout/cancel
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"checkout_id":"1234567890", "cancel_reason":"no reason"}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.8
|
12
|
+
Authorization:
|
13
|
+
- Bearer access_token
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- nginx
|
23
|
+
date:
|
24
|
+
- Wed, 04 Dec 2013 05:21:57 GMT
|
25
|
+
content-type:
|
26
|
+
- application/json
|
27
|
+
transfer-encoding:
|
28
|
+
- chunked
|
29
|
+
connection:
|
30
|
+
- close
|
31
|
+
strict-transport-security:
|
32
|
+
- max-age=2592000
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: '{"checkout_id":1234567890,"state":"cancelled"}'
|
36
|
+
http_version:
|
37
|
+
recorded_at: Wed, 04 Dec 2013 05:21:57 GMT
|
38
|
+
recorded_with: VCR 2.8.0
|