Update
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user