Reply
Highlighted
Member
Posts: 1
Registered: ‎11-10-2011

Custom Receipt Page

Hello all,

 

I setup the Direct Post Method on a site with the following the instructions in the manual:

<http://www.authorize.net/support/DirectPost_guide.pdf>.

 

How do I create a custom receipt page including the customer's name?    Currently, the "receipt" contains "Thank you for your purchase! Transaction id: [id_number]"   Obviously, I have little developer experience.

 

Thanks in advance.

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

Re: Custom Receipt Page

The relay response page would have that info, I believe. You would store the parts you want displayed either in your database, associated with the transaction ID, or pass them via the redirect URL. If you're using PHP, my advice is to add something like this to your relay response, then look at the log output so you can see what fields are available:

 

$logfile = "{$_SERVER['DOCUMENT_ROOT']}/log_folder/log.txt";
$handle = fopen($logfile, 'a');
fwrite($handle, print_r($response, true));

 The other option is to have your receipt page look up the transaction using the Transaction Details API (separate from the main SDK) and the GetTransactionDetails() function. This may be a more elegant solution, but I'm not sure if it returns the customer's name as part of the details. Only way to find out is to try it and see.