Welcome Guest, Not a member yet? Register   Sign In
authorize.net SIM integration
#1

[eluser]Unknown[/eluser]
Hi

i want to integrate authorize.net payment gateway using SIM method in CI

Here is my code


$amount = $this->input->post('txt_amount');
///////////////////// Autherize.net //////////////
$data['loginID'] = "3VbJ9b34N";
$data['transactionKey'] = "9269S6e2KDzr8fTW";
$data['amount'] = $amount;
$data['description'] = "Sample Transaction";
$data['label'] = "Confirm Pay Now"; // The is the label on the 'submit' button
$data['testMode'] = "true";

//$url = "https://secure.authorize.net/gateway/transact.dll";
$data['url'] = "https://test.authorize.net/gateway/transact.dll";

// an invoice is generated using the date and time
$data['invoice'] = date('YmdHis');
// a sequence number is randomly generated
$data['sequence'] = rand(1, 1000);
// a timestamp is generated
$data['timeStamp'] = time();

if( phpversion() >= '5.1.2' ){
$data['fingerprint'] = hash_hmac("md5", $data['loginID'] . "^" . $data['sequence'] . "^" . $data['timeStamp'] . "^" . $data['amount'] . "^", $data['transactionKey']);
}else{
$data['fingerprint'] = bin2hex(mhash(MHASH_MD5, $data['loginID'] . "^" . $data['sequence'] . "^" . $data['timeStamp'] . "^" . $data['amount'] . "^", $data['transactionKey']));
}

$data['relay_url'] = WEB_URL.'package/add_more_credit_successful/';
$this->load->view('student/view_confirm_pay', $data);


im not geting the response from auth.net

kindly help me

thanks in advance
#2

[eluser]LittleNinjaCoder[/eluser]
Did you fix this?




Theme © iAndrew 2016 - Forum software by © MyBB