Please go back and complete these fields:
    " . $errmsg . "

"; } if ($ok) { $cn=@mysql_connect($dbHost,$dbUser,$dbPass); if ($cn) { $db=@mysql_select_db($dbName); if (!$db) { $ok=FALSE; $errmsg.="

An error has occurred within our database system

"; } } else { $ok=FALSE; $errmsg.="

Error accessing our system

"; } } if ($ok) { $sql="select ID from tMember where vcUsername='" . $un . "';"; $result = mysql_query($sql) or die ("Could not get results: " . mysql_error()); $result1=mysql_num_rows($result); if ($result1>0) { $ok=FALSE; $errmsg.="

This username is already in use
Please go back and choose another

"; } mysql_free_result($result); } if ($bTest) { $ac="xxxxxx"; $tc="xxxxxx"; $rc=1; } else { if ($ok) { $ccexp=$expm.substr($expy,2,2); if (strlen($ccexp)<4) { $ccexp="0".$ccexp; } $transaction = new ST_Authorize_Net_Transaction(); $transaction->setLoginInfo("kriv","kriv"); $transaction->setTransactionInfo("Version 3.1","AUTH_CAPTURE",$amt,TRUE,"",""); $transaction->setCreditCardInfo($ccnum,$ccexp,$fn,$ln,"",$addr,$city,$stt,$zip,$co,"0000000000",$em,$cvc); $transaction->setInternalInfo("KRIV Signup","KRIV-".$un,""); $result=$transaction->GetResponse(); if ($result == "" || !isset($result) || $result === null) { $ok=FALSE; $errmsg.="

We are unable to contact our credit card processor right now

Please retry in a few minutes

"; } else { $auth_status = explode(",", $result); // 0 - is 1,2,3 - approval // 5 is A,B,E,G... AVS error codes $rc=$auth_status[0]; $ac=$auth_status[4]; $tc=$auth_status[6]; switch ($rc) { case 1: $appr=1; break; case 2: $ok=FALSE; $appr=0; $errmsg.="

Transaction status: card declined

"; case 3: $ok=FALSE; $appr=0; $errmsg.="

Transaction declined

Error:

".$auth_status[3]; break; case 4: $ok=FALSE; $appr=0; $errmsg.="

Gateway holding this transaction for review

"; break; default: $appr=0; $ok=FALSE; $errmsg.="

Transaction response error - please see Authorize.net information

".$auth_status[3]; } //$errmsg.="

Entire response:
".$result; } } } if ($ok) { $sql="INSERT INTO tMember " . "(vcUsername,vcPassword,vcEmail,dSignup,vcFName,vcLName,vcAddress,vcCity,vcState,vcZIP,vcCountry," . "dExpiration ,vcTransID,vcAuthCode,iStatus,iPmtPlan) " . "VALUES ('" . $un . "','" . $pw . "','" . $em . "',CURDATE(),'" . $fn . "','" . $ln . "','" . $addr . "','" . $city . "','" . $stt . "','" . $zip . "','" . $co . "',DATE_ADD(CURDATE(),".$sqldays."),'" . $tc . "','" . $ac . "',1,".$plan.");"; $result = mysql_query($sql) or die ("Error not enter information: " . mysql_error() . "
" . $sql); $id=mysql_insert_id(); if ($id!=0) { $sql="INSERT INTO tPmt_cc (iMemberID,dDate,dPerEnd,mAmt,vcFName,vcLName,vcAuthCode,vcTransID,iStatus) " . "VALUES (" . $id . ",CURDATE(),DATE_ADD(CURDATE(),".$sqldays."),'" . $amt . "','" . $fn . "','" . $ln . "','" . $ac . "','" . $tc . "'," . $rc . ");"; $result = mysql_query($sql) or die ("P - Error not enter information: " . mysql_error()."

".$sql); } else { $ok=FALSE; $errmsg.="

Error entering payment information

"; } } echo "

Join Krivs Studio

"; if ($ok) { echo "

Signup Completed



"; echo "

Your membership has been processed. You may keep this information for your records:

    "; echo "
  • Username: " . $un . "
  • "; echo "
  • ID Number: " . $id . "
  • "; echo "
  • Authorization Code: " . $ac . "
  • "; echo "
  • Transaction ID: " . $tc . "

"; } else { echo "

Transaction Error



"; echo "

Your signup could not be processed because the following error(s) occurred:

" . $errmsg; echo "

Go Back"; echo "
Home

"; } ?>