@AJAX-ERROR@(TESTMODE) Transactions of this market type cannot be processed on this system.
I was able to fix it by adding these 2 extra fields in the send request:
// add to process_payment_form() method $fields['x_market_type'] = '2'; $fields['x_device_type'] = '8';
Then I noticed all the response is coming back as XML. So I had to convert the response:
$xml = @simplexml_load_string($response_fields[0], 'SimpleXMLElement', LIBXML_NOCDATA);
$re_code = (string) $xml->ResponseCode;
if ($re_code != '1')
{
$errors = '';
foreach ($xml->Errors as $e)
{
$msg = (string) $e->Error->ErrorText;
$errors .= str_replace('<br/>', "\n", $msg);
}
throw new Phpr_ApplicationException($errors);
}
/*
* Successful payment. Set order status and mark it as paid.
*/
$this->log_payment_attempt(
$order,
'Successful payment',
1,
$this->prepare_fields_log($fields),
$response_fields,
$response,
(string) $xml->CVVResultCode,
$this->get_ccv_status_text((string) $xml->CVVResultCode),
(string) $xml->AVSResultCode,
$this->get_avs_status_text((string) $xml->AVSResultCode)
);
/*
* Log transaction create/change
*/
$this->update_transaction_status(
$host_obj,
$order,
(string) $xml->TransID,
$this->get_status_name((string) $xml->ResponseCode),
(string) $xml->ResponseCode
);
Is anyone else seeing this problem? Either Authorize.net updated their API, or it's something I'm doing since my setup is always a bit different than the base install.

Help












