$b) { $key = pack("H*",md5($key)); } $key = str_pad($key, $b, chr(0x00)); $ipad = str_pad('', $b, chr(0x36)); $opad = str_pad('', $b, chr(0x5c)); $k_ipad = $key ^ $ipad ; $k_opad = $key ^ $opad; return md5($k_opad . pack("H*",md5($k_ipad . $data))); } //get payment information //set up to talk to authnet $x_login = "6cP3rJ2j"; $x_version = "3.1"; $currency = ""; $tstamp = time(); //go get transact key $query = "SELECT * FROM pp_content WHERE page = 'txn' LIMIT 1"; $all = mysql_query($query) or die ('no query '.mysql_error()); $row = mysql_fetch_row($all); $txnkey = $row[1]; //get sequence $query = "SELECT * FROM pp_content WHERE page = 'sequence' LIMIT 1"; $all = mysql_query($query) or die ('no query '.mysql_error()); $row = mysql_fetch_row($all); $sequence = $row[1]; //add 1 to sequence $query = "UPDATE pp_content SET data = data + 1 WHERE page = 'sequence' LIMIT 1"; mysql_query($query) or die ('no sequence update '.mysql_error()); /////////////////////added because of the double charging thing? What's going on??? if($ship_info){ $pieces = explode("|",$ship_info); $ship_type = $pieces[0]; $ship_cost = $pieces[1]; $before = $x_amount; $x_amount += $ship_cost; } $fs = strpos($name," "); $fname = substr($txt,0,$fs); $lname = substr($txt,$fs); $data['x_amount'] = $x_amount; $data['x_login'] = $x_login; //$data['x_trans_key'] = $txnkey; $data['x_version'] = $x_version; $data['x_test_request'] = "FALSE"; $data['x_first_name'] = $fname; $data['x_last_name'] = $lname; $data['x_address'] = $bill_address; $data['x_city'] = $bill_city; $data['x_zip'] = $bill_zip; $data['x_country'] = $bill_country; $data['x_phone'] = $phone1; $data['x_email'] = $email; $data['x_email_customer'] = "FALSE"; $data['x_merchant_email'] = "freddy@freddythunder.com"; $data['x_invoice_num'] = $sequence; $data['x_description'] = "Horizon Motorsports LLC. - PitBike PitStop"; $data['x_method'] = "CC"; $data['x_type'] = "AUTH_CAPTURE"; $data['x_card_num'] = preg_replace("/[^0-9]/","",$x_card_num); $cc_exp = $month."/".$year; $data['x_exp_date'] = $cc_exp; $data['x_card_code'] = $x_ccv; ////insertFP $data['x_fp_sequence'] = $sequence; $tstamp = time(); $loginid = $x_login; $currency = ""; $data['x_fp_timestamp'] = $tstamp; $data['x_fp_hash'] = hmac($txnkey,$loginid."^".$sequence."^".$tstamp."^".$x_amount."^".$currency); $senddata = ""; reset($data); while(list($key,$val) = each($data)){ $senddata .= $key."=".urlencode($val)."&"; } //strips last & $senddata = preg_replace("/&$/","",$senddata); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://secure.authorize.net/gateway/transact.dll"); curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); curl_setopt($ch, CURLOPT_PROXY, "proxy.shr.secureserver.net:3128"); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_POSTFIELDS, $senddata); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); //curl_setopt($ch, CURLOPT_TIMEOUT, 120); $response = curl_exec($ch) or die ("there is no curl!! error: ".curl_error($ch)." ".curl_errno($ch)); curl_close($ch); $response = explode(",",$response); ?> UTVUniverse :: Side x Side :: <? echo $dynafo; ?>
YOUR TRANSACTION HAS BEEN PROCESSED
'UPS Next Day Air','02'=>'UPS 2nd Day Air','03'=>'UPS Ground'); $order_info .= "--||Shipping Charges ".$ship_name[$ship_type]."||--||1||".$ship_cost; } $query = "INSERT INTO pp_orders VALUES ('','$insert_id','$sequence','','$order_info','$before','$ship_cost','$x_amount','APPROVED','$response[4]','$cartno','$time')"; $success = mysql_query($query) or die ('no query '.mysql_error()); $order_id = $sequence; $query = "UPDATE pp_accounts SET order_id = '$order_id' WHERE id = '$insert_id' LIMIT 1"; $success = mysql_query($query) or die ('no query '.mysql_error()); $query = "SELECT * FROM pp_carts WHERE cartno='$cartno' && name LIKE 'PBPS Gift Card%'"; $all = mysql_query($query) or die ('no query '.mysql_error()); $gc_true = mysql_num_rows($all); if($gc_true){ while($row = mysql_fetch_array($all)){ $this_gc_qty = $row['qty']; $this_gc_amount = $row['price']; for($as=1;$as<=$this_gc_qty;$as++){ $gcgen = strtoupper(md5(uniqid(rand()))); $sql = "INSERT INTO pp_giftcards VALUES ('','$insert_id','','$gcgen','$this_gc_amount','0')"; mysql_query($sql) or die ('no query '.mysql_error()); } } } ?>

Your transaction has been approved. An email containing a receipt has been sent to . Here is a record or your transaction:

SEND YOUR ELECTRONIC GIFT CARDS

You have purchased some electronic gift cards. Please take this moment to enter in the email address where you would like the gift cards emailed to. If you created an account, you will be able to assign these by logging in later, however, if you did not create an account This will be your only chance to send these gift cards to their recipients.


Recipient Email (Amount: $):


ORDER INVOICE

We're sorry, but your transaction has been declined by the payment authorization gateway. The reason from the payment gateway is as follows:

We're sorry, but an error occured when processing your transaction. Click this link to return to your shopping cart to try the transaction again. The error is reported as follows: