Question

I have successful CIM transactions using profileTransAuthCapture, however I cannot find in the docs if it returns a transaction id. I printed out the response, but I did not see one. In the direct Response there is a long string with random strings in, I'm not sure if one of those is it. Anyone know?

Was it helpful?

Solution

It's the seventh field in that string. To get it just do the following:

$response = explode(',', '1,1,1,This transaction has been approved.,S7GS9X,Y,2195560752,INV000001,description of transaction,10.95,CC,auth_capture,876571,John,Smith,,123 Main Street,Townsville,NJ,12345,,800-555-1234,,user@example.com,John,Smith,,123 Main Street,Townsville,NJ,12345,,1.00,,2.00,FALSE,PONUM000001,209D159CA9DB7377279D33A6A9E9678E,P,2,,,,,,,,,,,XXXX1111,Visa,,,,,,,,,,,,,,,,,18272830,100.0.0.1');
$transactionID = $response[6];
echo $transactionID;

See it in action

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top