Reply
Member
Posts: 2
Registered: ‎07-03-2013

Returning transaction ID for CIM

I am setting up my script with the CIM API.

 

My question is, is there a way to return the transaction id for the transaction what was just processed?

 

I have this at the end so far:

if ($cim->isSuccessful())
{
$approval_code = $cim->getAuthCode();

}

// Print the results of the request
echo '<strong> Response Summary:</strong> ' .
$cim->getResponseSummary() . '';
echo '<strong>Approval code:</strong> ' . $approval_code;

}

 

But that doesnt give me anything on the transaction id. I need that number and write to my database, so if I can't get the trans id this way, is there a better/different way to get it?

 

Thank you.

Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: Returning transaction ID for CIM

The transactionID should return with the authorization code. Not sure how you do that in php.

Member
Posts: 2
Registered: ‎07-03-2013

Re: Returning transaction ID for CIM

I get the following for the output:

Request Response Summary: Response code: I00001 Message: Successful.Approval code: EMUXHV

 

 

 

I don't get anything close to the transaction id. Am I requesting the wrong response or something?

Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: Returning transaction ID for CIM

doesn't look like you getting the whole response. It should look like something like page 84 on the xml documentation

http://developer.authorize.net/api/cim/

Posts: 2,765
Topics: 57
Kudos: 251
Blog Posts: 67
Registered: ‎12-05-2011

Re: Returning transaction ID for CIM

Hello,

 

I noticed you found your own answer and posted to stackoverflow.  For the benefit of others, I'm going to add your your solution here:

 

$trans_id = $cim->getTransactionID();

 

 

Richard