defra_ruby_mocks 2.3.2 → 2.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/defra_ruby_mocks/govpay_controller.rb +5 -3
  3. data/app/jobs/defra_ruby_mocks/application_job.rb +6 -0
  4. data/app/jobs/defra_ruby_mocks/govpay_payment_callback_job.rb +17 -0
  5. data/app/services/defra_ruby_mocks/govpay_create_payment_service.rb +41 -13
  6. data/app/services/defra_ruby_mocks/govpay_get_payment_service.rb +74 -16
  7. data/lib/defra_ruby_mocks/version.rb +1 -1
  8. data/spec/dummy/log/test.log +1488 -0
  9. data/spec/examples.txt +119 -110
  10. data/spec/fixtures/files/govpay/create_payment_created_response.json +24 -0
  11. data/spec/fixtures/files/govpay/create_payment_error_response.json +5 -0
  12. data/spec/fixtures/files/govpay/get_payment_response_cancelled.json +61 -0
  13. data/spec/fixtures/files/govpay/get_payment_response_created.json +73 -0
  14. data/spec/fixtures/files/govpay/get_payment_response_error.json +5 -0
  15. data/spec/fixtures/files/govpay/get_payment_response_failure.json +9 -0
  16. data/spec/fixtures/files/govpay/get_payment_response_not_found.json +4 -0
  17. data/spec/fixtures/files/govpay/get_payment_response_submitted.json +75 -0
  18. data/spec/fixtures/files/govpay/get_payment_response_success.json +62 -0
  19. data/spec/fixtures/{payment_request_invalid.xml → files/worldpay/payment_request_invalid.xml} +0 -0
  20. data/spec/fixtures/{payment_request_valid.xml → files/worldpay/payment_request_valid.xml} +0 -0
  21. data/spec/fixtures/{refund_request_invalid.xml → files/worldpay/refund_request_invalid.xml} +0 -0
  22. data/spec/fixtures/{refund_request_valid.xml → files/worldpay/refund_request_valid.xml} +0 -0
  23. data/spec/fixtures/{unrecognised_request.xml → files/worldpay/unrecognised_request.xml} +0 -0
  24. data/spec/requests/govpay_spec.rb +20 -0
  25. data/spec/requests/worldpay_spec.rb +3 -3
  26. data/spec/services/govpay_create_payment_service_spec.rb +44 -0
  27. data/spec/services/govpay_get_payment_service_spec.rb +30 -0
  28. data/spec/services/worldpay_payment_service_spec.rb +2 -2
  29. data/spec/services/worldpay_refund_service_spec.rb +2 -2
  30. data/spec/services/worldpay_request_handler_service_spec.rb +3 -3
  31. metadata +36 -12
data/spec/examples.txt CHANGED
@@ -1,121 +1,130 @@
1
1
  example_id | status | run_time |
2
2
  ------------------------------------------------------------------- | ------ | --------------- |
3
- ./spec/defra_ruby_mocks_spec.rb[1:1:1] | passed | 0.00217 seconds |
4
- ./spec/defra_ruby_mocks_spec.rb[1:2:1:1] | passed | 0.00014 seconds |
5
- ./spec/defra_ruby_mocks_spec.rb[1:2:2:1] | passed | 0.00011 seconds |
6
- ./spec/lib/configuration_spec.rb[1:1:1:1] | passed | 0.00008 seconds |
7
- ./spec/lib/configuration_spec.rb[1:1:2:1] | passed | 0.00009 seconds |
8
- ./spec/lib/configuration_spec.rb[1:1:3:1] | passed | 0.0009 seconds |
9
- ./spec/lib/configuration_spec.rb[1:1:4:1] | passed | 0.00008 seconds |
10
- ./spec/lib/configuration_spec.rb[1:2:1:1] | passed | 0.00008 seconds |
3
+ ./spec/defra_ruby_mocks_spec.rb[1:1:1] | passed | 0.0021 seconds |
4
+ ./spec/defra_ruby_mocks_spec.rb[1:2:1:1] | passed | 0.00011 seconds |
5
+ ./spec/defra_ruby_mocks_spec.rb[1:2:2:1] | passed | 0.00012 seconds |
6
+ ./spec/lib/configuration_spec.rb[1:1:1:1] | passed | 0.00007 seconds |
7
+ ./spec/lib/configuration_spec.rb[1:1:2:1] | passed | 0.00008 seconds |
8
+ ./spec/lib/configuration_spec.rb[1:1:3:1] | passed | 0.00008 seconds |
9
+ ./spec/lib/configuration_spec.rb[1:1:4:1] | passed | 0.00091 seconds |
10
+ ./spec/lib/configuration_spec.rb[1:2:1:1] | passed | 0.00007 seconds |
11
11
  ./spec/lib/configuration_spec.rb[1:2:2:1] | passed | 0.00008 seconds |
12
- ./spec/lib/configuration_spec.rb[1:2:3:1] | passed | 0.0001 seconds |
13
- ./spec/lib/configuration_spec.rb[1:2:4:1] | passed | 0.00008 seconds |
14
- ./spec/requests/company_spec.rb[1:1:1:1] | passed | 0.00845 seconds |
15
- ./spec/requests/company_spec.rb[1:1:2:1] | passed | 0.00352 seconds |
16
- ./spec/requests/company_spec.rb[1:1:3:1:1] | passed | 0.00231 seconds |
17
- ./spec/requests/company_spec.rb[1:1:3:2:1] | passed | 0.00258 seconds |
18
- ./spec/requests/company_spec.rb[1:2:1] | passed | 0.00106 seconds |
19
- ./spec/requests/govpay_spec.rb[1:1:1:1:1] | passed | 0.00344 seconds |
20
- ./spec/requests/govpay_spec.rb[1:1:1:2:1] | passed | 0.00259 seconds |
21
- ./spec/requests/govpay_spec.rb[1:1:2:1:1] | passed | 0.00309 seconds |
22
- ./spec/requests/govpay_spec.rb[1:1:2:2:1] | passed | 0.00426 seconds |
23
- ./spec/requests/govpay_spec.rb[1:2:1:1] | passed | 0.00093 seconds |
24
- ./spec/requests/govpay_spec.rb[1:2:2:1] | passed | 0.00425 seconds |
25
- ./spec/requests/govpay_spec.rb[1:2:3:1] | passed | 0.00353 seconds |
26
- ./spec/requests/officers_spec.rb[1:1:1] | passed | 0.0031 seconds |
27
- ./spec/requests/officers_spec.rb[1:2:1] | passed | 0.00114 seconds |
28
- ./spec/requests/worldpay_spec.rb[1:1:1:1:1:1] | passed | 0.00355 seconds |
29
- ./spec/requests/worldpay_spec.rb[1:1:1:1:2:1] | passed | 0.0026 seconds |
30
- ./spec/requests/worldpay_spec.rb[1:1:1:2:1:1] | passed | 0.04013 seconds |
31
- ./spec/requests/worldpay_spec.rb[1:1:2:1:1:1] | passed | 0.00372 seconds |
32
- ./spec/requests/worldpay_spec.rb[1:1:2:1:2:1] | passed | 0.00412 seconds |
33
- ./spec/requests/worldpay_spec.rb[1:1:2:2:1:1] | passed | 0.00572 seconds |
34
- ./spec/requests/worldpay_spec.rb[1:2:1:1] | passed | 0.00114 seconds |
35
- ./spec/requests/worldpay_spec.rb[1:2:2:1] | passed | 0.00129 seconds |
36
- ./spec/services/companies_house_service_spec.rb[1:1:1:1] | passed | 0.00011 seconds |
37
- ./spec/services/companies_house_service_spec.rb[1:1:2:1:1] | passed | 0.00008 seconds |
38
- ./spec/services/companies_house_service_spec.rb[1:1:2:1:2] | passed | 0.00009 seconds |
39
- ./spec/services/companies_house_service_spec.rb[1:1:2:2:1] | passed | 0.00008 seconds |
40
- ./spec/services/companies_house_service_spec.rb[1:1:2:2:2] | passed | 0.00014 seconds |
41
- ./spec/services/companies_house_service_spec.rb[1:1:2:3:1] | passed | 0.00008 seconds |
12
+ ./spec/lib/configuration_spec.rb[1:2:3:1] | passed | 0.00008 seconds |
13
+ ./spec/lib/configuration_spec.rb[1:2:4:1] | passed | 0.00007 seconds |
14
+ ./spec/requests/company_spec.rb[1:1:1:1] | passed | 0.00172 seconds |
15
+ ./spec/requests/company_spec.rb[1:1:2:1] | passed | 0.1464 seconds |
16
+ ./spec/requests/company_spec.rb[1:1:3:1:1] | passed | 0.00602 seconds |
17
+ ./spec/requests/company_spec.rb[1:1:3:2:1] | passed | 0.00515 seconds |
18
+ ./spec/requests/company_spec.rb[1:2:1] | passed | 0.00241 seconds |
19
+ ./spec/requests/govpay_spec.rb[1:1:1:1:1] | passed | 0.00286 seconds |
20
+ ./spec/requests/govpay_spec.rb[1:1:1:1:2] | passed | 0.01265 seconds |
21
+ ./spec/requests/govpay_spec.rb[1:1:1:2:1] | passed | 0.00163 seconds |
22
+ ./spec/requests/govpay_spec.rb[1:1:2:1:1] | passed | 0.0029 seconds |
23
+ ./spec/requests/govpay_spec.rb[1:1:2:2:1] | passed | 0.0027 seconds |
24
+ ./spec/requests/govpay_spec.rb[1:2:1:1] | passed | 0.0009 seconds |
25
+ ./spec/requests/govpay_spec.rb[1:2:2:1] | passed | 0.00364 seconds |
26
+ ./spec/requests/govpay_spec.rb[1:2:3:1] | passed | 0.00382 seconds |
27
+ ./spec/requests/officers_spec.rb[1:1:1] | passed | 0.00327 seconds |
28
+ ./spec/requests/officers_spec.rb[1:2:1] | passed | 0.00161 seconds |
29
+ ./spec/requests/worldpay_spec.rb[1:1:1:1:1:1] | passed | 0.00288 seconds |
30
+ ./spec/requests/worldpay_spec.rb[1:1:1:1:2:1] | passed | 0.00211 seconds |
31
+ ./spec/requests/worldpay_spec.rb[1:1:1:2:1:1] | passed | 0.00581 seconds |
32
+ ./spec/requests/worldpay_spec.rb[1:1:2:1:1:1] | passed | 0.00368 seconds |
33
+ ./spec/requests/worldpay_spec.rb[1:1:2:1:2:1] | passed | 0.0039 seconds |
34
+ ./spec/requests/worldpay_spec.rb[1:1:2:2:1:1] | passed | 0.00236 seconds |
35
+ ./spec/requests/worldpay_spec.rb[1:2:1:1] | passed | 0.00822 seconds |
36
+ ./spec/requests/worldpay_spec.rb[1:2:2:1] | passed | 0.00117 seconds |
37
+ ./spec/services/companies_house_service_spec.rb[1:1:1:1] | passed | 0.00008 seconds |
38
+ ./spec/services/companies_house_service_spec.rb[1:1:2:1:1] | passed | 0.00006 seconds |
39
+ ./spec/services/companies_house_service_spec.rb[1:1:2:1:2] | passed | 0.00006 seconds |
40
+ ./spec/services/companies_house_service_spec.rb[1:1:2:2:1] | passed | 0.00006 seconds |
41
+ ./spec/services/companies_house_service_spec.rb[1:1:2:2:2] | passed | 0.00007 seconds |
42
+ ./spec/services/companies_house_service_spec.rb[1:1:2:3:1] | passed | 0.00007 seconds |
42
43
  ./spec/services/companies_house_service_spec.rb[1:1:2:3:2] | passed | 0.00008 seconds |
43
- ./spec/services/companies_house_service_spec.rb[1:1:2:4:1] | passed | 0.00009 seconds |
44
- ./spec/services/companies_house_service_spec.rb[1:1:2:4:2] | passed | 0.00008 seconds |
45
- ./spec/services/companies_house_service_spec.rb[1:1:2:5:1] | passed | 0.00008 seconds |
44
+ ./spec/services/companies_house_service_spec.rb[1:1:2:4:1] | passed | 0.00006 seconds |
45
+ ./spec/services/companies_house_service_spec.rb[1:1:2:4:2] | passed | 0.00007 seconds |
46
+ ./spec/services/companies_house_service_spec.rb[1:1:2:5:1] | passed | 0.00007 seconds |
46
47
  ./spec/services/companies_house_service_spec.rb[1:1:2:5:2] | passed | 0.00008 seconds |
47
- ./spec/services/companies_house_service_spec.rb[1:1:2:6:1] | passed | 0.00008 seconds |
48
- ./spec/services/companies_house_service_spec.rb[1:1:2:6:2] | passed | 0.00009 seconds |
49
- ./spec/services/companies_house_service_spec.rb[1:1:2:7:1] | passed | 0.00009 seconds |
50
- ./spec/services/companies_house_service_spec.rb[1:1:2:7:2] | passed | 0.00008 seconds |
51
- ./spec/services/companies_house_service_spec.rb[1:1:2:8:1] | passed | 0.00009 seconds |
52
- ./spec/services/companies_house_service_spec.rb[1:1:2:8:2] | passed | 0.00008 seconds |
53
- ./spec/services/companies_house_service_spec.rb[1:1:2:9:1] | passed | 0.00008 seconds |
54
- ./spec/services/companies_house_service_spec.rb[1:1:2:9:2] | passed | 0.00008 seconds |
55
- ./spec/services/companies_house_service_spec.rb[1:1:3:1] | passed | 0.00008 seconds |
56
- ./spec/services/companies_house_service_spec.rb[1:1:3:2] | passed | 0.0001 seconds |
57
- ./spec/services/companies_house_service_spec.rb[1:1:3:3] | passed | 0.00009 seconds |
48
+ ./spec/services/companies_house_service_spec.rb[1:1:2:6:1] | passed | 0.00006 seconds |
49
+ ./spec/services/companies_house_service_spec.rb[1:1:2:6:2] | passed | 0.00008 seconds |
50
+ ./spec/services/companies_house_service_spec.rb[1:1:2:7:1] | passed | 0.00006 seconds |
51
+ ./spec/services/companies_house_service_spec.rb[1:1:2:7:2] | passed | 0.00006 seconds |
52
+ ./spec/services/companies_house_service_spec.rb[1:1:2:8:1] | passed | 0.00006 seconds |
53
+ ./spec/services/companies_house_service_spec.rb[1:1:2:8:2] | passed | 0.00007 seconds |
54
+ ./spec/services/companies_house_service_spec.rb[1:1:2:9:1] | passed | 0.00007 seconds |
55
+ ./spec/services/companies_house_service_spec.rb[1:1:2:9:2] | passed | 0.00006 seconds |
56
+ ./spec/services/companies_house_service_spec.rb[1:1:3:1] | passed | 0.00006 seconds |
57
+ ./spec/services/companies_house_service_spec.rb[1:1:3:2] | passed | 0.00009 seconds |
58
+ ./spec/services/companies_house_service_spec.rb[1:1:3:3] | passed | 0.00006 seconds |
58
59
  ./spec/services/companies_house_service_spec.rb[1:1:3:4] | passed | 0.00007 seconds |
59
- ./spec/services/companies_house_service_spec.rb[1:1:4:1:1] | passed | 0.0001 seconds |
60
- ./spec/services/companies_house_service_spec.rb[1:1:4:2:1] | passed | 0.00012 seconds |
61
- ./spec/services/worldpay_payment_service_spec.rb[1:1:1:1] | passed | 0.00011 seconds |
62
- ./spec/services/worldpay_payment_service_spec.rb[1:1:2:1:1] | passed | 0.0003 seconds |
63
- ./spec/services/worldpay_payment_service_spec.rb[1:1:2:1:2] | passed | 0.00033 seconds |
64
- ./spec/services/worldpay_payment_service_spec.rb[1:1:2:1:3] | passed | 0.00028 seconds |
65
- ./spec/services/worldpay_payment_service_spec.rb[1:1:2:1:4] | passed | 0.00033 seconds |
66
- ./spec/services/worldpay_payment_service_spec.rb[1:1:2:1:5:1] | passed | 0.00038 seconds |
67
- ./spec/services/worldpay_payment_service_spec.rb[1:1:2:1:5:2] | passed | 0.00035 seconds |
68
- ./spec/services/worldpay_payment_service_spec.rb[1:1:2:1:5:3] | passed | 0.00035 seconds |
69
- ./spec/services/worldpay_payment_service_spec.rb[1:1:2:1:6:1] | passed | 0.00033 seconds |
70
- ./spec/services/worldpay_payment_service_spec.rb[1:1:3:1] | passed | 0.00032 seconds |
71
- ./spec/services/worldpay_refund_service_spec.rb[1:1:1:1:1] | passed | 0.00121 seconds |
72
- ./spec/services/worldpay_refund_service_spec.rb[1:1:1:1:2] | passed | 0.0003 seconds |
73
- ./spec/services/worldpay_refund_service_spec.rb[1:1:1:1:3] | passed | 0.00126 seconds |
74
- ./spec/services/worldpay_refund_service_spec.rb[1:1:1:1:4] | passed | 0.00045 seconds |
75
- ./spec/services/worldpay_refund_service_spec.rb[1:1:1:1:5] | passed | 0.00039 seconds |
76
- ./spec/services/worldpay_refund_service_spec.rb[1:1:1:1:6] | passed | 0.00038 seconds |
77
- ./spec/services/worldpay_refund_service_spec.rb[1:1:1:1:7] | passed | 0.00031 seconds |
78
- ./spec/services/worldpay_refund_service_spec.rb[1:1:2:1] | passed | 0.11633 seconds |
79
- ./spec/services/worldpay_request_handler_service_spec.rb[1:1:1:1:1] | passed | 0.00098 seconds |
80
- ./spec/services/worldpay_request_handler_service_spec.rb[1:1:1:1:2] | passed | 0.00079 seconds |
81
- ./spec/services/worldpay_request_handler_service_spec.rb[1:1:1:2:1] | passed | 0.00057 seconds |
82
- ./spec/services/worldpay_request_handler_service_spec.rb[1:1:1:2:2] | passed | 0.00049 seconds |
83
- ./spec/services/worldpay_request_handler_service_spec.rb[1:1:1:3:1] | passed | 0.00051 seconds |
84
- ./spec/services/worldpay_resource_service_spec.rb[1:1:1:1] | passed | 0.00069 seconds |
85
- ./spec/services/worldpay_resource_service_spec.rb[1:1:1:2] | passed | 0.00065 seconds |
86
- ./spec/services/worldpay_resource_service_spec.rb[1:1:1:3] | passed | 0.00046 seconds |
60
+ ./spec/services/companies_house_service_spec.rb[1:1:4:1:1] | passed | 0.00007 seconds |
61
+ ./spec/services/companies_house_service_spec.rb[1:1:4:2:1] | passed | 0.00008 seconds |
62
+ ./spec/services/govpay_create_payment_service_spec.rb[1:1:1:1] | passed | 0.00279 seconds |
63
+ ./spec/services/govpay_create_payment_service_spec.rb[1:1:1:2] | passed | 0.00266 seconds |
64
+ ./spec/services/govpay_create_payment_service_spec.rb[1:1:1:3] | passed | 1.5 seconds |
65
+ ./spec/services/govpay_create_payment_service_spec.rb[1:1:1:4] | passed | 0.00286 seconds |
66
+ ./spec/services/govpay_get_payment_service_spec.rb[1:1:1:1] | passed | 0.00076 seconds |
67
+ ./spec/services/govpay_get_payment_service_spec.rb[1:1:1:2] | passed | 0.00081 seconds |
68
+ ./spec/services/worldpay_payment_service_spec.rb[1:1:1:1] | passed | 0.00012 seconds |
69
+ ./spec/services/worldpay_payment_service_spec.rb[1:1:2:1:1] | passed | 0.00034 seconds |
70
+ ./spec/services/worldpay_payment_service_spec.rb[1:1:2:1:2] | passed | 0.00032 seconds |
71
+ ./spec/services/worldpay_payment_service_spec.rb[1:1:2:1:3] | passed | 0.00034 seconds |
72
+ ./spec/services/worldpay_payment_service_spec.rb[1:1:2:1:4] | passed | 0.00045 seconds |
73
+ ./spec/services/worldpay_payment_service_spec.rb[1:1:2:1:5:1] | passed | 0.0003 seconds |
74
+ ./spec/services/worldpay_payment_service_spec.rb[1:1:2:1:5:2] | passed | 0.00031 seconds |
75
+ ./spec/services/worldpay_payment_service_spec.rb[1:1:2:1:5:3] | passed | 0.0004 seconds |
76
+ ./spec/services/worldpay_payment_service_spec.rb[1:1:2:1:6:1] | passed | 0.00034 seconds |
77
+ ./spec/services/worldpay_payment_service_spec.rb[1:1:3:1] | passed | 0.00027 seconds |
78
+ ./spec/services/worldpay_refund_service_spec.rb[1:1:1:1:1] | passed | 0.00122 seconds |
79
+ ./spec/services/worldpay_refund_service_spec.rb[1:1:1:1:2] | passed | 0.00069 seconds |
80
+ ./spec/services/worldpay_refund_service_spec.rb[1:1:1:1:3] | passed | 0.00029 seconds |
81
+ ./spec/services/worldpay_refund_service_spec.rb[1:1:1:1:4] | passed | 0.00032 seconds |
82
+ ./spec/services/worldpay_refund_service_spec.rb[1:1:1:1:5] | passed | 0.00038 seconds |
83
+ ./spec/services/worldpay_refund_service_spec.rb[1:1:1:1:6] | passed | 0.00028 seconds |
84
+ ./spec/services/worldpay_refund_service_spec.rb[1:1:1:1:7] | passed | 0.00028 seconds |
85
+ ./spec/services/worldpay_refund_service_spec.rb[1:1:2:1] | passed | 0.00304 seconds |
86
+ ./spec/services/worldpay_request_handler_service_spec.rb[1:1:1:1:1] | passed | 0.0006 seconds |
87
+ ./spec/services/worldpay_request_handler_service_spec.rb[1:1:1:1:2] | passed | 0.00094 seconds |
88
+ ./spec/services/worldpay_request_handler_service_spec.rb[1:1:1:2:1] | passed | 0.00047 seconds |
89
+ ./spec/services/worldpay_request_handler_service_spec.rb[1:1:1:2:2] | passed | 0.00057 seconds |
90
+ ./spec/services/worldpay_request_handler_service_spec.rb[1:1:1:3:1] | passed | 0.00052 seconds |
91
+ ./spec/services/worldpay_resource_service_spec.rb[1:1:1:1] | passed | 0.00056 seconds |
92
+ ./spec/services/worldpay_resource_service_spec.rb[1:1:1:2] | passed | 0.00049 seconds |
93
+ ./spec/services/worldpay_resource_service_spec.rb[1:1:1:3] | passed | 0.00047 seconds |
87
94
  ./spec/services/worldpay_resource_service_spec.rb[1:1:1:4] | passed | 0.00047 seconds |
88
- ./spec/services/worldpay_resource_service_spec.rb[1:1:2:1] | passed | 0.00063 seconds |
89
- ./spec/services/worldpay_resource_service_spec.rb[1:1:2:2] | passed | 0.00055 seconds |
90
- ./spec/services/worldpay_resource_service_spec.rb[1:1:2:3] | passed | 0.00054 seconds |
91
- ./spec/services/worldpay_resource_service_spec.rb[1:1:2:4] | passed | 0.00051 seconds |
92
- ./spec/services/worldpay_resource_service_spec.rb[1:1:3:1] | passed | 0.00176 seconds |
93
- ./spec/services/worldpay_resource_service_spec.rb[1:1:4:1] | passed | 0.00921 seconds |
95
+ ./spec/services/worldpay_resource_service_spec.rb[1:1:1:5:1] | passed | 0.00052 seconds |
96
+ ./spec/services/worldpay_resource_service_spec.rb[1:1:2:1] | passed | 0.00061 seconds |
97
+ ./spec/services/worldpay_resource_service_spec.rb[1:1:2:2] | passed | 0.00058 seconds |
98
+ ./spec/services/worldpay_resource_service_spec.rb[1:1:2:3] | passed | 0.00059 seconds |
99
+ ./spec/services/worldpay_resource_service_spec.rb[1:1:2:4] | passed | 0.00056 seconds |
100
+ ./spec/services/worldpay_resource_service_spec.rb[1:1:3:1] | passed | 0.002 seconds |
101
+ ./spec/services/worldpay_resource_service_spec.rb[1:1:4:1] | passed | 0.00051 seconds |
94
102
  ./spec/services/worldpay_response_service_spec.rb[1:1:1:1:1] | passed | 0.00048 seconds |
95
- ./spec/services/worldpay_response_service_spec.rb[1:1:1:1:2] | passed | 0.00064 seconds |
96
- ./spec/services/worldpay_response_service_spec.rb[1:1:1:1:3:1] | passed | 0.00046 seconds |
97
- ./spec/services/worldpay_response_service_spec.rb[1:1:1:1:3:2] | passed | 0.00047 seconds |
98
- ./spec/services/worldpay_response_service_spec.rb[1:1:1:1:4:1] | passed | 0.00044 seconds |
99
- ./spec/services/worldpay_response_service_spec.rb[1:1:1:1:4:2] | passed | 0.0005 seconds |
103
+ ./spec/services/worldpay_response_service_spec.rb[1:1:1:1:2] | passed | 0.0005 seconds |
104
+ ./spec/services/worldpay_response_service_spec.rb[1:1:1:1:3:1] | passed | 0.00045 seconds |
105
+ ./spec/services/worldpay_response_service_spec.rb[1:1:1:1:3:2] | passed | 0.00051 seconds |
106
+ ./spec/services/worldpay_response_service_spec.rb[1:1:1:1:3:3:1] | passed | 0.00045 seconds |
107
+ ./spec/services/worldpay_response_service_spec.rb[1:1:1:1:4:1] | passed | 0.00047 seconds |
108
+ ./spec/services/worldpay_response_service_spec.rb[1:1:1:1:4:2] | passed | 0.00048 seconds |
100
109
  ./spec/services/worldpay_response_service_spec.rb[1:1:1:1:5:1] | passed | 0.00047 seconds |
101
- ./spec/services/worldpay_response_service_spec.rb[1:1:1:1:5:2] | passed | 0.00041 seconds |
102
- ./spec/services/worldpay_response_service_spec.rb[1:1:1:1:6:1] | passed | 0.00044 seconds |
103
- ./spec/services/worldpay_response_service_spec.rb[1:1:1:1:6:2] | passed | 0.00047 seconds |
104
- ./spec/services/worldpay_response_service_spec.rb[1:1:1:1:7:1] | passed | 0.00046 seconds |
105
- ./spec/services/worldpay_response_service_spec.rb[1:1:1:1:7:2] | passed | 0.00047 seconds |
106
- ./spec/services/worldpay_response_service_spec.rb[1:1:1:1:8:1] | passed | 0.00046 seconds |
107
- ./spec/services/worldpay_response_service_spec.rb[1:1:1:1:8:2] | passed | 0.00048 seconds |
108
- ./spec/services/worldpay_response_service_spec.rb[1:1:2:1:1] | passed | 0.00048 seconds |
109
- ./spec/services/worldpay_response_service_spec.rb[1:1:2:1:2] | passed | 0.00048 seconds |
110
- ./spec/services/worldpay_response_service_spec.rb[1:1:2:1:3:1] | passed | 0.00047 seconds |
111
- ./spec/services/worldpay_response_service_spec.rb[1:1:2:1:3:2] | passed | 0.00048 seconds |
110
+ ./spec/services/worldpay_response_service_spec.rb[1:1:1:1:5:2] | passed | 0.00045 seconds |
111
+ ./spec/services/worldpay_response_service_spec.rb[1:1:1:1:6:1] | passed | 0.00048 seconds |
112
+ ./spec/services/worldpay_response_service_spec.rb[1:1:1:1:6:2] | passed | 0.0005 seconds |
113
+ ./spec/services/worldpay_response_service_spec.rb[1:1:1:1:7:1] | passed | 0.00047 seconds |
114
+ ./spec/services/worldpay_response_service_spec.rb[1:1:1:1:7:2] | passed | 0.00052 seconds |
115
+ ./spec/services/worldpay_response_service_spec.rb[1:1:1:1:8:1] | passed | 0.00047 seconds |
116
+ ./spec/services/worldpay_response_service_spec.rb[1:1:1:1:8:2] | passed | 0.00051 seconds |
117
+ ./spec/services/worldpay_response_service_spec.rb[1:1:2:1:1] | passed | 0.00047 seconds |
118
+ ./spec/services/worldpay_response_service_spec.rb[1:1:2:1:2] | passed | 0.01025 seconds |
119
+ ./spec/services/worldpay_response_service_spec.rb[1:1:2:1:3:1] | passed | 0.0005 seconds |
120
+ ./spec/services/worldpay_response_service_spec.rb[1:1:2:1:3:2] | passed | 0.00049 seconds |
112
121
  ./spec/services/worldpay_response_service_spec.rb[1:1:2:1:4:1] | passed | 0.00047 seconds |
113
- ./spec/services/worldpay_response_service_spec.rb[1:1:2:1:4:2] | passed | 0.00045 seconds |
114
- ./spec/services/worldpay_response_service_spec.rb[1:1:2:1:5:1] | passed | 0.00048 seconds |
115
- ./spec/services/worldpay_response_service_spec.rb[1:1:2:1:5:2] | passed | 0.00042 seconds |
116
- ./spec/services/worldpay_response_service_spec.rb[1:1:2:1:6:1] | passed | 0.00045 seconds |
117
- ./spec/services/worldpay_response_service_spec.rb[1:1:2:1:6:2] | passed | 0.00045 seconds |
118
- ./spec/services/worldpay_response_service_spec.rb[1:1:2:1:7:1] | passed | 0.00044 seconds |
119
- ./spec/services/worldpay_response_service_spec.rb[1:1:2:1:7:2] | passed | 0.00047 seconds |
122
+ ./spec/services/worldpay_response_service_spec.rb[1:1:2:1:4:2] | passed | 0.00048 seconds |
123
+ ./spec/services/worldpay_response_service_spec.rb[1:1:2:1:5:1] | passed | 0.00046 seconds |
124
+ ./spec/services/worldpay_response_service_spec.rb[1:1:2:1:5:2] | passed | 0.0006 seconds |
125
+ ./spec/services/worldpay_response_service_spec.rb[1:1:2:1:6:1] | passed | 0.0005 seconds |
126
+ ./spec/services/worldpay_response_service_spec.rb[1:1:2:1:6:2] | passed | 0.00047 seconds |
127
+ ./spec/services/worldpay_response_service_spec.rb[1:1:2:1:7:1] | passed | 0.00051 seconds |
128
+ ./spec/services/worldpay_response_service_spec.rb[1:1:2:1:7:2] | passed | 0.00053 seconds |
120
129
  ./spec/services/worldpay_response_service_spec.rb[1:1:2:1:8:1] | passed | 0.00049 seconds |
121
- ./spec/services/worldpay_response_service_spec.rb[1:1:2:1:8:2] | passed | 0.00048 seconds |
130
+ ./spec/services/worldpay_response_service_spec.rb[1:1:2:1:8:2] | passed | 0.00051 seconds |
@@ -0,0 +1,24 @@
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
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "field": "amount",
3
+ "code": "P0101",
4
+ "description": "Missing mandatory attribute: amount"
5
+ }
@@ -0,0 +1,61 @@
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
+ }
@@ -0,0 +1,73 @@
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
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "field": "payment_id",
3
+ "code": "P0200",
4
+ "description": "Invalid attribute value: payment_id. No payment matched the payment ID you provided."
5
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "amount": 2000,
3
+ "state": {
4
+ "status": "failed",
5
+ "finished": true,
6
+ "message": "Payment expired",
7
+ "code": "P0020"
8
+ }
9
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "code": "P0200",
3
+ "description": "Not found"
4
+ }
@@ -0,0 +1,75 @@
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
+ }
@@ -0,0 +1,62 @@
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
+ }