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.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.travis.yml +9 -6
  4. data/.yardopts +1 -0
  5. data/CHANGELOG.md +33 -1
  6. data/README.md +22 -26
  7. data/constants.rb.enc +0 -0
  8. data/lib/yandex_money/api.rb +3 -185
  9. data/lib/yandex_money/api/version.rb +1 -1
  10. data/lib/yandex_money/config.rb +26 -0
  11. data/lib/yandex_money/exceptions.rb +14 -4
  12. data/lib/yandex_money/external_payment.rb +78 -0
  13. data/lib/yandex_money/wallet.rb +215 -0
  14. data/spec/account_info_spec.rb +15 -14
  15. data/spec/auth_spec.rb +14 -41
  16. data/spec/cards_spec.rb +20 -18
  17. data/spec/config_spec.rb +50 -0
  18. data/spec/exceptions_spec.rb +55 -0
  19. data/spec/fixtures/vcr_cassettes/accept_incoming_transfer_with_protection_code.yml +3 -5
  20. data/spec/fixtures/vcr_cassettes/accept_incoming_transfer_with_protection_code_with_wrong_code.yml +6 -8
  21. data/spec/fixtures/vcr_cassettes/get_account_info.yml +5 -5
  22. data/spec/fixtures/vcr_cassettes/get_instance_id_fail.yml +2 -840
  23. data/spec/fixtures/vcr_cassettes/get_instance_id_success.yml +4 -840
  24. data/spec/fixtures/vcr_cassettes/get_operation_details.yml +199 -16
  25. data/spec/fixtures/vcr_cassettes/get_operation_history.yml +149 -150
  26. data/spec/fixtures/vcr_cassettes/get_operation_history_with_params.yml +9 -9
  27. data/spec/fixtures/vcr_cassettes/get_token_from_authorization_code.yml +15 -842
  28. data/spec/fixtures/vcr_cassettes/get_wrong_operation_details.yml +4 -4
  29. data/spec/fixtures/vcr_cassettes/init_without_client_secret.yml +719 -711
  30. data/spec/fixtures/vcr_cassettes/initialize_with_token.yml +7 -878
  31. data/spec/fixtures/vcr_cassettes/insufficient_scope_error.yml +40 -0
  32. data/spec/fixtures/vcr_cassettes/invalid_request_error.yml +40 -0
  33. data/spec/fixtures/vcr_cassettes/process_external_payment.yml +80 -6
  34. data/spec/fixtures/vcr_cassettes/process_payment_to_an_account_with_failure.yml +4 -6
  35. data/spec/fixtures/vcr_cassettes/reject_payment.yml +3 -5
  36. data/spec/fixtures/vcr_cassettes/reject_payment_fail.yml +3 -5
  37. data/spec/fixtures/vcr_cassettes/request_external_payment.yml +43 -10
  38. data/spec/fixtures/vcr_cassettes/request_payment_to_an_account_with_failure.yml +5 -7
  39. data/spec/fixtures/vcr_cassettes/success_process_payment_to_an_account.yml +6 -8
  40. data/spec/fixtures/vcr_cassettes/success_request_payment_to_an_account.yml +7 -9
  41. data/spec/fixtures/vcr_cassettes/unauthorized_error.yml +41 -0
  42. data/spec/fixtures/vcr_cassettes/unauthorized_exception.yml +3 -3
  43. data/spec/logger_spec.rb +0 -18
  44. data/spec/payments_spec.rb +20 -30
  45. data/spec/spec_helper.rb +12 -3
  46. data/spec/support/constants.example.rb +13 -0
  47. data/yandex-money-sdk.gemspec +2 -1
  48. metadata +42 -18
  49. data/lib/yandex_money/logger/default.rb +0 -17
  50. data/lib/yandex_money/logger/empty.rb +0 -10
  51. data/spec/fixtures/vcr_cassettes/init_with_client_secret.yml +0 -839
  52. data/spec/fixtures/vcr_cassettes/obtain_token_for_get_account_info.yml +0 -877
  53. data/spec/fixtures/vcr_cassettes/obtain_token_for_making_payments_to_an_account.yml +0 -875
  54. data/spec/fixtures/vcr_cassettes/obtain_token_for_payments_from_bank_cards_without_authorization.yml +0 -839
  55. data/spec/fixtures/vcr_cassettes/token_with_client_secret.yml +0 -875
  56. 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=313230393739363039365f64643133633966326338353530303230663461616330303239373030646132616437393134623165&ext_auth_success_uri=http%3A%2F%2Fdrakmail.ru%2Fsuccess&ext_auth_fail_uri=http%3A%2F%2Fdrakmail.ru%2Ffail&instance_id=zRhKWeiQVphBSd6I%2FA8p28R4uRMx9QPPW1nviyTFkQf%2Ba73JuX2jSD0gVEQhWtOH
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
- - Sat, 13 Sep 2014 19:29:48 GMT
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","acs_params":{"cps_context_id":"313230393739363039365f64643133633966326338353530303230663461616330303239373030646132616437393134623165","paymentType":"FC"},"acs_uri":"https://m.sp-money.yandex.ru/internal/public-api/to-payment-type"}'
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: Sat, 13 Sep 2014 19:29:48 GMT
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 41001565326286.5B5C13BE781F95C68939436E1547CC2B4E3E5B656CAA7EE39218BC33238CDADD8509E3786930C0FC55861E300847CA627B01FE801F8CC7B83D68F4B28722DD87348E32F4A43122EBC2325FA11F136785056142D8AF6A4C0B417D4CA9EF7C62A12B146AB5903C31C3559E559FED912516A9D1D9FA08345F872CD615CC7F699CB3
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
- - Sat, 30 Aug 2014 17:38:15 GMT
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: Sat, 30 Aug 2014 17:38:15 GMT
43
- recorded_with: VCR 2.6.0
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 41001565326286.F231B646B62994F492C42942769B28211D996082FB0E553BF7D8783D91D6A2FF8CB9C83EA2E7A6A1DC303369916D25A8B60F63E52F6C19784F3F703B54332655CF59964ADFEF6D188F74E912617D7B0954A7BDEF83A683C09DAB35BC189785C3A1E6D0D7168F980875A67962C6119E87A18442E600F0ADB431DD1BCF33C905D3
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
- - Sat, 13 Sep 2014 18:30:57 GMT
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: Sat, 13 Sep 2014 18:30:57 GMT
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 41001565326286.F231B646B62994F492C42942769B28211D996082FB0E553BF7D8783D91D6A2FF8CB9C83EA2E7A6A1DC303369916D25A8B60F63E52F6C19784F3F703B54332655CF59964ADFEF6D188F74E912617D7B0954A7BDEF83A683C09DAB35BC189785C3A1E6D0D7168F980875A67962C6119E87A18442E600F0ADB431DD1BCF33C905D3
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
- - Sat, 13 Sep 2014 18:31:02 GMT
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: Sat, 13 Sep 2014 18:31:02 GMT
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&instance_id=zRhKWeiQVphBSd6I%2FA8p28R4uRMx9QPPW1nviyTFkQf%2Ba73JuX2jSD0gVEQhWtOH&to=410011285611534&amount_due=1.00&message=test
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
- - Sat, 13 Sep 2014 18:49:54 GMT
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
- - '252'
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
- dCI6NTAuMDAsInJlcXVlc3RfaWQiOiIzMTMyMzAzOTM3MzkzNjMwMzkzNjVm
41
- NjQ2NDMxMzM2MzM5NjYzMjYzMzgzNTM1MzAzMDMyMzA2NjM0NjE2MTYzMzAz
42
- MDMyMzkzNzMwMzA2NDYxMzI2MTY0MzczOTMxMzQ2MjMxNjUiLCJtb25leV9z
43
- b3VyY2UiOnsicGF5bWVudC1jYXJkIjp7fX19
73
+ dCI6MS4wMiwicmVxdWVzdF9pZCI6IjMxMzMzMDM2MzMzNDM0MzkzMDMwNWY2
74
+ NjM0MzM2NTY2MzczOTYxMzAzNzYyNjU2NjMwMzUzMTM0NjEzMTM2NjYzNjM3
75
+ Mzg2MzM1MzMzOTYzMzEzMzY1NjUzMzYyMzQzMzM2NjEzMyIsIm1vbmV5X3Nv
76
+ dXJjZSI6eyJwYXltZW50LWNhcmQiOnt9fX0=
44
77
  http_version:
45
- recorded_at: Sat, 13 Sep 2014 18:49:54 GMT
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=410011285611534&test_payment=true&test_result=success
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 41001565326286.0BB266A33F9F3F6C27B199C98B8FE1F495340C2FC30A80A732D5DE2208E5C51688D71B1284A279C97FF690AC5E991A8809B8733FE126A06A1381EC8A6BB157268DB52B4A2E1E5A39D45BD8F6F4FA7E4D04D3677BF6EFD7350B40E1C0764A17F62CF9CB1A590F7784ABBC760C71CAC7C53D867B3C1D18A1FF38472F0E7ACB2A34
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
- - Sat, 30 Aug 2014 15:53:05 GMT
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: Sat, 30 Aug 2014 15:53:05 GMT
43
- recorded_with: VCR 2.6.0
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 41001565326286.5B5C13BE781F95C68939436E1547CC2B4E3E5B656CAA7EE39218BC33238CDADD8509E3786930C0FC55861E300847CA627B01FE801F8CC7B83D68F4B28722DD87348E32F4A43122EBC2325FA11F136785056142D8AF6A4C0B417D4CA9EF7C62A12B146AB5903C31C3559E559FED912516A9D1D9FA08345F872CD615CC7F699CB3
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
- - Sat, 30 Aug 2014 17:34:26 GMT
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
- - '145'
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":"41001565326286","payee":"test","credit_amount":20.30,"payee_uid":56809635,"test_payment":"true","payment_id":"test"}'
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: Sat, 30 Aug 2014 17:34:26 GMT
42
- recorded_with: VCR 2.6.0
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=410011285611534&amount=1.0&comment=test%20payment%20comment%20from%20yandex-money-ruby&message=test%20payment%20message%20from%20yandex-money-ruby&label=testPayment&test_payment=true&test_result=success
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 41001565326286.0BB266A33F9F3F6C27B199C98B8FE1F495340C2FC30A80A732D5DE2208E5C51688D71B1284A279C97FF690AC5E991A8809B8733FE126A06A1381EC8A6BB157268DB52B4A2E1E5A39D45BD8F6F4FA7E4D04D3677BF6EFD7350B40E1C0764A17F62CF9CB1A590F7784ABBC760C71CAC7C53D867B3C1D18A1FF38472F0E7ACB2A34
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
- - Sat, 30 Aug 2014 15:40:29 GMT
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
- - '323'
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 410011285611534, amount 1.0","recipient_account_type":"personal","recipient_account_status":"anonymous","request_id":"test-p2p","test_payment":"true","contract_amount":1.00,"money_source":{"wallet":{"allowed":true}},"recipient_identified":false}'
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: Sat, 30 Aug 2014 15:40:29 GMT
43
- recorded_with: VCR 2.6.0
40
+ recorded_at: Mon, 10 Nov 2014 19:24:29 GMT
41
+ recorded_with: VCR 2.9.3