Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8170665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:11:57+00:00 2026-06-06T21:11:57+00:00

I’ve signed up for Authorize.net and successfully: Converted my shopping cart into data that

  • 0

I’ve signed up for Authorize.net and successfully:

  1. Converted my shopping cart into data that sends TO Authorize.net and processes it.
  2. Using Relay Response, sent user to my thank you page.

I cannot get my head wrapped around how to actually UPDATE my database once the transaction goes through. What terms do I search for to figure this out? Nearly all the documentation shows part of the solution but doesn’t actually instruct on where to put it and how to receive it back.

On my Shopping Cart page, I have a list of hidden input fields that Authorize.net provides. I plugged in my dollar amount, description, etc. I assume I put another hidden field called “x_po_num” and have the value be my dynamic PO# in the database.

Isn’t there a way to actually retrieve it on the Thank You page so I cross reference to the database and make simply add a value of “confirmed” or something?

How do I retrieve that value that was sent TO Authorize.net?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T21:11:59+00:00Added an answer on June 6, 2026 at 9:11 pm

    The data you get is simply in a $_POST array which you can var_dump() to see what values it contains.

    Here’s a sample relay response script in PHP:

    <?php
    
    // Retrieving and defining Form Data from Post command body from Authorize.Net
    $ResponseCode       = trim($_POST["x_response_code"]);
    $ResponseReasonText = trim($_POST["x_response_reason_text"]);
    $ResponseReasonCode = trim($_POST["x_response_reason_code"]);
    $AVS                = trim($_POST["x_avs_code"]);
    $TransID            = trim($_POST["x_trans_id"]);
    $AuthCode           = trim($_POST["x_auth_code"]);
    $Amount             = trim($_POST["x_amount"]);
    
    ?>
    
        <html>
        <head>
        <title>Transaction Receipt Page</title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
        <body bgcolor="#FFFFFF">
    
    <?php
        // Test to see if this is a test transaction.
        if ($TransID === 0 && $ResponseCode === 1)
        {
            // If so, print it to the screen, so we know that the transaction will not be processed.
    ?>
    
        <table align="center">
            <tr>
                <th><font size="5" color="red" face="arial">TEST MODE</font></th>
            <tr>
                <th valign="top"><font size="1" color="black" face="arial">This transaction will <u>NOT</u> be processed because your account is in Test Mode.</font></th>
          </tr>
        </table>
    
    <?php
        }
    ?>
    
        <br>
        <br>
    
    <?php
        // Test to see if the transaction resulted in Approvavl, Decline or Error
        if ($ResponseCode === 1)
        {
    ?>
    
        <table align="center">
            <tr>
                <th><font size="3" color="#000000" face="Verdana, Arial, Helvetica, sans-serif">This transaction has been approved.</font></th>
          </tr>
        </table>
    
    <?php
        }
        else if ($ResponseCode === 2)
        {
    ?>
    
        <table align="center">
        <tr>
            <th width="312"><font size="3" color="#000000" face="Verdana, Arial, Helvetica, sans-serif">This transaction has been declined.</font></th>
        </tr>
        </table>
    
    <?php
        }
        else if ($ResponseCode === 3)
        {
    ?>
    
        <table align="center">
        <tr>
            <th colspan="2"><font size="3" color="Red" face="Verdana, Arial, Helvetica, sans-serif">There was an error processing this transaction.</font></th>
        </tr>
        </table>
    
    <?php
        }
    ?>
    
        <br>
        <br>
        <table align="center" width="60%">
        <tr>
            <td align="right" width=175 valign=top><font size="2" color="black" face="arial"><b>Amount:</b></font></td>
            <td align="left"><font size="2" color="black" face="arial">$<?php echo $Amount; ?></td>
        </tr>
    
        <tr>
            <td align="right" width=175 valign=top><font size="2" color="black" face="arial"><b>Transaction ID:</b></font></td><td align="left"><font size="2" color="black" face="arial">
    
    <?php
        if ($TransID === 0)
        {
            echo 'Not Applicable.';
        }
        else
        {
            echo $TransID;
        }
    ?>
    
        </td></tr>
    
        <tr>
            <td align="right" width=175 valign=top><font size="2" color="black" face="arial"><b>Authorization Code:</b></font></td><td align="left"><font size="2" color="black" face="arial">
    
    <?php
        if ($AuthCode === "000000")
        {
            echo 'Not Applicable.';
        }
        else
        {
            echo $AuthCode;
        }
    ?>
    
            </td></tr>
        <tr>
            <td align="right" width=175 valign=top><font size="2" color="black" face="arial"><b>Response Reason:</b></font></td><td align="left"><font size="2" color="black" face="arial">(<?php echo $ResponseReasonCode; ?>)&nbsp;<?php echo $ResponseReasonText; ?></font><font size="1" color="black" face="arial"></td></tr>
        <tr>
    
            <td align="right" width=175 valign=top><font size="2" color="black" face="arial"><b>Address Verification:</b></font></td><td align="left"><font size="2" color="black" face="arial">
    
    <?php
        // Turn the AVS code into the corresponding text string.
        switch ($AVS)
        {
            case "A":
                echo "Address (Street) matches, ZIP does not.";
                break;
            case "B":
                echo "Address Information Not Provided for AVS Check.";
                break;
            case "C":
                echo "Street address and Postal Code not verified for international transaction due to incompatible formats. (Acquirer sent both street address and Postal Code.)";
                break;
            case "D":
                echo "International Transaction:  Street address and Postal Code match.";
                break;
            case "E":
                echo "AVS Error.";
                break;
            case "G":
                echo "Non U.S. Card Issuing Bank.";
                break;
            case "N":
                echo "No Match on Address (Street) or ZIP.";
                break;
            case "P":
                echo "AVS not applicable for this transaction.";
                break;
            case "R":
                echo "Retry. System unavailable or timed out.";
                break;
            case "S":
                echo "Service not supported by issuer.";
                break;
            case "U":
                echo "Address information is unavailable.";
                break;
            case "W":
                echo "9 digit ZIP matches, Address (Street) does not.";
                break;
            case "X":
                echo "Address (Street) and 9 digit ZIP match.";
                break;
            case "Y":
                echo "Address (Street) and 5 digit ZIP match.";
                break;
            case "Z":
                echo "5 digit ZIP matches, Address (Street) does not.";
                break;
            default:
                echo "The address verification system returned an unknown value.";
                break;
            }
    ?>
    
            </td>
        </tr>
        </table>
        </body>
    </html>
    

    You can also use Silent Post. Here is a PHP tutorial that shows how to work with that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace
I am reading a book about Javascript and jQuery and using one of the
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.