cancel
Showing results for 
Search instead for 
Did you mean: 

AIM PHP - PASS VARIABLE TO RESULTS

Hello,

 

Can someone please help me out.  I've been researching this topic for the past few days and can not seem to come up with a reasonalbe answer or solution.

 

I'm trying to display a customized results page that includes the TRANSACTION ID and ORDER TOTAL. These 2 variables are being returned from Authorize.net.  A SESSION variable is not passing them to my results page, approved.php.  Why is this happening?  How do I pass them?

 

Here is the code I am using:

PHP file (process.php)

 

if ($response->approved) {
session_start();
$_SESSION['trans_id'] = $response->transaction_id;
echo '<script language="Javascript">';
echo 'window.location="/approved.php"';
echo '</script>';
}
else
{
echo '<script language="Javascript">';
echo 'window.location="/declined.html"';
echo '</script>';
}

 

PHP file (approved.php)

<?php
session_start();
$trans_id = $_SESSION['trans_id'];
echo $trans_id;

?>

 

What's happening here? There has got to be a way to display the transaction id on screen on a customized page after processing the transaction, right? Any help is appreicated.

 

Thanks.

book2014
Member
1 REPLY 1

Thanks for all the help! It's good to know there is a dedicated support team over at Authorize.net. After a week of researching and trial and error, I was able to figure out a solution.

 

Just a suggestion... You guys need to have a developer on staff, someone who can support your own code and moderate these forums. The phone support techs are only able to cover the basics and then refer us to the PDF's.

Had to store values into database and pass from there.

book2014
Member