Reply
Contributor
Posts: 25
Registered: ‎05-20-2013

working with DPM - can't get response vars returned

[ Edited ]

 

 

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? 

Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: working with DPM - can't get response vars returned

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

Contributor
Posts: 25
Registered: ‎05-20-2013

Re: working with DPM - can't get response vars returned

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>

 

Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: working with DPM - can't get response vars returned

so you are getting

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

Posts: 1,609
Topics: 15
Kudos: 201
Solutions: 121
Registered: ‎06-23-2011

Re: working with DPM - can't get response vars returned

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