In my code I have defined a custom field:
$transaction->setCustomFields('cart_id', '1'); $response = $transaction->authorizeAndCapture(); if ($response->approved) { $cart_id = $response->cart_id; //...do stuff with $cart_id }
However, I get this error suggesting that "$response->cart_id" is not correct:
Notice: Undefined property: AuthorizeNetAIM_Response::$cart_id
How do I retreive the custom fields from the $response object?
Also, in the email I receive as a merchant, only cart_id shows up (with no value) despite having defined 3 other custom fields.
========== MERCHANT DEFINED ========= 0 : cart_id
What am I doing wrong?
Solved! Go to Solution.
06-19-2012 10:10 AM
UPDATE: extremely careless mistake: I was using setCustomFields instead of setCustomField
06-19-2012 10:15 AM
UPDATE: extremely careless mistake: I was using setCustomFields instead of setCustomField
06-19-2012 10:15 AM