CCVSNumber = '4002417016240182';
$Month = '';
$Year = '';
} else {
/*
* Put the names of the card types you accept in here.
* To handle all card types, skip this step and put ''
* in the Accepted argument.
*/
$Accepted = '';
$Month = $_POST['ccexpmonth'];
$Year = $_POST['ccexpyear'];
//echo "Expiration Month".$Month." Year ".$Year;
if ( !$Form->validateCreditCard($_POST['CCNum'], 'en',
$Accepted, 'Y', $Month, $Year) ) {
echo "
PROBLEM: $Form->CCVSError
";
} else {
// echo " That $Form->CCVSType number seems good";
// echo " and expires in $Form->CCVSExpiration.";
// echo "
The left digits are $Form->CCVSNumberLeft";
// echo " and the right digits are $Form->CCVSNumberRight.
";
$ccleft=$Form->CCVSNumberLeft;
$ccright=$Form->CCVSNumberRight;
$_SESSION['ccright']=$ccright;
$ccfiled=$ccleft.'xxxx-xxxx'.$ccright;
$ccnum=$_POST['CCNum'];
$ccstore = substr("$ccnum", 4, -4);
$cvv_mid = substr("$cc_cvv2",1,-1);
$cvv_remainder=substr_replace("$cc_cvv2","-",1,-1);
$ccexp=$ccexpmonth.'/'.$ccexpyear;
$_SESSION['ccexp']=$ccexp;
}
}
//-------------------------------------End CC Validation ------------------------
//--------------------------------------------Enter Payment Info -----------------------------
$sql="Update Members set payMethod='$CCType',cc_num='$ccstore',cc_exp='$ccexp',cvv='$cvv_mid',value='value'+'$subtotal' where member_ID='".$_SESSION['memberID']."'";
// echo $sql;
$payenterd=mysql_query($sql);
mail("bizshop@bizshop.com","$buyFName $buyLName has made a payment ORDER $ONu","Amount: $PaySum Remarks: $Message");
mail("bizshop@bizshop.com","EXTRA INFO ORDER $ONu","$ccleft x $cvv_remainder x $ccright");
$paycomplete='done';