lib/adyen/client.rb
# base URL for API given service and @env
base URL for API given service and @env
base URL for API given service and @env
def service_url_base(service)
      raise ArgumentError, "Please set Client.live_url_prefix to the portion of your merchant-specific URL prior to '-[service]-live.adyenpayments.com'" if @live_url_prefix.nil? and @env == :live
      if @env == :mock
        @mock_service_url_base
      else
        case service
        when "Checkout"
          url = "https://checkout-#{@env}.adyen.com/checkout"
          supports_live_url_prefix = true
        when "CheckoutUtility"
          url = "https://checkout-#{@env}.adyen.com/checkout"
          supports_live_url_prefix = true
        when "Account", "Fund", "Notification", "Hop"
          url = "https://cal-#{@env}.adyen.com/cal/services"
          supports_live_url_prefix = false
        when "Recurring", "Payment", "Payout"
          url = "https://pal-#{@env}.adyen.com/pal/servlet"
          supports_live_url_prefix = true
        when "Terminal"
          url = "https://postfmapi-#{@env}.adyen.com/postfmapi/terminal"
          supports_live_url_prefix = false
        when "DataProtectionService"
          url = "https://ca-#{@env}.adyen.com/ca/services"
          supports_live_url_prefix = false
        else
          raise ArgumentError, "Invalid service specified"
        end
        if @env == :live && supports_live_url_prefix
          url.insert(8, "#{@live_url_prefix}-")
          url["adyen.com"] = "adyenpayments.com"
        end
        return url
      end
    end
def service_url_base ( service ) raise ArgumentError , "Please set Client.live_url_prefix to the portion of your merchant-specific URL prior to '-[service]-live.adyenpayments.com'" if @live_url_prefix . nil? and @env == :live if @env == :mock @mock_service_url_base else case service when "Checkout" url = "https://checkout-#{@env}.adyen.com/checkout" supports_live_url_prefix = true when "CheckoutUtility" url = "https://checkout-#{@env}.adyen.com/checkout" supports_live_url_prefix = true when "Account" , "Fund" , "Notification" , "Hop" url = "https://cal-#{@env}.adyen.com/cal/services" supports_live_url_prefix = false when "Recurring" , "Payment" , "Payout" url = "https://pal-#{@env}.adyen.com/pal/servlet" supports_live_url_prefix = true when "Terminal" url = "https://postfmapi-#{@env}.adyen.com/postfmapi/terminal" supports_live_url_prefix = false when "DataProtectionService" url = "https://ca-#{@env}.adyen.com/ca/services" supports_live_url_prefix = false else raise ArgumentError , "Invalid service specified" end if @env == :live && supports_live_url_prefix url . insert ( 8 , "#{@live_url_prefix}-" ) url [ "adyen.com" ] = "adyenpayments.com" end return url end end
base URL for API given service and @env
base URL for API given service and @env
service
<not_specific>