cancel
Showing results for 
Search instead for 
Did you mean: 

working with DPM - can't get response vars returned

 

 

I'm working from pg 75 of DirectPost_guide.pdf

 

says to create 3 pages...

 

checkout_form.php

relay_response.php

order_receipt.php

 

all working - except the only response var that seem to come back if approved  = $response->transaction_id

 

I want to see many more like $response->x_amount - $response->x_description - $response->x_type and others

 

I tried to add to my database on both relay_response.php and order_receipt.php but the only one = $response->transaction_id

 

BTW: ALSO in settings of test account I turned on - Transaction Details API - but that didn't help...              

 

Q: How do I see / capture all the other VARS? 

coolcat
Contributor
4 REPLIES 4

if https://developer.authorize.net/tools/paramdump/index.php works then, something on the relay_Response is not working.

RaynorC1emen7
Expert

Thanks - yes I agree - but what?

 

this is from the .pdf on pg 76.... I just added email code where it says to and i send me  an email but ONLY =

$response->transaction_id SHOWS! ---  the OTHER fields are blank....

 

 

It seems like the = require_once 'anet_php_sdk/AuthorizeNet.php might be messing this up or duplicated in the sdk and manual code or something? so where are the other fields?

 

 

-------

 

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
</head>

<body>

 


Create relay_response.php.

 


<?php require_once 'anet_php_sdk/AuthorizeNet.php'; // The SDK $redirect_url = "http://YOUR_DOMAIN.com/receipt_page.php"; // Where the user will end up.
$api_login_id = 'YOUR_API_LOGIN_ID';
$md5_setting = ""; // Your MD5 Setting
$response = new AuthorizeNetSIM($api_login_id, $md5_setting); if ($response->isAuthorizeNet())
{
if ($response->approved)
{
// Do your processing here.

// I ADDED email code to send me following fields in body

$seestuff = 'test'.$response->transaction_id.'-'.$response->x_amount.'-'.$response->x_first_name.'-'.$response->x_last_name.'-'.$response->x_address.'-'.$response->x_response_code.'-'.$response->x_response_reason_code.'-'.$response->x_response_reason_text;

// email code here
echo $seestuff; // in body
// code 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.";
}?>

 

 

 

 


</body>
</html>

 

so you are getting

test123456789----------  (red text is the transactionID)?

Might help to log the entire response to a file. Try logging print_r($response, true) and then see what comes out.