cancel
Showing results for 
Search instead for 
Did you mean: 

AIM PHP - Retrieving Custom Merchant Defined Fields

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?

js2393
Member
1 ACCEPTED SOLUTION

Accepted Solutions

UPDATE: extremely careless mistake: I was using setCustomFields instead of setCustomField

View solution in original post

js2393
Member
1 REPLY 1

UPDATE: extremely careless mistake: I was using setCustomFields instead of setCustomField

js2393
Member