Showing results for 
Search instead for 
Did you mean: 

Is PHP/Curl not working on CIM updates?

Is PHP/Curl not working on CIM updates?
This program was working and it just stopped about a week or two ago. - we don't use it very often.

Also, I have my sandbox setup and am not seeing an update into CIM - same as the live system - from the PHP/Curl program that was working.  
How do I trace the attempt?
I've debugged the program to see that all required fields are correct, and I'm not getting an error code - it's just not updating.
Does anyone here actually help out on code?  Maybe something has been deprecated.


I'm sorry - I've worked with XML before - I have an payment application that I built, but in that, there is a send.  I can't find a send in this code, and I'm not sure what I'm doing the echo on.
I would assume 
echo error_messages[];
would work, but it errors out.  It works when sending a payment through.


the send?

There is a require('include/authorizenet.cim.class.php');

see if you can find createCustomerProfileRequest in that php file


 Is this how that php look like?

If so, in the 

function process($retries = 3)


$this->response = curl_exec($ch);


echo $this->response


It is blank, so I put an echo $this->xml just before the curlopt_POST and here that is:
(this is not real data)
3xhfj5kfu67f  28283pT7579554v
Carr, D individual D Carr

23 Trail Dr.

Lake St. Louis MO 63367 US 4111111111111111 2017-04 D Carr

23 Trail Dr.

Lake St. Louis MO 63367 US


Does verify the address or credit card in the sandbox for CIM?  It's not real data.


Do I have it set up right for test mode?  $test_mode = true

function AuthNetCim($login, $transkey, $test_mode)
$this->login = $login;
$this->transkey = $transkey;
$this->test_mode = $test_mode;
$subdomain = ($this->test_mode) ? 'apitest' : 'api';
$this->url = "https://" . $subdomain . "";
//$this->url = "";

$this->response is blank, that would be the issue.

are you running this test using the sandbox account on your production server?


if it sending to the wrong server, it will return an account not valid or something in the response.

<messages><resultCode>Error</resultCode><message><code>E00007</code><text>User authentication failed due to invalid authentication values.</text></message></messages>

Do I have it set up right for test mode?  $test_mode = true

function AuthNetCim($login, $transkey, $test_mode)
$this->login = $login;
$this->transkey = $transkey;
$this->test_mode = $test_mode;
$subdomain = ($this->test_mode) ? 'apitest' : 'api';
$this->url = "https://" . $subdomain . "";
//$this->url = "";


so it would be (if my eyes are not too tired)

for sandbox account, yes.



can you add something like the following after the $this->response = curl_exec($ch);

if (curl_errno($ch)) {
            echo "Error: " . curl_error($ch);


with curl_setopt($ch, CURLOPT_HEADER, 1);

should have something like

HTTP/1.1 200 OK
Server: Apache
X-Backend-Server: pp-web03
Vary: Accept-Encoding
Content-Type: text/html; charset=UTF-8
Date: Fri, 06 Aug 2010 15:32:00 GMT
Expires: Fri, 06 Aug 2010 01:42:00 GMT
Transfer-Encoding: chunked
X-Powered-By: PHP/5.2.9
X-Cache-Info: not cacheable; response has already expired

Error: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol

This must not be set right:


curl_setopt($ch, CURLOPT_URL, $this->url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: text/xml"));
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $this->xml);
echo "test1-".$this->xml."<BR>";
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$this->response = curl_exec($ch);

did anything change on the server? updated anything?

google show a bunch of reason that your might be getting

"140770FC ssl23_get_server_hello unknown protocol curl"

I put a router before it - I'll bet there is a port that needs to be opened.

Would it be 443?