Prepaid Card Registration – Thank you

Spread the love

’15’) ){}
else{
$valid = false;
$msg.= ‘Please enter valid Card Number
‘;
}
}
else{
$valid = false;
$msg.= ‘Card Number is required
‘;
}

if( $_POST[‘cardCode’] != ”){
$donor_cvv = $_POST[‘cardCode’];
if( (is_numeric($donor_cvv)) && (strlen($donor_cvv) == ‘3’) ){}
else{
$valid = false;
$msg.= ‘Please enter valid CVV
‘;
}
}
else{
$valid = false;
$msg.= ‘CVV is required
‘;
}

if( $_POST[‘expirationDate’] != ”){
$donor_card_expiry = $_POST[‘expirationDate’];
if( (is_numeric($donor_card_expiry)) && (strlen($donor_card_expiry) == ‘4’) ){}
else{
$valid = false;
$msg.= ‘Please enter valid Card Expiry Date
‘;
}
}
else{
$valid = false;
$msg.= ‘Card Expiry Date is required
‘;
}
if($_SESSION[‘cycle’]<>‘Month’)
$valid = false;
//print_r($_SESSION);
if($valid){

$loginname = ‘9L5mzZ6k7’;
$transactionkey = ‘2zpX3wVLGp684F6A’;

/* $loginname = ‘6ng5V8Zy’;
$transactionkey = ‘5w664R7JBLga26fj’; */
include (“data.php”);
include (“authnetfunction.php”);

$user_id = get_current_user_id();
$user_info = get_userdata($user_id);
$user_email = $user_info->user_email;

//define variables to send
$refId = $_SESSION[‘trcode’];
$name = $_SESSION[‘selectedplan’];
if($_SESSION[‘cycle’]==’Month’)
{
$length=’1′;
$unit=’months’;
$startDate = date(“Y-m-d”, strtotime(” +1 months”));
}
else
{
$length=’1′;
$unit=’year’;
$startDate = date(“d/m/Y”, strtotime(” +1 year”));
}
//$amount = $_SESSION[‘planvalue’];
$totalOccurrences = 9999;
$trialOccurrences = 0;
$trialAmount = 0;
$amount = ‘1.00’;
$cardNumber = $_POST[“cardNumber”];
$expirationDate = $_POST[“expirationDate”];
$firstName = $_SESSION[‘firstName’];
$lastName = $_SESSION[‘lastName’];
$address = $_SESSION[‘address1′].’ ‘.$_SESSION[‘address2’];
$city = $_SESSION[‘city’];
$state = $_SESSION[‘State’];
$zip = $_SESSION[‘USZipCode’];
$country = ‘US’;
$phone=$_SESSION[‘validPhone’];
echo “Results

“;

$content =
” .
” .
“.
” . $loginname . ““.
” . $transactionkey . ““.
“.
” . $refId . ““.
“.
” . $name . ““.
“.
“.
“. $length .”“.
“. $unit .”“.
“.
” . $startDate . ““.
“. $totalOccurrences . ““.
“. $trialOccurrences . ““.
“.
“. $amount .”“.
” . $trialAmount . ““.
“.
“.
” . $cardNumber . ““.
” . $expirationDate . ““.
“.
“.
“.
“.$user_id.”“.
“.$user_email.”“.
“.$phone.”“.
“.
“.
“. $firstName . ““.
” . $lastName . ““.

” . $address . “

” .
” . $city .”“.
” . $state .”“.
” . $zip .”“.
““.
““.
““;
//$host = “apitest.authorize.net”;
//send the xml via curl
//echo $content;

$response = send_request_via_curl($host,$path,$content);

//if the connection and send worked $response holds the return from Authorize.net
if ($response)
{
/*
a number of xml functions exist to parse xml results, but they may or may not be avilable on your system
please explore using SimpleXML in php 5 or xml parsing functions using the expat library
in php 4
parse_return is a function that shows how you can parse though the xml return if these other options are not avilable to you
*/
list ($refId, $resultCode, $code, $text, $subscriptionId) =parse_return($response);

//print_r($response);
if($subscriptionId<>”)
{

echo “
“;
echo “
“;
echo “Thank you for updating your billing information. Your account will automatically renew on this day each month, beginning next month. You may log into your account at any time to update your billing profile.”;
echo “
“;
}

/* echo ” Response Code: $resultCode
“;
echo ” Response Reason Code: $code
“;
echo ” Response Text: $text
“;
echo ” Reference Id: $refId
“;
echo ” Subscription Id: $subscriptionId

“;
echo ” Data has been written to data.log

“;
echo $loginname;
echo “
“;
echo $transactionkey;
echo “
“;*/

$fp = fopen(‘data.log’, “a”);
fwrite($fp, “$refId\r\n”);
fwrite($fp, “$subscriptionId\r\n”);
fwrite($fp, “$amount\r\n”);
fclose($fp);

}
else
{
echo “Transaction Failed.
“;
}

}

else
{
if($_POST[‘cardNumber’]==”)
echo $msg;
}

?>

Card Activation Successful – Thank you.

Thank you for activating your prepaid Tech Protection Plan card. Check your email for account details.


Add Your Billing Information
Your account will renew on this day each month. Please add your billing information below. This can be updated at any time by logging into your account. You also have the option of paying the monthly fee in person at Get Tech Plus.


(mmyy)

  [bsbutton text=”Will do Later” link=”http://toledowebdesigns.com/GetTechPlus” target=”This page” style=”default” theme=”default” size=”normal”]

Support Team
Get Tech Plus
325 W. Alexis Road Suite # 2
Toledo, OH 43612

Phone:419-476-7275
Fax:419-476-7243
eMail : support@gettechplus.com