Welcome Guest, Not a member yet? Register   Sign In
Need a little help with a config file for my custom library...???
#7

[eluser]angelleye[/eluser]
I tried this in my library file and I just get undefined variable, params...

Code:
function PayPal_AP($DataArray = array())
    {
        
        foreach($params as $param)
        {
            $DataArray['Sandbox'] = $param['Sandbox'];
            $DataArray['APIUsername'] = $param['APIUsername'];
            $DataArray['APIPassword'] = $param['APIPassword'];
            $DataArray['APISignature'] = $param['APISignature'];    
        }
        }

So then I tried changing that up a little, since I'm using $config[''] in my config file, I tried this within my class instead...

Code:
$DataArray['Sandbox'] = $config['Sandbox'];
$DataArray['APIUsername'] = $config['APIUsername'];
$DataArray['APIPassword'] = $config['APIPassword'];
$DataArray['APISignature'] = $config['APISignature'];

But then I just get Undefined variables on the $configs.


Messages In This Thread
Need a little help with a config file for my custom library...??? - by El Forum - 12-19-2010, 03:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB