I'm using Authorize.Net for integrating Online Credit Card Processing.I'm using the the form which will redirect to the Authorize.net hosted form after clicking the submit button. My sample code is as below
<?PHP
$loginID = "My_LOGIN_ID";// login id
$transactionKey = "MY_TRANS_KEY";//transaction key
$amount = "19.99";
$description = "SAMPLE TRANSACTION";
$label = "Submit Payment";//label for submit button
$testMode = "false";
$url = "https://test.authorize.net/gateway/transact.dll";
$invoice = date(YmdHis);
$sequence = rand(1, 1000);
$timeStamp = time ();
if( phpversion() >= '5.1.2' )
{ $fingerprint = hash_hmac("md5", $loginID . "^" . $sequence . "^" . $timeStamp . "^" . $amount . "^", $transactionKey); }
else
{ $fingerprint = bin2hex(mhash(MHASH_MD5, $loginID . "^" . $sequence . "^" . $timeStamp . "^" . $amount . "^", $transactionKey)); }
?>
<form method='post' action='<?php echo $url; ?>' >
<input type='hidden' name='x_login' value='<?php echo $loginID; ?>' />
<input type='hidden' name='x_amount' value='<?php echo $amount; ?>' />
<input type='hidden' name='x_description' value='<?php echo $description; ?>' />
<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_show_form' value='<?php echo PAYMENT_FORM; ?>' />
<input type='submit' value='<?php echo $label; ?>' />
</form>
After submitting the Authorize.net hosted form with correct credit card and personal details, i got the transaction success message as below
I also got the email with transaction detail. Now i want to save the transaction details such as transaction id, Invoice Number, credit card type and customer details on my database after transaction success. Is there any background process to save the information into database? Thanks in advance.