defra_ruby_mocks 2.4.1 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/app/jobs/defra_ruby_mocks/govpay_payment_callback_job.rb +1 -1
  3. data/app/services/defra_ruby_mocks/companies_house_service.rb +1 -3
  4. data/app/services/defra_ruby_mocks/govpay_create_payment_service.rb +18 -18
  5. data/app/services/defra_ruby_mocks/govpay_get_payment_service.rb +50 -50
  6. data/app/services/defra_ruby_mocks/govpay_refund_details_service.rb +6 -6
  7. data/app/services/defra_ruby_mocks/govpay_request_refund_service.rb +4 -4
  8. data/lib/defra_ruby_mocks/version.rb +1 -1
  9. metadata +12 -207
  10. data/spec/defra_ruby_mocks_spec.rb +0 -44
  11. data/spec/dummy/README.rdoc +0 -28
  12. data/spec/dummy/Rakefile +0 -6
  13. data/spec/dummy/app/assets/javascripts/application.js +0 -13
  14. data/spec/dummy/app/assets/stylesheets/application.css +0 -15
  15. data/spec/dummy/app/controllers/application_controller.rb +0 -5
  16. data/spec/dummy/app/helpers/application_helper.rb +0 -2
  17. data/spec/dummy/app/views/layouts/application.html.erb +0 -14
  18. data/spec/dummy/bin/bundle +0 -3
  19. data/spec/dummy/bin/rails +0 -4
  20. data/spec/dummy/bin/rake +0 -4
  21. data/spec/dummy/bin/setup +0 -29
  22. data/spec/dummy/config/application.rb +0 -27
  23. data/spec/dummy/config/boot.rb +0 -5
  24. data/spec/dummy/config/environment.rb +0 -5
  25. data/spec/dummy/config/environments/development.rb +0 -38
  26. data/spec/dummy/config/environments/production.rb +0 -76
  27. data/spec/dummy/config/environments/test.rb +0 -42
  28. data/spec/dummy/config/initializers/assets.rb +0 -11
  29. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  30. data/spec/dummy/config/initializers/cookies_serializer.rb +0 -3
  31. data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  32. data/spec/dummy/config/initializers/inflections.rb +0 -16
  33. data/spec/dummy/config/initializers/mime_types.rb +0 -4
  34. data/spec/dummy/config/initializers/session_store.rb +0 -3
  35. data/spec/dummy/config/initializers/to_time_preserves_timezone.rb +0 -10
  36. data/spec/dummy/config/initializers/wrap_parameters.rb +0 -9
  37. data/spec/dummy/config/locales/en.yml +0 -23
  38. data/spec/dummy/config/routes.rb +0 -4
  39. data/spec/dummy/config/secrets.yml +0 -22
  40. data/spec/dummy/config.ru +0 -4
  41. data/spec/dummy/log/test.log +0 -1704
  42. data/spec/dummy/public/404.html +0 -67
  43. data/spec/dummy/public/422.html +0 -67
  44. data/spec/dummy/public/500.html +0 -66
  45. data/spec/dummy/public/favicon.ico +0 -0
  46. data/spec/examples.txt +0 -68
  47. data/spec/fixtures/files/govpay/create_payment_created_response.json +0 -24
  48. data/spec/fixtures/files/govpay/create_payment_error_response.json +0 -5
  49. data/spec/fixtures/files/govpay/get_payment_response_cancelled.json +0 -61
  50. data/spec/fixtures/files/govpay/get_payment_response_created.json +0 -73
  51. data/spec/fixtures/files/govpay/get_payment_response_error.json +0 -5
  52. data/spec/fixtures/files/govpay/get_payment_response_failure.json +0 -9
  53. data/spec/fixtures/files/govpay/get_payment_response_not_found.json +0 -4
  54. data/spec/fixtures/files/govpay/get_payment_response_submitted.json +0 -75
  55. data/spec/fixtures/files/govpay/get_payment_response_success.json +0 -62
  56. data/spec/lib/configuration_spec.rb +0 -75
  57. data/spec/rails_helper.rb +0 -46
  58. data/spec/requests/company_spec.rb +0 -91
  59. data/spec/requests/govpay_spec.rb +0 -170
  60. data/spec/requests/officers_spec.rb +0 -37
  61. data/spec/services/companies_house_service_spec.rb +0 -69
  62. data/spec/services/govpay_create_payment_service_spec.rb +0 -44
  63. data/spec/services/govpay_get_payment_service_spec.rb +0 -30
  64. data/spec/services/govpay_refund_details_service_spec.rb +0 -58
  65. data/spec/services/govpay_request_refund_service_spec.rb +0 -31
  66. data/spec/spec_helper.rb +0 -86
  67. data/spec/support/helpers/configuration.rb +0 -17
  68. data/spec/support/helpers/helpers.rb +0 -13
  69. data/spec/support/helpers/waste_carriers_engine.rb +0 -10
  70. data/spec/support/helpers/xml_matchers.rb +0 -19
  71. data/spec/support/pry.rb +0 -7
  72. data/spec/support/simplecov.rb +0 -17
@@ -1,67 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>The page you were looking for doesn't exist (404)</title>
5
- <meta name="viewport" content="width=device-width,initial-scale=1">
6
- <style>
7
- body {
8
- background-color: #EFEFEF;
9
- color: #2E2F30;
10
- text-align: center;
11
- font-family: arial, sans-serif;
12
- margin: 0;
13
- }
14
-
15
- div.dialog {
16
- width: 95%;
17
- max-width: 33em;
18
- margin: 4em auto 0;
19
- }
20
-
21
- div.dialog > div {
22
- border: 1px solid #CCC;
23
- border-right-color: #999;
24
- border-left-color: #999;
25
- border-bottom-color: #BBB;
26
- border-top: #B00100 solid 4px;
27
- border-top-left-radius: 9px;
28
- border-top-right-radius: 9px;
29
- background-color: white;
30
- padding: 7px 12% 0;
31
- box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
- }
33
-
34
- h1 {
35
- font-size: 100%;
36
- color: #730E15;
37
- line-height: 1.5em;
38
- }
39
-
40
- div.dialog > p {
41
- margin: 0 0 1em;
42
- padding: 1em;
43
- background-color: #F7F7F7;
44
- border: 1px solid #CCC;
45
- border-right-color: #999;
46
- border-left-color: #999;
47
- border-bottom-color: #999;
48
- border-bottom-left-radius: 4px;
49
- border-bottom-right-radius: 4px;
50
- border-top-color: #DADADA;
51
- color: #666;
52
- box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
- }
54
- </style>
55
- </head>
56
-
57
- <body>
58
- <!-- This file lives in public/404.html -->
59
- <div class="dialog">
60
- <div>
61
- <h1>The page you were looking for doesn't exist.</h1>
62
- <p>You may have mistyped the address or the page may have moved.</p>
63
- </div>
64
- <p>If you are the application owner check the logs for more information.</p>
65
- </div>
66
- </body>
67
- </html>
@@ -1,67 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>The change you wanted was rejected (422)</title>
5
- <meta name="viewport" content="width=device-width,initial-scale=1">
6
- <style>
7
- body {
8
- background-color: #EFEFEF;
9
- color: #2E2F30;
10
- text-align: center;
11
- font-family: arial, sans-serif;
12
- margin: 0;
13
- }
14
-
15
- div.dialog {
16
- width: 95%;
17
- max-width: 33em;
18
- margin: 4em auto 0;
19
- }
20
-
21
- div.dialog > div {
22
- border: 1px solid #CCC;
23
- border-right-color: #999;
24
- border-left-color: #999;
25
- border-bottom-color: #BBB;
26
- border-top: #B00100 solid 4px;
27
- border-top-left-radius: 9px;
28
- border-top-right-radius: 9px;
29
- background-color: white;
30
- padding: 7px 12% 0;
31
- box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
- }
33
-
34
- h1 {
35
- font-size: 100%;
36
- color: #730E15;
37
- line-height: 1.5em;
38
- }
39
-
40
- div.dialog > p {
41
- margin: 0 0 1em;
42
- padding: 1em;
43
- background-color: #F7F7F7;
44
- border: 1px solid #CCC;
45
- border-right-color: #999;
46
- border-left-color: #999;
47
- border-bottom-color: #999;
48
- border-bottom-left-radius: 4px;
49
- border-bottom-right-radius: 4px;
50
- border-top-color: #DADADA;
51
- color: #666;
52
- box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
- }
54
- </style>
55
- </head>
56
-
57
- <body>
58
- <!-- This file lives in public/422.html -->
59
- <div class="dialog">
60
- <div>
61
- <h1>The change you wanted was rejected.</h1>
62
- <p>Maybe you tried to change something you didn't have access to.</p>
63
- </div>
64
- <p>If you are the application owner check the logs for more information.</p>
65
- </div>
66
- </body>
67
- </html>
@@ -1,66 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>We're sorry, but something went wrong (500)</title>
5
- <meta name="viewport" content="width=device-width,initial-scale=1">
6
- <style>
7
- body {
8
- background-color: #EFEFEF;
9
- color: #2E2F30;
10
- text-align: center;
11
- font-family: arial, sans-serif;
12
- margin: 0;
13
- }
14
-
15
- div.dialog {
16
- width: 95%;
17
- max-width: 33em;
18
- margin: 4em auto 0;
19
- }
20
-
21
- div.dialog > div {
22
- border: 1px solid #CCC;
23
- border-right-color: #999;
24
- border-left-color: #999;
25
- border-bottom-color: #BBB;
26
- border-top: #B00100 solid 4px;
27
- border-top-left-radius: 9px;
28
- border-top-right-radius: 9px;
29
- background-color: white;
30
- padding: 7px 12% 0;
31
- box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
- }
33
-
34
- h1 {
35
- font-size: 100%;
36
- color: #730E15;
37
- line-height: 1.5em;
38
- }
39
-
40
- div.dialog > p {
41
- margin: 0 0 1em;
42
- padding: 1em;
43
- background-color: #F7F7F7;
44
- border: 1px solid #CCC;
45
- border-right-color: #999;
46
- border-left-color: #999;
47
- border-bottom-color: #999;
48
- border-bottom-left-radius: 4px;
49
- border-bottom-right-radius: 4px;
50
- border-top-color: #DADADA;
51
- color: #666;
52
- box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
- }
54
- </style>
55
- </head>
56
-
57
- <body>
58
- <!-- This file lives in public/500.html -->
59
- <div class="dialog">
60
- <div>
61
- <h1>We're sorry, but something went wrong.</h1>
62
- </div>
63
- <p>If you are the application owner check the logs for more information.</p>
64
- </div>
65
- </body>
66
- </html>
File without changes
data/spec/examples.txt DELETED
@@ -1,68 +0,0 @@
1
- example_id | status | run_time |
2
- ---------------------------------------------------------------- | ------ | --------------- |
3
- ./spec/defra_ruby_mocks_spec.rb[1:1:1] | passed | 0.00264 seconds |
4
- ./spec/defra_ruby_mocks_spec.rb[1:2:1:1] | passed | 0.00153 seconds |
5
- ./spec/defra_ruby_mocks_spec.rb[1:2:2:1] | passed | 0.00021 seconds |
6
- ./spec/lib/configuration_spec.rb[1:1:1:1] | passed | 0.00016 seconds |
7
- ./spec/lib/configuration_spec.rb[1:1:2:1] | passed | 0.00014 seconds |
8
- ./spec/lib/configuration_spec.rb[1:1:3:1] | passed | 0.00011 seconds |
9
- ./spec/lib/configuration_spec.rb[1:1:4:1] | passed | 0.00132 seconds |
10
- ./spec/lib/configuration_spec.rb[1:2:1:1] | passed | 0.00015 seconds |
11
- ./spec/lib/configuration_spec.rb[1:2:2:1] | passed | 0.00011 seconds |
12
- ./spec/lib/configuration_spec.rb[1:2:3:1] | passed | 0.00012 seconds |
13
- ./spec/lib/configuration_spec.rb[1:2:4:1] | passed | 0.00011 seconds |
14
- ./spec/requests/company_spec.rb[1:1:1:1] | passed | 0.0037 seconds |
15
- ./spec/requests/company_spec.rb[1:1:2:1] | passed | 0.00379 seconds |
16
- ./spec/requests/company_spec.rb[1:1:3:1:1] | passed | 0.00573 seconds |
17
- ./spec/requests/company_spec.rb[1:1:3:2:1] | passed | 0.02066 seconds |
18
- ./spec/requests/company_spec.rb[1:2:1] | passed | 0.0021 seconds |
19
- ./spec/requests/govpay_spec.rb[1:1:1:1:1] | passed | 0.00464 seconds |
20
- ./spec/requests/govpay_spec.rb[1:1:1:1:2] | passed | 0.01777 seconds |
21
- ./spec/requests/govpay_spec.rb[1:1:1:2:1] | passed | 0.00307 seconds |
22
- ./spec/requests/govpay_spec.rb[1:1:2:1:1] | passed | 0.0447 seconds |
23
- ./spec/requests/govpay_spec.rb[1:1:2:2:1] | passed | 0.00415 seconds |
24
- ./spec/requests/govpay_spec.rb[1:1:3:1:1] | passed | 0.00269 seconds |
25
- ./spec/requests/govpay_spec.rb[1:1:3:2:1] | passed | 0.0036 seconds |
26
- ./spec/requests/govpay_spec.rb[1:1:4:1:1] | passed | 0.00626 seconds |
27
- ./spec/requests/govpay_spec.rb[1:2:1:1] | passed | 0.00168 seconds |
28
- ./spec/requests/govpay_spec.rb[1:2:2:1] | passed | 0.00723 seconds |
29
- ./spec/requests/govpay_spec.rb[1:2:3:1] | passed | 0.00976 seconds |
30
- ./spec/requests/officers_spec.rb[1:1:1] | passed | 0.00514 seconds |
31
- ./spec/requests/officers_spec.rb[1:2:1] | passed | 0.0021 seconds |
32
- ./spec/services/companies_house_service_spec.rb[1:1:1:1] | passed | 0.00016 seconds |
33
- ./spec/services/companies_house_service_spec.rb[1:1:2:1:1] | passed | 0.00011 seconds |
34
- ./spec/services/companies_house_service_spec.rb[1:1:2:1:2] | passed | 0.00015 seconds |
35
- ./spec/services/companies_house_service_spec.rb[1:1:2:2:1] | passed | 0.00014 seconds |
36
- ./spec/services/companies_house_service_spec.rb[1:1:2:2:2] | passed | 0.00012 seconds |
37
- ./spec/services/companies_house_service_spec.rb[1:1:2:3:1] | passed | 0.00017 seconds |
38
- ./spec/services/companies_house_service_spec.rb[1:1:2:3:2] | passed | 0.00012 seconds |
39
- ./spec/services/companies_house_service_spec.rb[1:1:2:4:1] | passed | 0.00012 seconds |
40
- ./spec/services/companies_house_service_spec.rb[1:1:2:4:2] | passed | 0.00012 seconds |
41
- ./spec/services/companies_house_service_spec.rb[1:1:2:5:1] | passed | 0.00013 seconds |
42
- ./spec/services/companies_house_service_spec.rb[1:1:2:5:2] | passed | 0.00014 seconds |
43
- ./spec/services/companies_house_service_spec.rb[1:1:2:6:1] | passed | 0.00013 seconds |
44
- ./spec/services/companies_house_service_spec.rb[1:1:2:6:2] | passed | 0.00012 seconds |
45
- ./spec/services/companies_house_service_spec.rb[1:1:2:7:1] | passed | 0.00012 seconds |
46
- ./spec/services/companies_house_service_spec.rb[1:1:2:7:2] | passed | 0.00017 seconds |
47
- ./spec/services/companies_house_service_spec.rb[1:1:2:8:1] | passed | 0.00012 seconds |
48
- ./spec/services/companies_house_service_spec.rb[1:1:2:8:2] | passed | 0.00015 seconds |
49
- ./spec/services/companies_house_service_spec.rb[1:1:2:9:1] | passed | 0.00016 seconds |
50
- ./spec/services/companies_house_service_spec.rb[1:1:2:9:2] | passed | 0.00017 seconds |
51
- ./spec/services/companies_house_service_spec.rb[1:1:3:1] | passed | 0.00012 seconds |
52
- ./spec/services/companies_house_service_spec.rb[1:1:3:2] | passed | 0.00011 seconds |
53
- ./spec/services/companies_house_service_spec.rb[1:1:3:3] | passed | 0.00013 seconds |
54
- ./spec/services/companies_house_service_spec.rb[1:1:3:4] | passed | 0.00011 seconds |
55
- ./spec/services/companies_house_service_spec.rb[1:1:4:1:1] | passed | 0.00013 seconds |
56
- ./spec/services/companies_house_service_spec.rb[1:1:4:2:1] | passed | 0.00016 seconds |
57
- ./spec/services/govpay_create_payment_service_spec.rb[1:1:1:1] | passed | 2.29 seconds |
58
- ./spec/services/govpay_create_payment_service_spec.rb[1:1:1:2] | passed | 0.00453 seconds |
59
- ./spec/services/govpay_create_payment_service_spec.rb[1:1:1:3] | passed | 0.00433 seconds |
60
- ./spec/services/govpay_create_payment_service_spec.rb[1:1:1:4] | passed | 0.00429 seconds |
61
- ./spec/services/govpay_get_payment_service_spec.rb[1:1:1:1] | passed | 0.00109 seconds |
62
- ./spec/services/govpay_get_payment_service_spec.rb[1:1:1:2] | passed | 0.00128 seconds |
63
- ./spec/services/govpay_refund_details_service_spec.rb[1:1:1:1] | passed | 0.0016 seconds |
64
- ./spec/services/govpay_refund_details_service_spec.rb[1:1:2:1:1] | passed | 0.00264 seconds |
65
- ./spec/services/govpay_refund_details_service_spec.rb[1:1:2:2:1] | passed | 0.00247 seconds |
66
- ./spec/services/govpay_refund_details_service_spec.rb[1:1:2:3:1] | passed | 0.003 seconds |
67
- ./spec/services/govpay_request_refund_service_spec.rb[1:1:1:1] | passed | 0.00116 seconds |
68
- ./spec/services/govpay_request_refund_service_spec.rb[1:1:1:2] | passed | 0.17665 seconds |
@@ -1,24 +0,0 @@
1
- {
2
- "created_date": "2020-03-03T16:17:19.554Z",
3
- "state": {
4
- "status": "created",
5
- "finished": false
6
- },
7
- "_links": {
8
- "self": {
9
- "href": "https://publicapi.payments.service.gov.uk/v1/payments/hu20sqlact5260q2nanm0q8u93",
10
- "method": "GET"
11
- },
12
- "next_url": {
13
- "href": "https://www.payments.service.gov.uk/secure/bb0a272c-8eaf-468d-b3xf-ae5e000d2231",
14
- "method": "GET"
15
- }
16
- },
17
- "amount": 14500,
18
- "reference" : "12345",
19
- "description": "Pay your council tax",
20
- "return_url": "https://your.service.gov.uk/completed",
21
- "payment_id": "hu20sqlact5260q2nanm0q8u93",
22
- "payment_provider": "worldpay",
23
- "provider_id": "10987654321"
24
- }
@@ -1,5 +0,0 @@
1
- {
2
- "field": "amount",
3
- "code": "P0101",
4
- "description": "Missing mandatory attribute: amount"
5
- }
@@ -1,61 +0,0 @@
1
- {
2
- "amount": 10501,
3
- "description": "Waste carrier registration upper tier",
4
- "reference": "12345",
5
- "language": "en",
6
- "metadata": {
7
- "ledger_code": "AB100",
8
- "an_internal_reference_number": 200
9
- },
10
- "email": "sherlock.holmes@example.com",
11
- "state": {
12
- "status": "failed",
13
- "finished": true,
14
- "message": "Payment was cancelled by the user",
15
- "code": "P0030"
16
- },
17
- "payment_id": "cjgt8i57kavb8jfufhjlh129fm",
18
- "payment_provider": "sandbox",
19
- "created_date": "2022-05-18T11:46:54.697Z",
20
- "refund_summary": {
21
- "status": "unavailable",
22
- "amount_available": 10501,
23
- "amount_submitted": 0
24
- },
25
- "settlement_summary": {},
26
- "card_details": {
27
- "last_digits_card_number": "5100",
28
- "first_digits_card_number": "510510",
29
- "cardholder_name": "Sherlock Holmes",
30
- "expiry_date": "01/24",
31
- "billing_address": {
32
- "line1": "221 Baker Street",
33
- "line2": "Flat b",
34
- "postcode": "NW1 6XE",
35
- "city": "London",
36
- "country": "GB"
37
- },
38
- "card_brand": "Mastercard",
39
- "card_type": "debit"
40
- },
41
- "delayed_capture": false,
42
- "moto": false,
43
- "provider_id": "9fda0405-dc56-4d18-bf53-26167a91a1ac",
44
- "return_url": "https://some-wcr-env.defra.gov.uk/completed",
45
- "authorisation_mode": "web",
46
- "card_brand": "Mastercard",
47
- "_links": {
48
- "self": {
49
- "href": "https://publicapi.payments.service.gov.uk/v1/payments/cjgt8i57kavb8jfufhjlh129fm",
50
- "method": "GET"
51
- },
52
- "events": {
53
- "href": "https://publicapi.payments.service.gov.uk/v1/payments/cjgt8i57kavb8jfufhjlh129fm/events",
54
- "method": "GET"
55
- },
56
- "refunds": {
57
- "href": "https://publicapi.payments.service.gov.uk/v1/payments/cjgt8i57kavb8jfufhjlh129fm/refunds",
58
- "method": "GET"
59
- }
60
- }
61
- }
@@ -1,73 +0,0 @@
1
- {
2
- "amount": 10501,
3
- "description": "Waste carrier registration upper tier",
4
- "reference": "12345",
5
- "language": "en",
6
- "metadata": {
7
- "ledger_code": "AB100",
8
- "an_internal_reference_number": 200
9
- },
10
- "email": "sherlock.holmes@example.com",
11
- "state": {
12
- "status": "created",
13
- "finished": false
14
- },
15
- "payment_id": "cjgt8i57kavb8jfufhjlh129fm",
16
- "payment_provider": "sandbox",
17
- "created_date": "2022-05-18T11:46:54.697Z",
18
- "refund_summary": {
19
- "status": "pending",
20
- "amount_available": 10501,
21
- "amount_submitted": 0
22
- },
23
- "settlement_summary": {},
24
- "card_details": {
25
- "last_digits_card_number": null,
26
- "first_digits_card_number": null,
27
- "cardholder_name": "Sherlock Holmes",
28
- "expiry_date": null,
29
- "billing_address": {
30
- "line1": "221 Baker Street",
31
- "line2": "Flat b",
32
- "postcode": "NW1 6XE",
33
- "city": "London",
34
- "country": "GB"
35
- },
36
- "card_brand": "",
37
- "card_type": null
38
- },
39
- "delayed_capture": false,
40
- "moto": false,
41
- "return_url": "https://some-wcr-env.defra.gov.uk/completed",
42
- "authorisation_mode": "web",
43
- "_links": {
44
- "self": {
45
- "href": "https://publicapi.payments.service.gov.uk/v1/payments/cjgt8i57kavb8jfufhjlh129fm",
46
- "method": "GET"
47
- },
48
- "next_url": {
49
- "href": "https://www.payments.service.gov.uk/secure/c3b8908b-68df-478a-ad94-6a724e614e46",
50
- "method": "GET"
51
- },
52
- "next_url_post": {
53
- "type": "application/x-www-form-urlencoded",
54
- "params": {
55
- "chargeTokenId": "c3b8908b-68df-478a-ad94-6a724e614e46"
56
- },
57
- "href": "https://www.payments.service.gov.uk/secure",
58
- "method": "POST"
59
- },
60
- "events": {
61
- "href": "https://publicapi.payments.service.gov.uk/v1/payments/cjgt8i57kavb8jfufhjlh129fm/events",
62
- "method": "GET"
63
- },
64
- "refunds": {
65
- "href": "https://publicapi.payments.service.gov.uk/v1/payments/cjgt8i57kavb8jfufhjlh129fm/refunds",
66
- "method": "GET"
67
- },
68
- "cancel": {
69
- "href": "https://publicapi.payments.service.gov.uk/v1/payments/cjgt8i57kavb8jfufhjlh129fm/cancel",
70
- "method": "POST"
71
- }
72
- }
73
- }
@@ -1,5 +0,0 @@
1
- {
2
- "field": "payment_id",
3
- "code": "P0200",
4
- "description": "Invalid attribute value: payment_id. No payment matched the payment ID you provided."
5
- }
@@ -1,9 +0,0 @@
1
- {
2
- "amount": 2000,
3
- "state": {
4
- "status": "failed",
5
- "finished": true,
6
- "message": "Payment expired",
7
- "code": "P0020"
8
- }
9
- }
@@ -1,4 +0,0 @@
1
- {
2
- "code": "P0200",
3
- "description": "Not found"
4
- }
@@ -1,75 +0,0 @@
1
- {
2
- "amount": 10501,
3
- "description": "Waste carrier registration upper tier",
4
- "reference": "12345",
5
- "language": "en",
6
- "metadata": {
7
- "ledger_code": "AB100",
8
- "an_internal_reference_number": 200
9
- },
10
- "email": "sherlock.holmes@example.com",
11
- "state": {
12
- "status": "submitted",
13
- "finished": false
14
- },
15
- "payment_id": "cjgt8i57kavb8jfufhjlh129fm",
16
- "payment_provider": "sandbox",
17
- "created_date": "2022-05-18T11:46:54.697Z",
18
- "refund_summary": {
19
- "status": "pending",
20
- "amount_available": 10501,
21
- "amount_submitted": 0
22
- },
23
- "settlement_summary": {},
24
- "card_details": {
25
- "last_digits_card_number": "5100",
26
- "first_digits_card_number": "510510",
27
- "cardholder_name": "Sherlock Holmes",
28
- "expiry_date": "01/24",
29
- "billing_address": {
30
- "line1": "221 Baker Street",
31
- "line2": "Flat b",
32
- "postcode": "NW1 6XE",
33
- "city": "London",
34
- "country": "GB"
35
- },
36
- "card_brand": "Mastercard",
37
- "card_type": "debit"
38
- },
39
- "delayed_capture": false,
40
- "moto": false,
41
- "provider_id": "9fda0405-dc56-4d18-bf53-26167a91a1ac",
42
- "return_url": "https://some-wcr-env.defra.gov.uk/completed",
43
- "authorisation_mode": "web",
44
- "card_brand": "Mastercard",
45
- "_links": {
46
- "self": {
47
- "href": "https://publicapi.payments.service.gov.uk/v1/payments/cjgt8i57kavb8jfufhjlh129fm",
48
- "method": "GET"
49
- },
50
- "next_url": {
51
- "href": "https://www.payments.service.gov.uk/secure/18a144e1-f6d8-4d73-a11a-a45187da9138",
52
- "method": "GET"
53
- },
54
- "next_url_post": {
55
- "type": "application/x-www-form-urlencoded",
56
- "params": {
57
- "chargeTokenId": "18a144e1-f6d8-4d73-a11a-a45187da9138"
58
- },
59
- "href": "https://www.payments.service.gov.uk/secure",
60
- "method": "POST"
61
- },
62
- "events": {
63
- "href": "https://publicapi.payments.service.gov.uk/v1/payments/cjgt8i57kavb8jfufhjlh129fm/events",
64
- "method": "GET"
65
- },
66
- "refunds": {
67
- "href": "https://publicapi.payments.service.gov.uk/v1/payments/cjgt8i57kavb8jfufhjlh129fm/refunds",
68
- "method": "GET"
69
- },
70
- "cancel": {
71
- "href": "https://publicapi.payments.service.gov.uk/v1/payments/cjgt8i57kavb8jfufhjlh129fm/cancel",
72
- "method": "POST"
73
- }
74
- }
75
- }
@@ -1,62 +0,0 @@
1
- {
2
- "amount": 10501,
3
- "description": "Waste carrier registration upper tier",
4
- "reference": "12345",
5
- "language": "en",
6
- "metadata": {
7
- "ledger_code": "AB100",
8
- "an_internal_reference_number": 200
9
- },
10
- "email": "sherlock.holmes@example.com",
11
- "state": {
12
- "status": "success",
13
- "finished": true
14
- },
15
- "payment_id": "cnnffa1e6s3u9a6n24u2cp527d",
16
- "payment_provider": "sandbox",
17
- "created_date": "2022-05-18T11:52:13.669Z",
18
- "refund_summary": {
19
- "status": "available",
20
- "amount_available": 10501,
21
- "amount_submitted": 0
22
- },
23
- "settlement_summary": {
24
- "capture_submit_time": "2022-05-18T11:52:39.172Z",
25
- "captured_date": "2022-05-18"
26
- },
27
- "card_details": {
28
- "last_digits_card_number": "5100",
29
- "first_digits_card_number": "510510",
30
- "cardholder_name": "Sherlock Holmes",
31
- "expiry_date": "01/24",
32
- "billing_address": {
33
- "line1": "221 Baker Street",
34
- "line2": "Flat b",
35
- "postcode": "NW1 6XE",
36
- "city": "London",
37
- "country": "GB"
38
- },
39
- "card_brand": "Mastercard",
40
- "card_type": "debit"
41
- },
42
- "delayed_capture": false,
43
- "moto": false,
44
- "provider_id": "9bb0c2c1-d0c5-4a63-8945-f4240e06f8ae",
45
- "return_url": "https://some-wcr-env.defra.gov.uk/completed",
46
- "authorisation_mode": "web",
47
- "card_brand": "Mastercard",
48
- "_links": {
49
- "self": {
50
- "href": "https://publicapi.payments.service.gov.uk/v1/payments/cnnffa1e6s3u9a6n24u2cp527d",
51
- "method": "GET"
52
- },
53
- "events": {
54
- "href": "https://publicapi.payments.service.gov.uk/v1/payments/cnnffa1e6s3u9a6n24u2cp527d/events",
55
- "method": "GET"
56
- },
57
- "refunds": {
58
- "href": "https://publicapi.payments.service.gov.uk/v1/payments/cnnffa1e6s3u9a6n24u2cp527d/refunds",
59
- "method": "GET"
60
- }
61
- }
62
- }