Module: ActiveMerchant::PostsData

Included in:
Billing::Gateway, Billing::Integrations::Nochex::Notification
Defined in:
lib/active_merchant/lib/posts_data.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#included?(base) ⇒ Boolean

Returns:

  • (Boolean)


4
5
6
7
8
# File 'lib/active_merchant/lib/posts_data.rb', line 4

def included?(base)
  base.class_eval do
    attr_accessor :ssl_strict
  end
end

#ssl_post(url, data, headers = {}) ⇒ Object



10
11
12
13
14
15
16
17
18
19
# File 'lib/active_merchant/lib/posts_data.rb', line 10

def ssl_post(url, data, headers = {})
  uri   = URI.parse(url)

  http = Net::HTTP.new(uri.host, uri.port) 

  http.verify_mode    = OpenSSL::SSL::VERIFY_NONE unless @ssl_strict
  http.use_ssl        = true

  http.post(uri.path, data, headers).body      
end