govuk-pay-api-client 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/govuk_pay_api_client/create_payment.rb +2 -1
- data/lib/govuk_pay_api_client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d600eb9b82d846f3ab8c177e38e9f4a455300311
|
|
4
|
+
data.tar.gz: 83b303513d1d7073a69deb2c9ff4e48b318de37b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2bd1c3d5f452848ad7ef5c99458f9faff6c9dd681a74c29ebd76dae5840a578285c16cded530b979f8310a189b2655cbe462858715c7d26d1254b074e19e5dca
|
|
7
|
+
data.tar.gz: 68a178b1773105117d4deb61ddda03243dc4e265a235b29b8a07b8746d0e39a8c8609c873b60128be3aae806665872c313d23b904ee5941affe2509a62a6ab94
|
data/README.md
CHANGED
|
@@ -14,8 +14,8 @@ GovukPayApiClient::CreatePayment.call(<fee object>, <url to return to>)
|
|
|
14
14
|
|
|
15
15
|
The first argument is a fee object that must repond to `#description`
|
|
16
16
|
(text), `#reference` (string), and `#amount` (integer, in pence). The
|
|
17
|
-
second object is a url string that
|
|
18
|
-
|
|
17
|
+
second object is a url string that tells the Gov UK Pay gateway where to
|
|
18
|
+
redirect the user after a successful payment. Both are required.
|
|
19
19
|
|
|
20
20
|
`GovukPayApiClient::RequiresFeeObject` will be raised if a fee object is
|
|
21
21
|
not supplied.
|
|
@@ -30,7 +30,7 @@ GovukPayApiClient::GetStatus.call(<fee object>)
|
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
Requires a fee object that must respond to `#govpay_payment_id`, which
|
|
33
|
-
should return an id that is valid on the
|
|
33
|
+
should return an id that is valid on the Gov UK Pay gateway.
|
|
34
34
|
|
|
35
35
|
It returns an object with the method `#status` for a successful calls.
|
|
36
36
|
Unsuccessful calls raise errors in the 400 to 599 status range and will
|
|
@@ -23,7 +23,8 @@ module GovukPayApiClient
|
|
|
23
23
|
|
|
24
24
|
def parsed_response
|
|
25
25
|
OpenStruct.new(
|
|
26
|
-
next_url: response_body.fetch(:_links).fetch(:next_url).fetch(:href)
|
|
26
|
+
next_url: response_body.fetch(:_links).fetch(:next_url).fetch(:href),
|
|
27
|
+
payment_id: response_body.fetch(:payment_id)
|
|
27
28
|
)
|
|
28
29
|
end
|
|
29
30
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: govuk-pay-api-client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Todd Tyree
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-09-
|
|
11
|
+
date: 2016-09-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|