RE: Authorize.net Consolidated v.1.0 for AIM

akucharski <[email protected]> 10 Sep 2003 02:35:24 -0000
Newsgroups gmane.comp.web.oscommerce.features
Message-ID <e83adf023e6b4528071f31f7118e6c96@osCommerce-Forums>
This message was sent from: Features
http://forums.oscommerce.com/viewtopic.php?p=227144#227144
----------------------------------------------------------------

[quote="ntwaddel"]I had problems with this working in safe mode since it was executing curl directly.  I have curl compiled into php, so i wanted to use the curl function instead.  I changed this file...

/catalog/includes/modules/authorizenet_direct.php

On the last line

exec("/usr/bin/curl -d \"$data\" https://secure.authorize.net/gateway/transact.dll", $response);

I changed it to this

[code]
        $url = "https://secure.authorize.net/gateway/transact.dll";
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL,$url);
        curl_setopt($ch, CURLOPT_VERBOSE, 0);
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
        $authorize = curl_exec($ch);
        curl_close ($ch);
        $response = split("\,", $authorize);
[/code]

you guys can look over it, i just tested it and it seems to work flawlessly with php safe mode and open_basedir enabled.  Comments are appreciated.[/quote]

The above fix did the trick for me as well.  Thanks everyone!