Class/Module Index [+]

Quicksearch

ActiveMerchant::Billing::Integrations::Gestpay::Common

Public Instance Methods

parse_response(response) click to toggle source
# File lib/active_merchant/billing/integrations/gestpay/common.rb, line 20
def parse_response(response)
  case response
  when /#cryptstring#(.*)#\/cryptstring#/, /#decryptstring#(.*)#\/decryptstring#/
    $1
  when /#error#(.*)#\/error#/
    raise StandardError, "An error occurred retrieving the encrypted string from GestPay: #{$1}"
  else
    raise StandardError, "No response was received by GestPay"
  end
end
ssl_get(url, path) click to toggle source
# File lib/active_merchant/billing/integrations/gestpay/common.rb, line 31
def ssl_get(url, path)
  uri = URI.parse(url)
  site = Net::HTTP.new(uri.host, uri.port)
  site.use_ssl = true
  site.verify_mode    = OpenSSL::SSL::VERIFY_NONE
  site.get(path).body
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.