lib/soofapay.rb in soofapay-0.1.1 vs lib/soofapay.rb in soofapay-0.1.2
- old
+ new
@@ -21,11 +21,11 @@
@url = "https://api.soofapay.com/v1/transactions/#{tid}/"
headers = {"Authorization": @client_secret,
"X-TILL": @till_no}
begin
response = RestClient.get(@url, headers = headers)
- data = JSON.parse(response).to_json
+ data = JSON.parse(response)
_status = data["status"]
if response.code == SUCCESSFUL
@transaction = Transaction.new(data)
return true
end
@@ -56,5 +56,8 @@
rescue RestClient::Forbidden
raise SoofaPermissionError.new("Your are not allowed to perform this action. Please ensure you use your correct till number and client_secret")
end
end
end
+
+
+