cancel
Showing results for 
Search instead for 
Did you mean: 

DPM Integration Issue (Return Response)

I am attempting to test the PHP sample provided in the DPM documentation and seem to be having an issue on the return response as I get the following error:

 

An error occurred while trying to report this transaction to the merchant. An e-mail has been sent to the merchant informing them of the error. The following is the result of the attempt to charge your credit card. 

 

I implimented the code as shown in the example:

 

<?php require_once '../anet_php_sdk/AuthorizeNet.php'; // The SDK
$redirect_url = "MYURL"; // Where the user will end up.
$api_login_id = 'MYAPI';
$md5_setting = ""; // Your MD5 Setting
$response = new AuthorizeNetSIM($api_login_id, $md5_setting); if ($response->isAuthorizeNet())
{
if ($response->approved)
{
// Do your processing here.
$redirect_url .= '?response_code=1&transaction_id=' .
$response->transaction_id;
} else {
$redirect_url .= '?response_code='.$response->response_code . ? '&response_reason_text=' . $response->response_reason_text;
}
// Send the Javascript back to AuthorizeNet, which will redirect user back to your site.
echo AuthorizeNetDPM::getRelayResponseSnippet($redirect_url);
} else
{
echo "Error. Check your MD5 Setting.";
}?>

 

Anyone see anything I missed?

 

Sure would be useful to have some working examples - not excited about the lack of sample code for DPM.

 

Thanks!

 

Guy

guystephens99
Member
1 REPLY 1

I would suggest setting up something to log $_POST to a file in the first line of the page:

$postvals = print_r($_POST, true);
// Log $postvals to a file

Then go to the URL and make sure it's logging properly. Send a transaction through. If you don't get anything, that means Authorize.net isn't hitting the page, and you probably either didn't set the correct URL value on the previous page, or forgot to configure a matching Silent Post URL value in your Authorize.net control panel (see Settings - Transaction Response Settings)

TJPride
Expert