Ok this strange -
When I put this URL (https://test.authorize.net/gateway/transact.dll)
in your CURL example, you get this response:
The following errors have occurred.
(13) The merchant login ID or password is invalid or the account is
inactive.
But when running MacPorts PHP it returns blank. This example returns
the correct response with Marc's PHP package (5.2.5).
Could this be perhaps an Apache thing?
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://test.authorize.net/gateway/transact.dll
");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
_______________________
Craig Hoffman
iChat / AIM: mountain.dog
_______________________
On Jan 23, 2009, at 9:36 AM, Craig Hoffman wrote:
what does the following PHP example do? I get this:
You have reached this web page by typing "example.com",
"example.net", or "example.org" into your web browser.
These domain names are reserved for use in documentation and are not
available for registration. See RFC 2606, Section 3.
Ok, I guess CURL is working. Excellent. I wonder why my script
doesn't work with MacPorts PHP...
_______________________
Craig Hoffman
iChat / AIM: mountain.dog
_______________________
On Jan 23, 2009, at 9:23 AM, Chris Janton wrote:
On 2009-01-23 , at 08:57 , Craig Hoffman wrote:
Thanks for responding. I pasted a code snippet below. Basically
it sends an array to Authorize.Net for processing. Authorize.Net
responds with transaction details (approved, declined, wrong
address, etc...).
When CURL is working, using Liyanage PHP I get this response:
what does the following PHP example do? In theory it will return
the text of the web page which reads like this
"
You have reached this web page by typing "example.com",
"example.net", or "example.org" into your web browser.
These domain names are reserved for use in documentation and are
not available for registration. See RFC 2606, Section 3.
"
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'example.com');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch);
echo $output;
?>
8)
----------------------------------
Chris Janton - face at CentosPrime dot COM
Netminder for Opus1.COM
_______________________________________________
macports-users mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
_______________________________________________
macports-users mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users