Rock.Financial.GatewayComponent.GetAttributeValue C# (CSharp) Method

GetAttributeValue() public method

Gets the attribute value for the gateway
public GetAttributeValue ( FinancialGateway financialGateway, string key ) : string
financialGateway FinancialGateway The financial gateway.
key string The key.
return string
        public string GetAttributeValue( FinancialGateway financialGateway, string key )
        {
            if ( financialGateway.AttributeValues == null )
            {
                financialGateway.LoadAttributes();
            }

            var values = financialGateway.AttributeValues;
            if ( values != null && values.ContainsKey( key ) )
            {
                var keyValues = values[key];
                if ( keyValues != null )
                {
                    return keyValues.Value;
                }
            }

            return string.Empty;
        }

Same methods

GatewayComponent::GetAttributeValue ( string key ) : string