This commit is contained in:
Nweni
2017-06-30 09:49:51 +06:30
parent 77220ae65b
commit 959102b338
5 changed files with 69 additions and 20 deletions

View File

@@ -77,6 +77,12 @@ class SalePayment < ApplicationRecord
)
rescue Net::OpenTimeout
response = { status: false }
rescue OpenURI::HTTPError
response = { status: false}
rescue SocketError
response = { status: false}
end
return response;
end
@@ -110,6 +116,12 @@ class SalePayment < ApplicationRecord
)
rescue Net::OpenTimeout
response = false
rescue OpenURI::HTTPError
response = { status: false}
rescue SocketError
response = { status: false}
end
else
response = false;
@@ -312,6 +324,12 @@ class SalePayment < ApplicationRecord
}, :timeout => 10)
rescue Net::OpenTimeout
response = { status: false }
rescue OpenURI::HTTPError
response = { status: false}
rescue SocketError
response = { status: false}
end
return response
# puts response.to_json