I have created a new Gateway module for Active Merchant. Everything works fine, except that I have to use Crub instead of the built in ssl_post method.
I have overwritten the ssl_post method as such
def ssl_post(url, data, headers={})
url = "#{url}?#{data}"
curlObj = Curl::Easy.new(url)
curlObj.connect_timeout = 15
curlObj.timeout = 15
curlObj.header_in_body = false
curlObj.ssl_verify_peer = false
curlObj.post_body = ''
curlObj.perform()
data = curlObj.body_str
data
end
The main problem seems to be some kind of time out when doing ssl_post (the original).
The class should let me just remove my ssl_post method to use use the original one, but for some reason it just won't connect.
I have the same problem when trying to wget from the command line, or using Net::HTTP, though I can not figure out why. Even when using verify_mode = OpenSSL::SSL::VERIFY_NONE it still won't work.
Any ideas would be helpful. I would like to submit a pull request, but I don't think that's proper if I add a new dependency just for this ( which is almost something I am just missing).