bills-payment 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bills-payment.rb +5 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57c843e7b480b8768f72350747060aa0e6bed4d1360a7aa9c605985c4dae3716
|
4
|
+
data.tar.gz: 6ddffc6ddce310ddb862d20c47562bd01f4fa05e7974497b98ea242dda33ff42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e80ab14b546f7c3fa6aadfea14e67ad14a8fd5d8e9219fc48b6a4fd6e181608d93565525c3e1d23d8fba30d8ff7dd6543f7da8e541bf9a2b9e5a3a3eebabf67
|
7
|
+
data.tar.gz: 1d667e490f1d8343776f1771b201ae499d083555e0191934d74e6713362fbd5b0f7b381907cb84ab084a29def64cb9554cdfb9c36d8589a7335b430e51071593
|
data/lib/bills-payment.rb
CHANGED
@@ -26,9 +26,11 @@ module BillsPayment
|
|
26
26
|
# raise(AuthenticationError, 'Set your API Key using BillsPayment.api_key = <API_KEY>') unless api_key
|
27
27
|
begin
|
28
28
|
url = URI.join(@base_url, api_url).to_s
|
29
|
-
response = RestClient::Request.execute(method: method, url: url, payload: params.to_json)#, headers: request_headers)
|
30
|
-
|
31
|
-
|
29
|
+
# response = RestClient::Request.execute(method: method, url: url, payload: params.to_json)#, headers: request_headers)
|
30
|
+
|
31
|
+
RestClient.post url, params.to_json
|
32
|
+
|
33
|
+
JSON.parse(response) unless response.empty?
|
32
34
|
rescue RestClient::ExceptionWithResponse => e
|
33
35
|
if (response_code = e.http_code) && (response_body = e.http_body)
|
34
36
|
handle_api_error(response_code, JSON.parse(response_body))
|