yandex-money-sdk 0.11.0 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +9 -6
- data/.yardopts +1 -0
- data/CHANGELOG.md +33 -1
- data/README.md +22 -26
- data/constants.rb.enc +0 -0
- data/lib/yandex_money/api.rb +3 -185
- data/lib/yandex_money/api/version.rb +1 -1
- data/lib/yandex_money/config.rb +26 -0
- data/lib/yandex_money/exceptions.rb +14 -4
- data/lib/yandex_money/external_payment.rb +78 -0
- data/lib/yandex_money/wallet.rb +215 -0
- data/spec/account_info_spec.rb +15 -14
- data/spec/auth_spec.rb +14 -41
- data/spec/cards_spec.rb +20 -18
- data/spec/config_spec.rb +50 -0
- data/spec/exceptions_spec.rb +55 -0
- data/spec/fixtures/vcr_cassettes/accept_incoming_transfer_with_protection_code.yml +3 -5
- data/spec/fixtures/vcr_cassettes/accept_incoming_transfer_with_protection_code_with_wrong_code.yml +6 -8
- data/spec/fixtures/vcr_cassettes/get_account_info.yml +5 -5
- data/spec/fixtures/vcr_cassettes/get_instance_id_fail.yml +2 -840
- data/spec/fixtures/vcr_cassettes/get_instance_id_success.yml +4 -840
- data/spec/fixtures/vcr_cassettes/get_operation_details.yml +199 -16
- data/spec/fixtures/vcr_cassettes/get_operation_history.yml +149 -150
- data/spec/fixtures/vcr_cassettes/get_operation_history_with_params.yml +9 -9
- data/spec/fixtures/vcr_cassettes/get_token_from_authorization_code.yml +15 -842
- data/spec/fixtures/vcr_cassettes/get_wrong_operation_details.yml +4 -4
- data/spec/fixtures/vcr_cassettes/init_without_client_secret.yml +719 -711
- data/spec/fixtures/vcr_cassettes/initialize_with_token.yml +7 -878
- data/spec/fixtures/vcr_cassettes/insufficient_scope_error.yml +40 -0
- data/spec/fixtures/vcr_cassettes/invalid_request_error.yml +40 -0
- data/spec/fixtures/vcr_cassettes/process_external_payment.yml +80 -6
- data/spec/fixtures/vcr_cassettes/process_payment_to_an_account_with_failure.yml +4 -6
- data/spec/fixtures/vcr_cassettes/reject_payment.yml +3 -5
- data/spec/fixtures/vcr_cassettes/reject_payment_fail.yml +3 -5
- data/spec/fixtures/vcr_cassettes/request_external_payment.yml +43 -10
- data/spec/fixtures/vcr_cassettes/request_payment_to_an_account_with_failure.yml +5 -7
- data/spec/fixtures/vcr_cassettes/success_process_payment_to_an_account.yml +6 -8
- data/spec/fixtures/vcr_cassettes/success_request_payment_to_an_account.yml +7 -9
- data/spec/fixtures/vcr_cassettes/unauthorized_error.yml +41 -0
- data/spec/fixtures/vcr_cassettes/unauthorized_exception.yml +3 -3
- data/spec/logger_spec.rb +0 -18
- data/spec/payments_spec.rb +20 -30
- data/spec/spec_helper.rb +12 -3
- data/spec/support/constants.example.rb +13 -0
- data/yandex-money-sdk.gemspec +2 -1
- metadata +42 -18
- data/lib/yandex_money/logger/default.rb +0 -17
- data/lib/yandex_money/logger/empty.rb +0 -10
- data/spec/fixtures/vcr_cassettes/init_with_client_secret.yml +0 -839
- data/spec/fixtures/vcr_cassettes/obtain_token_for_get_account_info.yml +0 -877
- data/spec/fixtures/vcr_cassettes/obtain_token_for_making_payments_to_an_account.yml +0 -875
- data/spec/fixtures/vcr_cassettes/obtain_token_for_payments_from_bank_cards_without_authorization.yml +0 -839
- data/spec/fixtures/vcr_cassettes/token_with_client_secret.yml +0 -875
- data/spec/support/constants.rb +0 -6
@@ -0,0 +1,40 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://money.yandex.ru/api/request-payment
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: pattern_id=p2p&to=example%40example.com&amount=5
|
9
|
+
headers:
|
10
|
+
Authorization:
|
11
|
+
- Bearer <ACCESS_TOKEN>
|
12
|
+
Content-Type:
|
13
|
+
- application/x-www-form-urlencoded
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 403
|
17
|
+
message: Forbidden
|
18
|
+
headers:
|
19
|
+
Server:
|
20
|
+
- nginx
|
21
|
+
Date:
|
22
|
+
- Fri, 21 Nov 2014 07:38:43 GMT
|
23
|
+
Content-Type:
|
24
|
+
- application/json;charset=UTF-8
|
25
|
+
Content-Length:
|
26
|
+
- '0'
|
27
|
+
Connection:
|
28
|
+
- keep-alive
|
29
|
+
Keep-Alive:
|
30
|
+
- timeout=120
|
31
|
+
Cache-Control:
|
32
|
+
- no-cache
|
33
|
+
Www-Authenticate:
|
34
|
+
- Bearer error="insufficient_scope"
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: ''
|
38
|
+
http_version:
|
39
|
+
recorded_at: Fri, 21 Nov 2014 07:38:45 GMT
|
40
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,40 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://money.yandex.ru/api/request-payment
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Authorization:
|
11
|
+
- Bearer WRONG TOKEN
|
12
|
+
Content-Type:
|
13
|
+
- application/x-www-form-urlencoded
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 400
|
17
|
+
message: Bad Request
|
18
|
+
headers:
|
19
|
+
Server:
|
20
|
+
- nginx
|
21
|
+
Date:
|
22
|
+
- Fri, 21 Nov 2014 07:21:50 GMT
|
23
|
+
Content-Type:
|
24
|
+
- application/json;charset=UTF-8
|
25
|
+
Content-Length:
|
26
|
+
- '0'
|
27
|
+
Connection:
|
28
|
+
- keep-alive
|
29
|
+
Keep-Alive:
|
30
|
+
- timeout=120
|
31
|
+
Cache-Control:
|
32
|
+
- no-cache
|
33
|
+
Www-Authenticate:
|
34
|
+
- Bearer error="invalid_request"
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: ''
|
38
|
+
http_version:
|
39
|
+
recorded_at: Fri, 21 Nov 2014 07:21:52 GMT
|
40
|
+
recorded_with: VCR 2.9.3
|
@@ -1,14 +1,88 @@
|
|
1
1
|
---
|
2
2
|
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://money.yandex.ru/api/instance-id
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: client_id=<CLIENT_ID>
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/x-www-form-urlencoded
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message: OK
|
16
|
+
headers:
|
17
|
+
Server:
|
18
|
+
- nginx
|
19
|
+
Date:
|
20
|
+
- Mon, 10 Nov 2014 19:24:27 GMT
|
21
|
+
Content-Type:
|
22
|
+
- application/json;charset=UTF-8
|
23
|
+
Content-Length:
|
24
|
+
- '101'
|
25
|
+
Connection:
|
26
|
+
- keep-alive
|
27
|
+
Keep-Alive:
|
28
|
+
- timeout=120
|
29
|
+
Vary:
|
30
|
+
- Accept-Encoding
|
31
|
+
Cache-Control:
|
32
|
+
- no-cache
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: '{"status":"success","instance_id":"kGBM/H4/SOoHbHK0OM3h6i4iBSQWnIqUxeNMQmBb2vQPPQpwHcSkQGBmqpRCiPLy"}'
|
36
|
+
http_version:
|
37
|
+
recorded_at: Mon, 10 Nov 2014 19:24:29 GMT
|
38
|
+
- request:
|
39
|
+
method: post
|
40
|
+
uri: https://money.yandex.ru/api/request-external-payment
|
41
|
+
body:
|
42
|
+
encoding: UTF-8
|
43
|
+
string: pattern_id=p2p&to=410011285611534&amount_due=1.00&message=test&instance_id=kGBM%2FH4%2FSOoHbHK0OM3h6i4iBSQWnIqUxeNMQmBb2vQPPQpwHcSkQGBmqpRCiPLy
|
44
|
+
headers:
|
45
|
+
Content-Type:
|
46
|
+
- application/x-www-form-urlencoded
|
47
|
+
response:
|
48
|
+
status:
|
49
|
+
code: 200
|
50
|
+
message: OK
|
51
|
+
headers:
|
52
|
+
Server:
|
53
|
+
- nginx
|
54
|
+
Date:
|
55
|
+
- Mon, 10 Nov 2014 19:24:27 GMT
|
56
|
+
Content-Type:
|
57
|
+
- application/json;charset=UTF-8
|
58
|
+
Content-Length:
|
59
|
+
- '251'
|
60
|
+
Connection:
|
61
|
+
- keep-alive
|
62
|
+
Keep-Alive:
|
63
|
+
- timeout=120
|
64
|
+
Vary:
|
65
|
+
- Accept-Encoding
|
66
|
+
Cache-Control:
|
67
|
+
- no-cache
|
68
|
+
body:
|
69
|
+
encoding: ASCII-8BIT
|
70
|
+
string: !binary |-
|
71
|
+
eyJzdGF0dXMiOiJzdWNjZXNzIiwidGl0bGUiOiLQn9C10YDQtdCy0L7QtCDQ
|
72
|
+
vdCwINGB0YfQtdGCIDQxMDAxMTI4NTYxMTUzNCIsImNvbnRyYWN0X2Ftb3Vu
|
73
|
+
dCI6MS4wMiwibW9uZXlfc291cmNlIjp7InBheW1lbnQtY2FyZCI6e319LCJy
|
74
|
+
ZXF1ZXN0X2lkIjoiMzEzMzMwMzYzMzM0MzQzOTMwMzM1ZjYyNjM2NDM5MzYz
|
75
|
+
OTMzMzMzODM3MzE2MTMzMzEzMzM3MzMzMTM3MzUzMDMyMzkzMzYyMzQzNDY0
|
76
|
+
MzU2MjMyMzEzODM2NjQzNzMzMzgzODM0In0=
|
77
|
+
http_version:
|
78
|
+
recorded_at: Mon, 10 Nov 2014 19:24:29 GMT
|
3
79
|
- request:
|
4
80
|
method: post
|
5
81
|
uri: https://money.yandex.ru/api/process-external-payment
|
6
82
|
body:
|
7
83
|
encoding: UTF-8
|
8
|
-
string: request_id=
|
84
|
+
string: request_id=313330363334343930335f62636439363933333837316133313337333137353032393362343464356232313836643733383834&ext_auth_success_uri=http%3A%2F%2F127.0.0.1%3A4567%2Fsuccess&ext_auth_fail_uri=http%3A%2F%2F127.0.0.1%3A4567%2Ffail&instance_id=kGBM%2FH4%2FSOoHbHK0OM3h6i4iBSQWnIqUxeNMQmBb2vQPPQpwHcSkQGBmqpRCiPLy
|
9
85
|
headers:
|
10
|
-
Cookie:
|
11
|
-
- yandexuid=4504946371409241364
|
12
86
|
Content-Type:
|
13
87
|
- application/x-www-form-urlencoded
|
14
88
|
response:
|
@@ -19,7 +93,7 @@ http_interactions:
|
|
19
93
|
Server:
|
20
94
|
- nginx
|
21
95
|
Date:
|
22
|
-
-
|
96
|
+
- Mon, 10 Nov 2014 19:24:27 GMT
|
23
97
|
Content-Type:
|
24
98
|
- application/json;charset=UTF-8
|
25
99
|
Content-Length:
|
@@ -34,7 +108,7 @@ http_interactions:
|
|
34
108
|
- no-cache
|
35
109
|
body:
|
36
110
|
encoding: UTF-8
|
37
|
-
string: '{"status":"ext_auth_required","
|
111
|
+
string: '{"status":"ext_auth_required","acs_uri":"https://m.sp-money.yandex.ru/internal/public-api/to-payment-type","acs_params":{"cps_context_id":"313330363334343930335f62636439363933333837316133313337333137353032393362343464356232313836643733383834","paymentType":"FC"}}'
|
38
112
|
http_version:
|
39
|
-
recorded_at:
|
113
|
+
recorded_at: Mon, 10 Nov 2014 19:24:29 GMT
|
40
114
|
recorded_with: VCR 2.9.3
|
@@ -7,10 +7,8 @@ http_interactions:
|
|
7
7
|
encoding: UTF-8
|
8
8
|
string: test_payment=true&test_result=success
|
9
9
|
headers:
|
10
|
-
Cookie:
|
11
|
-
- yandexuid=4504946371409241364
|
12
10
|
Authorization:
|
13
|
-
- Bearer
|
11
|
+
- Bearer <ACCESS_TOKEN>
|
14
12
|
Content-Type:
|
15
13
|
- application/x-www-form-urlencoded
|
16
14
|
response:
|
@@ -21,7 +19,7 @@ http_interactions:
|
|
21
19
|
Server:
|
22
20
|
- nginx
|
23
21
|
Date:
|
24
|
-
-
|
22
|
+
- Mon, 10 Nov 2014 19:24:28 GMT
|
25
23
|
Content-Type:
|
26
24
|
- application/json;charset=UTF-8
|
27
25
|
Content-Length:
|
@@ -39,5 +37,5 @@ http_interactions:
|
|
39
37
|
string: '{"status":"refused","error":"contract_not_found","error_description":"expected
|
40
38
|
request_id = ''test-p2p'' or ''test-shop''","test_payment":"true"}'
|
41
39
|
http_version:
|
42
|
-
recorded_at:
|
43
|
-
recorded_with: VCR 2.
|
40
|
+
recorded_at: Mon, 10 Nov 2014 19:24:30 GMT
|
41
|
+
recorded_with: VCR 2.9.3
|
@@ -7,10 +7,8 @@ http_interactions:
|
|
7
7
|
encoding: UTF-8
|
8
8
|
string: operation_id=463947376678019004
|
9
9
|
headers:
|
10
|
-
Cookie:
|
11
|
-
- yandexuid=4504946371409241364
|
12
10
|
Authorization:
|
13
|
-
- Bearer
|
11
|
+
- Bearer <ACCESS_TOKEN>
|
14
12
|
Content-Type:
|
15
13
|
- application/x-www-form-urlencoded
|
16
14
|
response:
|
@@ -21,7 +19,7 @@ http_interactions:
|
|
21
19
|
Server:
|
22
20
|
- nginx
|
23
21
|
Date:
|
24
|
-
-
|
22
|
+
- Mon, 10 Nov 2014 19:24:28 GMT
|
25
23
|
Content-Type:
|
26
24
|
- application/json;charset=UTF-8
|
27
25
|
Content-Length:
|
@@ -38,5 +36,5 @@ http_interactions:
|
|
38
36
|
encoding: UTF-8
|
39
37
|
string: '{"status":"success"}'
|
40
38
|
http_version:
|
41
|
-
recorded_at:
|
39
|
+
recorded_at: Mon, 10 Nov 2014 19:24:30 GMT
|
42
40
|
recorded_with: VCR 2.9.3
|
@@ -7,10 +7,8 @@ http_interactions:
|
|
7
7
|
encoding: UTF-8
|
8
8
|
string: operation_id=
|
9
9
|
headers:
|
10
|
-
Cookie:
|
11
|
-
- yandexuid=4504946371409241364
|
12
10
|
Authorization:
|
13
|
-
- Bearer
|
11
|
+
- Bearer <ACCESS_TOKEN>
|
14
12
|
Content-Type:
|
15
13
|
- application/x-www-form-urlencoded
|
16
14
|
response:
|
@@ -21,7 +19,7 @@ http_interactions:
|
|
21
19
|
Server:
|
22
20
|
- nginx
|
23
21
|
Date:
|
24
|
-
-
|
22
|
+
- Mon, 10 Nov 2014 19:24:28 GMT
|
25
23
|
Content-Type:
|
26
24
|
- application/json;charset=UTF-8
|
27
25
|
Content-Length:
|
@@ -38,5 +36,5 @@ http_interactions:
|
|
38
36
|
encoding: UTF-8
|
39
37
|
string: '{"status":"refused","error":"illegal_param_operation_id"}'
|
40
38
|
http_version:
|
41
|
-
recorded_at:
|
39
|
+
recorded_at: Mon, 10 Nov 2014 19:24:30 GMT
|
42
40
|
recorded_with: VCR 2.9.3
|
@@ -1,14 +1,47 @@
|
|
1
1
|
---
|
2
2
|
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://money.yandex.ru/api/instance-id
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: client_id=<CLIENT_ID>
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/x-www-form-urlencoded
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message: OK
|
16
|
+
headers:
|
17
|
+
Server:
|
18
|
+
- nginx
|
19
|
+
Date:
|
20
|
+
- Mon, 10 Nov 2014 19:24:27 GMT
|
21
|
+
Content-Type:
|
22
|
+
- application/json;charset=UTF-8
|
23
|
+
Content-Length:
|
24
|
+
- '101'
|
25
|
+
Connection:
|
26
|
+
- keep-alive
|
27
|
+
Keep-Alive:
|
28
|
+
- timeout=120
|
29
|
+
Vary:
|
30
|
+
- Accept-Encoding
|
31
|
+
Cache-Control:
|
32
|
+
- no-cache
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: '{"status":"success","instance_id":"6hayxm04FRD5BAcLnbBqeY/ikYmUJKuvYuCCbGqQ5Nd4epIdnhtRmaebGxWqH7jO"}'
|
36
|
+
http_version:
|
37
|
+
recorded_at: Mon, 10 Nov 2014 19:24:29 GMT
|
3
38
|
- request:
|
4
39
|
method: post
|
5
40
|
uri: https://money.yandex.ru/api/request-external-payment
|
6
41
|
body:
|
7
42
|
encoding: UTF-8
|
8
|
-
string: pattern_id=p2p&
|
43
|
+
string: pattern_id=p2p&to=410011285611534&amount_due=1.00&message=test&instance_id=6hayxm04FRD5BAcLnbBqeY%2FikYmUJKuvYuCCbGqQ5Nd4epIdnhtRmaebGxWqH7jO
|
9
44
|
headers:
|
10
|
-
Cookie:
|
11
|
-
- yandexuid=4504946371409241364
|
12
45
|
Content-Type:
|
13
46
|
- application/x-www-form-urlencoded
|
14
47
|
response:
|
@@ -19,11 +52,11 @@ http_interactions:
|
|
19
52
|
Server:
|
20
53
|
- nginx
|
21
54
|
Date:
|
22
|
-
-
|
55
|
+
- Mon, 10 Nov 2014 19:24:27 GMT
|
23
56
|
Content-Type:
|
24
57
|
- application/json;charset=UTF-8
|
25
58
|
Content-Length:
|
26
|
-
- '
|
59
|
+
- '251'
|
27
60
|
Connection:
|
28
61
|
- keep-alive
|
29
62
|
Keep-Alive:
|
@@ -37,10 +70,10 @@ http_interactions:
|
|
37
70
|
string: !binary |-
|
38
71
|
eyJzdGF0dXMiOiJzdWNjZXNzIiwidGl0bGUiOiLQn9C10YDQtdCy0L7QtCDQ
|
39
72
|
vdCwINGB0YfQtdGCIDQxMDAxMTI4NTYxMTUzNCIsImNvbnRyYWN0X2Ftb3Vu
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
73
|
+
dCI6MS4wMiwicmVxdWVzdF9pZCI6IjMxMzMzMDM2MzMzNDM0MzkzMDMwNWY2
|
74
|
+
NjM0MzM2NTY2MzczOTYxMzAzNzYyNjU2NjMwMzUzMTM0NjEzMTM2NjYzNjM3
|
75
|
+
Mzg2MzM1MzMzOTYzMzEzMzY1NjUzMzYyMzQzMzM2NjEzMyIsIm1vbmV5X3Nv
|
76
|
+
dXJjZSI6eyJwYXltZW50LWNhcmQiOnt9fX0=
|
44
77
|
http_version:
|
45
|
-
recorded_at:
|
78
|
+
recorded_at: Mon, 10 Nov 2014 19:24:29 GMT
|
46
79
|
recorded_with: VCR 2.9.3
|
@@ -5,12 +5,10 @@ http_interactions:
|
|
5
5
|
uri: https://money.yandex.ru/api/request-payment
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string: pattern_id=p2p&to=
|
8
|
+
string: pattern_id=p2p&to=410011161616877&test_payment=true&test_result=success
|
9
9
|
headers:
|
10
|
-
Cookie:
|
11
|
-
- yandexuid=6270165461409412506
|
12
10
|
Authorization:
|
13
|
-
- Bearer
|
11
|
+
- Bearer <ACCESS_TOKEN>
|
14
12
|
Content-Type:
|
15
13
|
- application/x-www-form-urlencoded
|
16
14
|
response:
|
@@ -21,7 +19,7 @@ http_interactions:
|
|
21
19
|
Server:
|
22
20
|
- nginx
|
23
21
|
Date:
|
24
|
-
-
|
22
|
+
- Mon, 10 Nov 2014 19:24:28 GMT
|
25
23
|
Content-Type:
|
26
24
|
- application/json;charset=UTF-8
|
27
25
|
Content-Length:
|
@@ -39,5 +37,5 @@ http_interactions:
|
|
39
37
|
string: '{"status":"refused","error":"illegal_params","error_description":"At
|
40
38
|
least one parameter of amount or amount_due is expected","test_payment":"true"}'
|
41
39
|
http_version:
|
42
|
-
recorded_at:
|
43
|
-
recorded_with: VCR 2.
|
40
|
+
recorded_at: Mon, 10 Nov 2014 19:24:30 GMT
|
41
|
+
recorded_with: VCR 2.9.3
|
@@ -7,10 +7,8 @@ http_interactions:
|
|
7
7
|
encoding: UTF-8
|
8
8
|
string: request_id=test-p2p&test_payment=true&test_result=success
|
9
9
|
headers:
|
10
|
-
Cookie:
|
11
|
-
- yandexuid=4504946371409241364
|
12
10
|
Authorization:
|
13
|
-
- Bearer
|
11
|
+
- Bearer <ACCESS_TOKEN>
|
14
12
|
Content-Type:
|
15
13
|
- application/x-www-form-urlencoded
|
16
14
|
response:
|
@@ -21,11 +19,11 @@ http_interactions:
|
|
21
19
|
Server:
|
22
20
|
- nginx
|
23
21
|
Date:
|
24
|
-
-
|
22
|
+
- Mon, 10 Nov 2014 19:24:28 GMT
|
25
23
|
Content-Type:
|
26
24
|
- application/json;charset=UTF-8
|
27
25
|
Content-Length:
|
28
|
-
- '
|
26
|
+
- '160'
|
29
27
|
Connection:
|
30
28
|
- keep-alive
|
31
29
|
Keep-Alive:
|
@@ -36,7 +34,7 @@ http_interactions:
|
|
36
34
|
- no-cache
|
37
35
|
body:
|
38
36
|
encoding: UTF-8
|
39
|
-
string: '{"status":"success","payer":"
|
37
|
+
string: '{"status":"success","balance":6.88,"payer":"<WALLET_NUMBER>","payee":"test","credit_amount":28.86,"payee_uid":56809635,"test_payment":"true","payment_id":"test"}'
|
40
38
|
http_version:
|
41
|
-
recorded_at:
|
42
|
-
recorded_with: VCR 2.
|
39
|
+
recorded_at: Mon, 10 Nov 2014 19:24:30 GMT
|
40
|
+
recorded_with: VCR 2.9.3
|
@@ -5,12 +5,10 @@ http_interactions:
|
|
5
5
|
uri: https://money.yandex.ru/api/request-payment
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string: pattern_id=p2p&to=
|
8
|
+
string: pattern_id=p2p&to=410011161616877&amount=0.02&comment=test%20payment%20comment%20from%20yandex-money-ruby&message=test%20payment%20message%20from%20yandex-money-ruby&label=testPayment&test_payment=true&test_result=success
|
9
9
|
headers:
|
10
|
-
Cookie:
|
11
|
-
- yandexuid=6270165461409412506
|
12
10
|
Authorization:
|
13
|
-
- Bearer
|
11
|
+
- Bearer <ACCESS_TOKEN>
|
14
12
|
Content-Type:
|
15
13
|
- application/x-www-form-urlencoded
|
16
14
|
response:
|
@@ -21,11 +19,11 @@ http_interactions:
|
|
21
19
|
Server:
|
22
20
|
- nginx
|
23
21
|
Date:
|
24
|
-
-
|
22
|
+
- Mon, 10 Nov 2014 19:24:28 GMT
|
25
23
|
Content-Type:
|
26
24
|
- application/json;charset=UTF-8
|
27
25
|
Content-Length:
|
28
|
-
- '
|
26
|
+
- '339'
|
29
27
|
Connection:
|
30
28
|
- keep-alive
|
31
29
|
Keep-Alive:
|
@@ -37,7 +35,7 @@ http_interactions:
|
|
37
35
|
body:
|
38
36
|
encoding: UTF-8
|
39
37
|
string: '{"status":"success","contract":"The generated test outgoing money transfer
|
40
|
-
to
|
38
|
+
to 410011161616877, amount 0.02","balance":6.88,"recipient_account_type":"personal","recipient_account_status":"identified","request_id":"test-p2p","test_payment":"true","contract_amount":0.02,"recipient_identified":true,"money_source":{"wallet":{"allowed":true}}}'
|
41
39
|
http_version:
|
42
|
-
recorded_at:
|
43
|
-
recorded_with: VCR 2.
|
40
|
+
recorded_at: Mon, 10 Nov 2014 19:24:29 GMT
|
41
|
+
recorded_with: VCR 2.9.3
|