Reputation: 413
I need some help to understand how can I track the data to insert into the db after the payment has been processed on authorize.net using SIM method. I'm storing all data in to session array and after hitting "Confirm and pay now Button" it goes to authorize.net transaction detail page and upon click the button for the URL to go back to my website it comes there with no values of my session I need to store after the payment has been processed.
Please see my form values below
<FORM action="<? echo $url ?>" method="POST" id="phormy" name="phormy">
<input type='hidden' name='x_relay_url' value='http://example.com/.confirm.php'>
<INPUT TYPE='hidden' NAME="x_relay_response" VALUE="false">
<input type='hidden' name='x_email_customer' value='TRUE'>
<input type="hidden" name="x_url" value="http://example.com/.confirm.php" />
<input type='hidden' name='x_login' value='<?php echo $loginID; ?>' />
<input type='hidden' name='x_amount' value='<?php echo $total_cost;?>'>
<input type='hidden' name='x_invoice_num' value='<?php echo $invoice; ?>' />
<input type='hidden' name='x_fp_sequence' value='<?php echo $sequence; ?>' />
<input type='hidden' name='x_fp_timestamp' value='<?php echo $timeStamp; ?>' />
<input type='hidden' name='x_fp_hash' value='<?php echo $fingerprint; ?>' />
<input type='hidden' name='x_test_request' value='<?php echo $testMode; ?>' />
<input type='hidden' name='x_card_num' value='<?php echo $_SESSION['confirmstep2'] ['Creditcartnumber'];?>'>
<input type='hidden' name='x_exp_date' value='<?php echo $_SESSION['confirmstep2']['Creditcartmonth'].substr($_SESSION['confirmstep2']['Creditcartyear'],-2);?>'>
<input type='hidden' name='x_first_name' value='<?php echo $_SESSION['confirmstep2']['firstname'];?>'>
<input type='hidden' name='x_last_name' value='<?php echo $_SESSION['confirmstep2']['lastname'];?>'>
<input type='hidden' name='x_address' value='<?php echo $_SESSION['confirmstep2']['address'];?>'>
<input type='hidden' name='x_city' value='<?php echo $_SESSION['confirmstep2']['city'];?>'>
<input type='hidden' name='x_state' value='<?php echo $_SESSION['confirmstep2']['state'];?>'>
<input type='hidden' name='x_zip' value='<?php echo $_SESSION['confirmstep2']['zip'];?>'>
<input type='hidden' name='x_email' value='<?php echo $_SESSION['confirmstep2']['email'];?>'>
<input type='hidden' name='x_description' value='Your account is now setup. Thank you for using Quick Reach Media for your Mobile QR site provider. '>
<input type='hidden' name='subscription_start' value='<?php echo date('m-d-yyyy');?>'>
<input type='hidden' name='renew' value='F'>
<input type='hidden' name='on_length' value='52'>
<!-- POST VARS -->
<input type='hidden' name='checkSession' value='<?php echo $_SESSION['checkSession'];?>'>
<input type='hidden' name='check' value='<?php echo $_SESSION['check'];?>'>
Please let me know how can I manage sessions using this form or what should be the process to get all session data after payment has been made?
Upvotes: 0
Views: 727
Reputation: 219814
You need to use Silent Post. Silent Post is just like Paypal's IPN in that after a transaction is processed the information from that transaction is sent via POST to a URL you specify. You can also use Relay Response to get some of that information and display a thank you page after the payment is successful.
FYI, storing the credit card number in a session requires that the site and server passes PCI compliance standards. You may want to consider an alternative means of doing this.
Disclaimer: I wrote the Silent Post article
Upvotes: 1