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,36 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://stage.wepayapi.com/v2/subscription/cancel
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"subscription_id":123456789,"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: 500
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- nginx
|
23
|
+
date:
|
24
|
+
- Mon, 16 Dec 2013 05:35:02 GMT
|
25
|
+
content-type:
|
26
|
+
- text/html; charset=UTF-8
|
27
|
+
transfer-encoding:
|
28
|
+
- chunked
|
29
|
+
connection:
|
30
|
+
- close
|
31
|
+
body:
|
32
|
+
encoding: UTF-8
|
33
|
+
string: '{"subscription_id":123456789,"reason":"no reason"}'
|
34
|
+
http_version:
|
35
|
+
recorded_at: Mon, 16 Dec 2013 05:35:03 GMT
|
36
|
+
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/subscription/create
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"subscription_plan_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
|
+
- Mon, 16 Dec 2013 05:27:18 GMT
|
25
|
+
content-type:
|
26
|
+
- application/json
|
27
|
+
transfer-encoding:
|
28
|
+
- chunked
|
29
|
+
connection:
|
30
|
+
- close
|
31
|
+
set-cookie:
|
32
|
+
- wepay=qcdln8bi2vf413kl0mhr1lhh24; path=/; domain=stage.wepay.com; secure;
|
33
|
+
HttpOnly, wepay=qcdln8bi2vf413kl0mhr1lhh24; 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: '{"subscription_id":123456789,"subscription_uri":"https:\/\/stage.wepay.com\/subscriptions\/123456789\/b848e5cb"}'
|
46
|
+
http_version:
|
47
|
+
recorded_at: Mon, 16 Dec 2013 05:27:18 GMT
|
48
|
+
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/subscription/find
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"subscription_plan_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
|
+
- Mon, 16 Dec 2013 05:31:11 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: '[{"subscription_plan_id":1234567890,"subscription_id":123456789,"subscription_uri":"https:\/\/stage.wepay.com\/subscriptions\/123456789\/b848e5cb","payer_name":"","payer_email":"","currency":"USD","amount":10,"period":"yearly","quantity":1,"mode":"regular","app_fee":0,"fee_payer":"payee","state":"new","create_time":1387171638,"trial_days_remaining":0,"redirect_uri":"","callback_uri":"","reference_id":"","transition_expire_time":0,"transition_subscription_plan_id":0,"transition_prorate":false,"transition_quantity":0}]'
|
36
|
+
http_version:
|
37
|
+
recorded_at: Mon, 16 Dec 2013 05:31:11 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/subscription/modify
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"subscription_id":123456789,"callback_uri":"https://www.example.com/ipn/12345"}'
|
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 05:33:04 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: '{"subscription_plan_id":1234567890,"subscription_id":123456789,"subscription_uri":"https:\/\/stage.wepay.com\/subscriptions\/123456789\/b848e5cb","payer_name":"","payer_email":"","currency":"USD","amount":10,"period":"yearly","quantity":1,"mode":"regular","app_fee":0,"fee_payer":"payee","state":"new","create_time":1387171638,"trial_days_remaining":0,"redirect_uri":"","callback_uri":"https:\/\/www.example.com\/ipn\/12345","reference_id":"","transition_expire_time":0,"transition_subscription_plan_id":0,"transition_prorate":false,"transition_quantity":0}'
|
36
|
+
http_version:
|
37
|
+
recorded_at: Mon, 16 Dec 2013 05:33:04 GMT
|
38
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,39 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://stage.wepayapi.com/v2/subscription_plan
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"subscription_plan_id":123456789}'
|
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 05:12:53 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: '{"subscription_plan_id":123456789,"account_id":123456,"name":"Subscription
|
36
|
+
plan 1","short_description":"Short description","currency":"USD","amount":10,"period":"yearly","setup_fee":0,"app_fee":0,"fee_payer":"payee","state":"available","create_time":1387170574,"number_of_subscriptions":0,"callback_uri":"","trial_length":0,"reference_id":""}'
|
37
|
+
http_version:
|
38
|
+
recorded_at: Mon, 16 Dec 2013 05:12:53 GMT
|
39
|
+
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/subscription_plan/create
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"name":"Subscription plan 1","short_description":"Short description","amount":10,"period":"yearly","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 05:09:35 GMT
|
25
|
+
content-type:
|
26
|
+
- application/json
|
27
|
+
transfer-encoding:
|
28
|
+
- chunked
|
29
|
+
connection:
|
30
|
+
- close
|
31
|
+
set-cookie:
|
32
|
+
- wepay=5dst1ioehtgmglkf2m1k1blao1; path=/; domain=stage.wepay.com; secure;
|
33
|
+
HttpOnly, wepay=5dst1ioehtgmglkf2m1k1blao1; 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: '{"subscription_plan_id":123456789}'
|
46
|
+
http_version:
|
47
|
+
recorded_at: Mon, 16 Dec 2013 05:09:36 GMT
|
48
|
+
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/subscription_plan/delete
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"subscription_plan_id":123456789,"reason":"no resson"}'
|
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 05:19:31 GMT
|
25
|
+
content-type:
|
26
|
+
- application/json
|
27
|
+
transfer-encoding:
|
28
|
+
- chunked
|
29
|
+
connection:
|
30
|
+
- close
|
31
|
+
set-cookie:
|
32
|
+
- wepay=d341bp6darief58quog2unhe64; path=/; domain=stage.wepay.com; secure;
|
33
|
+
HttpOnly, wepay=d341bp6darief58quog2unhe64; 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: '{"subscription_plan_id":123456789,"state":"Deleted"}'
|
46
|
+
http_version:
|
47
|
+
recorded_at: Mon, 16 Dec 2013 05:19:31 GMT
|
48
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,39 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://stage.wepayapi.com/v2/subscription_plan/find
|
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 05:13: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: '[{"subscription_plan_id":123456789,"account_id":123456,"name":"Subscription
|
36
|
+
plan 1","short_description":"Short description","currency":"USD","amount":10,"period":"yearly","setup_fee":0,"app_fee":0,"fee_payer":"payee","state":"available","create_time":1387170574,"number_of_subscriptions":0,"callback_uri":"","trial_length":0,"reference_id":""}]'
|
37
|
+
http_version:
|
38
|
+
recorded_at: Mon, 16 Dec 2013 05:13:57 GMT
|
39
|
+
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/subscription_plan/get_button
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"subscription_plan_id":123456789,"button_type":"subscription_plan","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 05:17:33 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: '{"subscription_plan_id":123456789,"subscription_button_code":"<a class=\"wepay-widget-button
|
36
|
+
wepay-green\" id=\"wepay_widget_anchor_52ae8cedcd451\" href=\"https:\/\/stage.wepay.com\/subscribe\/123456\/plan\/123456789\">Subscribe<\/a>\n<script
|
37
|
+
type=\"text\/javascript\">\n\tvar WePay = WePay || {};\n\tWePay.load_widgets
|
38
|
+
= WePay.load_widgets || function() { };\n\tWePay.widgets = WePay.widgets ||
|
39
|
+
[];\n\tWePay.widgets.push( {\n\t\tobject_id: 123456789,\n\t\twidget_type:
|
40
|
+
\"subscription_plan\",\n\t\tanchor_id: \"wepay_widget_anchor_52ae8cedcd451\",\n\t\twidget_options:
|
41
|
+
{\n\t\t\tgroup_id: 123456\n\t\t}\n\t});\n\tif (!WePay.script) {\n\t\tWePay.script
|
42
|
+
= document.createElement(''script'');WePay.script.type = ''text\/javascript'';WePay.script.async
|
43
|
+
= <USING_STAGE>;\n\t\tWePay.script.src = ''https:\/\/stage.wepay.com\/min\/js\/widgets.v2.js'';\n\t\tvar
|
44
|
+
s = document.getElementsByTagName(''script'')[0]; s.parentNode.insertBefore(WePay.script,
|
45
|
+
s);\n\t} else if (WePay.load_widgets) {\n\t\tWePay.load_widgets();\n\t}\n<\/script>\n"}'
|
46
|
+
http_version:
|
47
|
+
recorded_at: Mon, 16 Dec 2013 05:17:34 GMT
|
48
|
+
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/subscription_plan/modify
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"subscription_plan_id":123456789,"callback_uri":"https://www.example.com/ipn/12345"}'
|
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 05:14:51 GMT
|
25
|
+
content-type:
|
26
|
+
- application/json
|
27
|
+
transfer-encoding:
|
28
|
+
- chunked
|
29
|
+
connection:
|
30
|
+
- close
|
31
|
+
set-cookie:
|
32
|
+
- wepay=86d5vn00o17olnkdbsavoq8tu0; path=/; domain=stage.wepay.com; secure;
|
33
|
+
HttpOnly, wepay=86d5vn00o17olnkdbsavoq8tu0; 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: '{"subscription_plan_id":123456789,"account_id":123456,"name":"Subscription
|
46
|
+
plan 1","short_description":"Short description","currency":"USD","amount":10,"period":"yearly","setup_fee":0,"app_fee":0,"fee_payer":"payee","state":"available","create_time":1387170574,"number_of_subscriptions":0,"callback_uri":"https:\/\/www.example.com\/ipn\/12345","trial_length":0,"reference_id":""}'
|
47
|
+
http_version:
|
48
|
+
recorded_at: Mon, 16 Dec 2013 05:14:51 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/withdrawal
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"withdrawal_id":123456789}'
|
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 04:46:37 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: '{"withdrawal_id":123456789,"state":"new","withdrawal_uri":"https:\/\/stage.wepay.com\/api\/withdrawal\/123456789\/f57129c710db1bfb69ce042c938cd0b9","callback_uri":null,"redirect_uri":"\/status\/withdrawal_complete\/123456789","create_time":1387169032,"capture_time":0,"recipient_name":"","recipient_confirmed":false,"type":"ach","amount":0,"note":"","account_id":123456}'
|
36
|
+
http_version:
|
37
|
+
recorded_at: Mon, 16 Dec 2013 04:46:37 GMT
|
38
|
+
recorded_with: VCR 2.8.0
|