01-17-2013 03:57 PM - edited 01-17-2013 04:08 PM
I am getting this issue when I am attempting to get a response from the transaction using the card present method:
Undefined property: AuthorizeNetCP::$_custom_fields in /vendor/ajbdev/authorizenet-php-api/lib/AuthorizeNetCP.php line 86
I am sending:
$transaction->amount = $amount;
$transaction->device_type = '8';
$response = $transaction->authorizeAndCapture();
The transaction goes through fine, but fails at the response part of it.
I have looked everywhere and it honestly doesn't look like the $this->custom_fields variable is defined in the AuthorizeNetAIM class or the AuthorizeNetCP class. The only way I am able to resolve this issue is by setting it manually in the class. I have tried adding custom fields to the transaction and it's still throwing the same error. Searching for this error on google returns no results.
The line in question (line 86) is the return of this method:
protected function _handleResponse($response)
return new AuthorizeNetCP_Response($response, $this->_x_post_fields['delim_char'], $this->_x_post_fields['encap_char'], $this->_custom_fields);
01-17-2013 04:35 PM
Is in theAuthorizeNetAIM
/** * Only used if merchant wants to send custom fields. */ private $_custom_fields = array();
so it only error if you set a custom field? could use echo the $response ?