lib/pesapal/merchant.rb in pesapal-1.7.0 vs lib/pesapal/merchant.rb in pesapal-1.8.0
- old
+ new
@@ -246,11 +246,11 @@
# get status response
uri = URI.parse "#{@api_endpoints[:querypaymentdetails]}?#{query_string}"
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
- http.verify_mode = OpenSSL::SSL::VERIFY_NONE
+ http.verify_mode = OpenSSL::SSL::VERIFY_PEER
response = http.request(Net::HTTP::Get.new(uri.request_uri))
response = CGI.parse response.body
response = response['pesapal_response_data'][0].split(',')
{ method: response[1],
@@ -299,10 +299,10 @@
# get status response
uri = URI.parse "#{@api_endpoints[:querypaymentstatus]}?#{query_string}"
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
- http.verify_mode = OpenSSL::SSL::VERIFY_NONE
+ http.verify_mode = OpenSSL::SSL::VERIFY_PEER
response = http.request(Net::HTTP::Get.new(uri.request_uri))
response = CGI.parse response.body
response['pesapal_response_data'][0]
end