lib/active_merchant/billing/gateways/paypal_commerce_platform/paypal_commerce_platform_common.rb
def ssl_post_request(url, options={})
        @url = url
        url = URI(@url)
        http = Net::HTTP.new(url.host, url.port)
        http.use_ssl = true
        http.verify_mode = OpenSSL::SSL::VERIFY_PEER
        params = {
            :grant_type   => "client_credentials"
        }
        url.query = URI.encode_www_form(params)
        request = Net::HTTP::Post.new(url)
        request["accept"]           = 'application/json'
        request["accept-language"]  = 'en_US'
        request["authorization"]    = "basic #{ encoded_credentials }"
        request["content-type"]   = 'application/x-www-form-urlencoded'

        return_response(http, request)
      end
# SSL request Method to send prepare  /
# Headers and send request to get access token
SSL request Method to send prepare
Headers and send request to get access token
SSL request Method to send prepare Headers and send request to get access token
def ssl_post_request(url, options={})
        @url = url
        url = URI(@url)
        http = Net::HTTP.new(url.host, url.port)
        http.use_ssl = true
        http.verify_mode = OpenSSL::SSL::VERIFY_PEER
        params = {
            :grant_type   => "client_credentials"
        }
        url.query = URI.encode_www_form(params)
        request = Net::HTTP::Post.new(url)
        request["accept"]           = 'application/json'
        request["accept-language"]  = 'en_US'
        request["authorization"]    = "basic #{ encoded_credentials }"
        request["content-type"]   = 'application/x-www-form-urlencoded'
        return_response(http, request)
      end
def ssl_post_request ( url , options = { } ) @url = url url = URI ( @url ) http = Net :: HTTP . new ( url . host , url . port ) http . use_ssl = true http . verify_mode = OpenSSL :: SSL :: VERIFY_PEER params = { :grant_type => "client_credentials" } url . query = URI . encode_www_form ( params ) request = Net :: HTTP :: Post . new ( url ) request [ "accept" ] = 'application/json' request [ "accept-language" ] = 'en_US' request [ "authorization" ] = "basic #{ encoded_credentials }" request [ "content-type" ] = 'application/x-www-form-urlencoded' return_response ( http , request ) end
SSL request Method to send prepare
Headers and send request to get access token
SSL request Method to send prepare Headers and send request to get access token
url
options