generate product key and payment option

haiwe already using LimeLm product key option.Now i integrate with payment option for money bookers,i integrated payment option successfully,but in our application itself generate product key,

In payment.php I have add Number of check box, that each check box have one module, that check box select values pass as parameter to paymentsetting.php.

how to pass as parameter for selected check box value to paymentsetting.php

coding for payment.php and paymentsetting.php

payment.php

<?phprequire('PaymentSettings.php');//require('paymentinsert.php');// Only force HTTPS when using Autorize.Net and *not* in test modeif (($UseAuthorizeNetCC || $UseAuthorizeNetBank) && !$AuthNetTest && !(isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on'))){ header("HTTP/1.1 301 Moved Permanently"); header('Location: '.'https://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']); exit;}

if ($UseAuthorizeNetCC || $UseAuthorizeNetBank){ require 'CCProcessor.php'; $cc_proc = new CCProcessor();}

if (sizeof($_POST) && $cc_proc){ $cc_proc->process();

if (!$cc_proc->errors) { // redirect to success page header('Location: '.$ThankYouPage); exit; } if ($cc_proc->is_cc_charge) $AuthNetCCSelected = true; else $AuthNetBankSelected = true;}

$TotalPaymentMethods = 0;

// Count the total payment methods (to hide/show the payment selector)// Also select the default payment. Reorder the if-statements to select a different default.

if ($UseAuthorizeNetCC){ if ($TotalPaymentMethods == 0 && !$AuthNetBankSelected) $AuthNetCCSelected = false;

$TotalPaymentMethods++;}

if ($UseAuthorizeNetBank){ if ($TotalPaymentMethods == 0 && !$AuthNetCCSelected) $AuthNetBankSelected = false;

$TotalPaymentMethods++;}

if ($UsePayPal){ if ($TotalPaymentMethods == 0) $PayPalSelected = false;

$TotalPaymentMethods++;}

if ($UseMoneybookers){ if ($TotalPaymentMethods == 0) $MoneybookersSelected = true;

$TotalPaymentMethods++;}

if ($TotalPaymentMethods == 0){ echo 'You must select at least one payment method in PaymentSettings.php (e.g. $UsePayPal=true;)'; exit;}

$single_price = sprintf('%u.%02u',$AppPrice[0],$AppPrice[1]);

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>Buy <?=$AppName?></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.6.2.min.js"></script>

<script src="http://code.jquery.com/jquery-latest.js"></script><script type="text/javascript"><!--<?php $key = $_SERVER['QUERY_STRING']; if($key=='Free'){$Module=1;}

if($key=='Basic'){$Module=3;}if($key=='Standard'){$Module=6;}if($key=='Professional'){$Module=9;}if($key=='Enterprice'){$Module=11;} ?>var activationcharge=0;function calcTot(dollars, cents, quantity){

var n = Math.abs((cents * quantity) % 100); var zeroString = Math.pow(10, Math.max(0, 2 - Math.floor(n).toString().length)).toString().substr(1);return (dollars * quantity +activationcharge+ Math.floor((cents * quantity) / 100)).toString()+'.'+zeroString+n;}

$(document).ready(function(){

$("#quantity").keypress(function(evt){ var charCode = (evt.which) ? evt.which : event.keyCode; return !(charCode > 31 && (charCode < 48 || charCode > 57));});

var total;

$("#quantity").keyup(function(){ total =(calcTot(<?= $AppPrice[0].','.$AppPrice[1] ?>,$("#quantity").val())); $("#total_price").text(total);

<?phpif ($UseMoneybookers){ if ($UsePayPal) echo 'if ($("#Moneybookers").prop("checked")){$("#mb_amt").attr("value", total);}'; else echo '$("#mb_amt").attr("value", total);';}?>});

total = (calcTot(<?= $AppPrice[0].','.$AppPrice[1] ?>,$("#quantity").val()));

$("#total_price").text(total);

$("#signup_form").submit(function(){ $("#submit").prop("disabled", true);<?phpif ($TotalPaymentMethods == 1){ if ($UsePayPal) echo '$("#progress").html("Proceeding to PayPal for checkout...");'; else if ($UseMoneybookers) echo '$("#progress").html("Proceeding to Moneybookers for checkout...");'; else echo '$("#progress").html("Placing your order - please wait...");';}else{?> if ($("#PayPal").prop("checked")) $("#progress").html("Proceeding to PayPal for checkout..."); else if ($("#Moneybookers").prop("checked")) $("#progress").html("Proceeding to Moneybookers for checkout..."); else $("#progress").html("Placing your order - please wait...");<?php}?>});

$("#Bank").click(function(){ $("#signup_form").attr("action", ""); $("#cc_info").slideUp("fast"); $("#bank_info").slideDown("fast");});$("#Card").click(function(){ $("#signup_form").attr("action", ""); $("#bank_info").slideUp("fast"); $("#cc_info").slideDown("fast");});$("#PayPal").click(function(){ $("#signup_form").attr("action", "<?= $PayPalSandbox ? 'https://www.sandbox.paypal.com/cgi-bin/webscr':'https://www.paypal.com/cgi-bin/webscr' ?>"); $("#cc_info").slideUp("fast"); $("#bank_info").slideUp("fast");<?php if ($UseMoneybookers) echo '$("#mb_amt").attr("value", '.$single_price.');';?>});$("#Moneybookers").click(function(){ $("#signup_form").attr("action", "https://www.moneybookers.com/app/payment.pl"); $("#cc_info").slideUp("fast"); $("#bank_info").slideUp("fast");

$("#mb_amt").attr("value", total);});

if ($("#PayPal").prop("checked")){ $("#signup_form").attr("action", "<?= $PayPalSandbox ? 'https://www.sandbox.paypal.com/cgi-bin/webscr':'https://www.paypal.com/cgi-bin/webscr' ?>"); $("#cc_info").hide(); $("#bank_info").hide();}else if ($("#Bank").prop("checked")){ $("#cc_info").hide(); $("#bank_info").show();}

else if ($("#Moneybookers").prop("checked")){ $redirect="https://www.moneybookers.com/app/payment.pl";$insert="https://aaraa.co.in/testing/payment/paymentinsert.php";// $("#signup_form").attr("action", "https://aaraa.co.in/testing/payment/paymentsettings.php");// $("#signup_form").attr("action", "https://aaraa.co.in/testing/payment/paymentinsert.php");<!--$("#signup_form").attr("action", "https://aaraa.co.in/testing/payment/paymentinsert.php") && -->$("#signup_form").attr("action", "$insert":"$redirect");

$("#cc_info").hide(); $("#bank_info").hide(); $("#mb_amt").attr("value", total);}

<?phpif ($UseMoneybookers && $TotalPaymentMethods == 1) echo '$("#mb_amt").attr("value", total);';?>});//--></script><style type="text/css"><!--.content{width:705px;margin:0 auto;}

table{border-width:1px 0 0 0}td{border:0px}tr th{text-align:left;white-space:nowrap}#totalline{background:#F6F3FF;border-top:1px solid #9879FF;margin:15px 0;padding:5px}input,.large{font-size:110%}div.error{color:red}.error input{border:2px solid red}.error label{color:red;font-weight:bold}

#cc-card,#cc-paypal,#cc-bank,#cc-mb,#cc-gc,.cc-secure{text-indent:-9999px;display:block;float:left;background-image:url(sprites.png);height:35px;width:289px;margin-right:15px}#cc-bank{background-position:0 -35px;width:56px}#cc-paypal{background-position:0 -70px;width:55px}#cc-mb{background-position:0 -105px;width:55px}#cc-gc{background-position:0 -140px;width:55px}.cc-secure{background-position:0 -175px;height:32px;width:86px;}#cc-type{height:35px;margin-bottom:15px}#cc-type input{float:left;margin:8px 5px 0 10px;width:1em}label.link{cursor:pointer;cursor:hand;}

<?phpif (!$AuthNetCCSelected) echo '#cc_info{display:none}';

if (!$AuthNetBankSelected) echo '#bank_info{display:none}';?>

h3#su1,h3#su2,h3#su3{background:url(sprites.png) no-repeat -91px -35px;color:#002C6D;margin:30px 0 20px;padding:2px 0 0 36px;min-height:26px;height:auto!important;height:26px}h3#su2{background-position:-91px -111px}h3#su3{background-position:-91px -187px}--></style><SCRIPT LANGUAGE="javascript"> function KeepCount() { var NewCount = 0 if (document.signup_form.HR.checked) { NewCount = NewCount + 1 } if (document.signup_form.Raw Material.checked) { NewCount = NewCount + 1 } if (document.signup_form.Stores.checked) { NewCount = NewCount + 1 } if (document.signup_form.Preparatory.checked) { NewCount = NewCount + 1 } if (document.signup_form.Spinning.checked) { NewCount = NewCount + 1 } if (document.signup_form.PostSpinning.checked) { NewCount = NewCount + 1 } if (document.signup_form.Outprocess.checked) { NewCount = NewCount + 1 } if (document.signup_form.Maintenance.checked) { NewCount = NewCount + 1 } if (document.signup_form.Sales.checked) { NewCount = NewCount + 1 } if (document.signup_form.Accounts.checked) { NewCount = NewCount + 1 } if (document.signup_form.WasteCotton.checked) { NewCount = NewCount + 1 } if (NewCount == 3) { alert('Pick Just Two Please') document.signup_form; return false; } } </SCRIPT> </head><body><div class="content"> <h1>Buy <?=$AppName?></h1> <?php if($key=='Free') {$Activationcharge='0.00';} else {$Activationcharge='100';}?> <p><?= $AppName ?> costs <strong><?=$CurrencySign?><?=$single_price?></strong> per license.Activation Charge(Life time) <?=$CurrencySign?> <?php echo $Activationcharge; ?> USD</p>

<?php if ($PayPalSelected) $defAction = $PayPalSandbox ? 'https://www.sandbox.paypal.com/cgi-bin/webscr' : 'https://www.paypal.com/cgi-bin/webscr'; else if ($MoneybookersSelected) $defAction = 'https://www.moneybookers.com/app/payment.pl'; //$defAction = 'https://aaraa.co.in/testing/payment/PaymentSettings.php'; else $defAction = '';?><form action="<?=$defAction?>" method="post" id="signup_form" name="signup_form"><?php$headerShown = 1;

if ($UseAuthorizeNetCC || $UseAuthorizeNetBank) {?> <h3 id="su<?= $headerShown++ ?>">Your info</h3> <table> <tr<?php if ($cc_proc->fname_err) echo ' class="error"'; ?>> <th><label for="form_first_name">First name</label></th> <td><input type="text" id="form_first_name" name="first_name" value="<?= htmlentities($cc_proc->first_name) ?>" size="24"/></td> <td rowspan="3"> select only <?php echo $Module;?> modules for <?php echo $key;?> plan<br /><br /> <INPUT TYPE="checkbox" NAME="HR"onClick="return KeepCount()"> HR &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<INPUT TYPE="checkbox" NAME="RawMaterial"onClick="return KeepCount()">RawMaterial &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<INPUT TYPE="checkbox" NAME="Stores"onClick="return KeepCount()"> Stores<br /><INPUT TYPE="checkbox" NAME="Preparatory"onClick="return KeepCount()"> Preparatory &nbsp;

<INPUT TYPE="checkbox" NAME="Spinning"onClick="return KeepCount()"> Spinning &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<INPUT TYPE="checkbox" NAME="PostSpinning"onClick="return KeepCount()"> PostSpinning &nbsp;&nbsp;&nbsp;&nbsp;

<INPUT TYPE="checkbox" NAME="Outprocess"onClick="return KeepCount()"> Outprocess &nbsp;&nbsp;

<INPUT TYPE="checkbox" NAME="Maintenance"onClick="return KeepCount()"> Maintenance &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<INPUT TYPE="checkbox" NAME="Sales"onClick="return KeepCount()"> Sales &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br /><INPUT TYPE="checkbox" NAME="Accounts"onClick="return KeepCount()"> Accounts &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<INPUT TYPE="checkbox" NAME="WasteCotton"onClick="return KeepCount()"> WasteCotton &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

</td> </tr> <tr<?php if ($cc_proc->lname_err) echo ' class="error"'; ?>> <th><label for="form_last_name">Last name</label></th> <td><input type="text" id="form_last_name" name="last_name" value="<?= htmlentities($cc_proc->last_name) ?>" size="24"/></td> </tr> <tr<?php if ($cc_proc->email_err) echo ' class="error"'; ?>> <th><label for="form_email">Email</label></th> <td><input type="text" id="form_email" name="email" value="<?= htmlentities($cc_proc->email) ?>" size="24"/></td> </tr> </table>

<?php } ?>

<h3 id="su<?= $headerShown++ ?>">Number of licenses</h3> <table> <tr<?php if ($cc_proc && $cc_proc->quantity_err) echo ' class="error"'; ?>> <th><label for="quantity">Number of System </label></th> <td><input type="text" name="quantity" id="quantity" value="<?= $cc_proc ? $cc_proc->quantity : 1 ?>" size="2"/></td> </tr> <?php if ($cc_proc && $cc_proc->quantity_err){ ?><tr class="error"><th> </th><td><div class="error">You must enter a quantity greater than 0</div></td></tr><?php } ?> <tr> <th>Price per system </th> <td class="large"><?=$CurrencySign?><?=$single_price?></td> </tr> </table>

<?phpif ($TotalPaymentMethods == 1 && ($UseAuthorizeNetCC || $UseAuthorizeNetBank)){ echo '<h3 id="su'.$headerShown.'">Enter your billing information &mdash; SECURE</h3>';}else if ($TotalPaymentMethods > 1) {

// form the payment selection header $paymentHead = 'Payment method &mdash; ';

$used = 0;

//if ($UseAuthorizeNetCC)// {// $paymentHead .= 'Credit card';// $used++;// }//// if ($UseAuthorizeNetBank)// {// if ($used > 0)// $paymentHead .= $TotalPaymentMethods == $used + 1 ? ($TotalPaymentMethods > 2 ? ', or ' : ' or ') : ', ';// $paymentHead .= 'Bank transfer';// $used++;// }//// if ($UsePayPal)// {// if ($used > 0)// $paymentHead .= $TotalPaymentMethods == $used + 1 ? ($TotalPaymentMethods > 2 ? ', or ' : ' or ') : ', ';// $paymentHead .= 'PayPal';// $used++;// }

if ($UseMoneybookers) { if ($used > 0) $paymentHead .= $TotalPaymentMethods == $used + 1 ? ($TotalPaymentMethods > 2 ? ', or ' : ' or ') : ', '; $paymentHead .= 'Moneybookers'; }?> <h3 id="su<?= $headerShown ?>"><?= $paymentHead ?></h3> <div id="cc-type"> <?php if ($UseAuthorizeNetCC) { ?> <!--<input type="radio" id="Card" value="Card" name="mf_cardtype" title="Card"/> <label for="Card" title="Pay with a credit card" id="cc-card" class="link">Visa / American Express / MasterCard / Discover / JCB</label>--> <?php } ?> <?php if ($UseAuthorizeNetBank) { ?> <!--<input type="radio" id="Bank" value="Bank" name="mf_cardtype" title="Bank"/> <label for="Bank" title="Pay with an eCheck (Bank transfer)" id="cc-bank" class="link">Pay with an eCheck (Bank transfer)</label>--> <?php } ?> <?php if ($UsePayPal) { ?> <!--<input type="radio" id="PayPal" value="PayPal" name="mf_cardtype" title="PayPal"/> <label for="PayPal" title="Pay with PayPal" id="cc-paypal" class="link">PayPal</label>--> <?php } ?> <?php if ($UseMoneybookers) { ?> <input type="radio" id="Moneybookers" value="Moneybookers" name="mf_cardtype" checked="checked" title="Moneybookers"<?= $MoneybookersSelected ? ' checked="checked"' : '' ?>/> <label for="Moneybookers" title="Pay with Moneybookers" id="cc-mb" class="link">Moneybookers</label> <?php } ?> </div><?php }

if ($UseAuthorizeNetCC) { ?> <div id="cc_info"> <table><?php if ($TotalPaymentMethods == 1) { echo '<tr><th>We accept</th><td colspan="2"><div id="cc-card">Visa / American Express / MasterCard / Discover / JCB</div><input type="hidden" name="mf_cardtype" value="Card"/></td></tr>'; } ?> <tr<?php if ($cc_proc->cc_num_err) echo ' class="error"'; ?>> <th><label for="form_ccnum">Card number</label></th> <td><input id="form_ccnum" name="cc_num" size="22" type="text" value="<?= htmlentities($cc_proc->cc_num) ?>"/></td> <td valign="top"><div class="cc-secure">Secure</div></td> </tr> <?php if ($cc_proc->cc_num_err){ ?><tr class="error"><th> </th><td><div class="error"><?= $cc_proc->cc_num_err_str ?></div></td></tr><?php } ?> <tr<?php if ($cc_proc->cc_exp_err) echo ' class="error"'; ?>> <th><label for="form_cc_expires">Expires on</label></th> <td> <select id="form_cc_expires" name="cc_expires_m"> <option <?php if($cc_proc->cc_expires_m == 1 || !isset($cc_proc->cc_expires_m)) echo 'selected="selected" '; ?>value="1">1 - January</option> <option <?php if($cc_proc->cc_expires_m == 2) echo 'selected="selected" '; ?>value="2">2 - February</option> <option <?php if($cc_proc->cc_expires_m == 3) echo 'selected="selected" '; ?>value="3">3 - March</option> <option <?php if($cc_proc->cc_expires_m == 4) echo 'selected="selected" '; ?>value="4">4 - April</option> <option <?php if($cc_proc->cc_expires_m == 5) echo 'selected="selected" '; ?>value="5">5 - May</option> <option <?php if($cc_proc->cc_expires_m == 6) echo 'selected="selected" '; ?>value="6">6 - June</option> <option <?php if($cc_proc->cc_expires_m == 7) echo 'selected="selected" '; ?>value="7">7 - July</option> <option <?php if($cc_proc->cc_expires_m == 8) echo 'selected="selected" '; ?>value="8">8 - August</option> <option <?php if($cc_proc->cc_expires_m == 9) echo 'selected="selected" '; ?>value="9">9 - September</option> <option <?php if($cc_proc->cc_expires_m == 10) echo 'selected="selected" '; ?>value="10">10 - October</option> <option <?php if($cc_proc->cc_expires_m == 11) echo 'selected="selected" '; ?>value="11">11 - November</option> <option <?php if($cc_proc->cc_expires_m == 12) echo 'selected="selected" '; ?>value="12">12 - December</option> </select>

<select id="form_cc_expires_y" name="cc_expires_y"> <?php // form the years dropdown list from the current year to 20 years from now $exp_year = $cc_proc->cc_expires_y; $currYear = (int)date('Y'); $endYear = $currYear + 21;

if (!$exp_year) $exp_year = $currYear;

for (; $currYear < $endYear; $currYear++) { echo '<option';

if ($exp_year == $currYear) echo ' selected="selected"';

echo ' value="'.$currYear.'">'.$currYear.'</option>'; } ?> </select>

</td> </tr> <?php if ($cc_proc->cc_exp_err){ ?><tr class="error"><th> </th><td><div class="error">The date you've entered has expired. Either correct the date or use a card that hasn't expired.</div></td></tr><?php } ?> <tr<?php if ($cc_proc->cc_adr_err) echo ' class="error"'; ?>> <th><label for="form_cc_adr">Street address</label></th> <td><input id="form_cc_adr" name="cc_adr" size="22" type="text" value="<?= htmlentities($cc_proc->cc_adr) ?>"/></td> </tr> <tr<?php if ($cc_proc->cc_zip_err) echo ' class="error"'; ?>> <th><label for="form_cc_zip">Billing ZIP code</label></th> <td><input id="form_cc_zip" name="cc_zip" size="10" type="text" value="<?= htmlentities($cc_proc->cc_zip) ?>"/></td> </tr> <tr> <th> </th> <td><small>(or Postal Code if not in the USA)</small></td> </tr> </table> </div><?php}

if ($UseAuthorizeNetBank) {

if ($TotalPaymentMethods == 1) echo '<input type="hidden" name="mf_cardtype" value="Bank"/>'; ?> <div id="bank_info"> <table> <?php if ($cc_proc->bank_err_str){ ?><tr class="error"><th> </th><td><div class="error"><?= $cc_proc->bank_err_str ?></div></td></tr><?php } ?> <tr<?php if ($cc_proc->bank_acct_name_err) echo ' class="error"'; ?>> <th><label for="form_bank_acct_name">Name on account</label></th> <td><input id="form_bank_acct_name" name="bank_acct_name" size="27" type="text" value="<?= htmlentities($cc_proc->bank_acct_name) ?>"/></td> <td valign="top" align="center"><div class="cc-secure">Secure</div></td> </tr> <tr<?php if ($cc_proc->bank_acct_type_err) echo ' class="error"'; ?>> <th><label for="form_acct_type">Type of account</label></th> <td> <select id="form_acct_type" name="bank_acct_type"> <option <?php if(!$cc_proc->bank_acct_type) echo 'selected="selected" '; ?>value="">&mdash; Select one &mdash;</option> <option <?php if($cc_proc->bank_acct_type == 'C') echo 'selected="selected" '; ?>value="C">Checking</option> <option <?php if($cc_proc->bank_acct_type == 'S') echo 'selected="selected" '; ?>value="S">Savings</option> </select> </td> </tr> <?php if ($cc_proc->bank_acct_type_err){ ?><tr class="error"><th> </th><td><div class="error">Select the type of bank account from the dropdown.</div></td></tr><?php } ?> <tr<?php if ($cc_proc->bank_name_err) echo ' class="error"'; ?>> <th><label for="form_bank_name">Bank Name</label></th> <td><input id="form_bank_name" name="bank_name" size="27" type="text" value="<?= htmlentities($cc_proc->bank_name) ?>"/></td> </tr> <tr<?php if ($cc_proc->bank_route_num_err) echo ' class="error"'; ?>> <th><label for="form_bank_route_num">ABA Routing Number</label></th> <td><input id="form_bank_route_num" name="bank_route_num" size="11" type="text" value="<?= htmlentities($cc_proc->bank_route_num) ?>"/></td> </tr> <?php if ($cc_proc->bank_route_num_err){ ?><tr class="error"><th> </th><td><div class="error">The bank routing number is not valid &mdash; enter the correct 9 digits. You can find this number on your checks.</div></td></tr><?php } ?>

<tr<?php if ($cc_proc->bank_acct_num_err) echo ' class="error"'; ?>> <th><label for="form_bank_acct_num">Account Number</label></th> <td><input id="form_bank_acct_num" name="bank_acct_num" size="18" type="text" value="<?= htmlentities($cc_proc->bank_acct_num) ?>"/></td> </tr> </table> </div><?php}

if ($UsePayPal || $UseMoneybookers) { ?> <input type="hidden" name="amount" value="<?=$single_price?>" id="mb_amt"/><?php}

if ($UsePayPal) { ?> <input type="hidden" name="cmd" value="_xclick"/> <input type="hidden" name="business" value="<?=$PayPalEmail?>"/> <input type="hidden" name="undefined_quantity" value="1"/> <input type="hidden" name="item_name" value="<?=$AppName?> license"/> <input type="hidden" name="item_number" value="1"/> <input type="hidden" name="no_shipping" value="1"/> <input type="hidden" name="no_note" value="1"/> <input type="hidden" name="currency_code" value="<?=$Currency?>"/> <input type="hidden" name="lc" value="US"/> <input type="hidden" name="rm" value="2"/> <input type="hidden" name="return" value="<?=$ThankYouPage?>"/> <input type="hidden" name="cancel_return" value="<?=$BuyPage?>"/> <input type="hidden" name="notify_url" value="<?=$CheckScript.'?paypal=1'?>"/><?php if ($YourLogo) echo '<input type="hidden" name="image_url" value="'.$YourLogo.'"/>';}

if ($UseMoneybookers) { ?> <input type="hidden" name="language" value="EN"/> <input type="hidden" name="currency" value="<?=$Currency?>"/> <input type="hidden" name="pay_to_email" value="<?=$MBEmail?>"/> <input type="hidden" name="return_url" value="<?=$ThankYouPage?>"/> <input type="hidden" name="cancel_url" value="<?=$BuyPage?>"/> <input type="hidden" name="status_url" value="<?=$CheckScript.'?moneybookers=1'?>"/> <input type="hidden" name="detail1_description" value="<?=$AppName?> licenses"/> <input type="hidden" name="detail1_text" value="<?=$AppName?> licenses"/> <input type="hidden" name="merchant_fields" value="quantity"/><?php if ($YourLogo) echo '<input type="hidden" name="logo_url" value="'.$YourLogo.'"/>';}?>

<div id="totalline" class="large">Your total: <strong><?=$CurrencySign?><span id="total_price"> </span></strong></div><div><input type="image" src="order.png" name="submit" id="submit" alt="Place my order" style="width:180px;height:38px;vertical-align:middle;"/>&nbsp;&nbsp;<strong id="progress"></strong></div></form>

<?php// Show warnings and errors in the config.

// Don't delete these lines. You won't see them on your// live site if you have everything configured correctly.

if (!function_exists('curl_init')) echo '<p><strong><font color="#FF0000">The curl extension is required, but not installed on this server.</font></strong></p>';

if (!extension_loaded('simplexml')) echo '<p><strong><font color="#FF0000">The SimpleXML extension is required, but not installed on this server.</font></strong></p>';

if ($UsePayPal && $PayPalSandbox) echo '<p><strong><font color="#FF0000">PayPal sandbox is on</font> &mdash; payments will not be sent to your live account. To disable sandbox mode set <code>$PayPalSandbox = false;</code> in <code>PaymentSettings.php</code>.</strong></p>';

if (($UseAuthorizeNetCC || $UseAuthorizeNetBank) && $AuthNetTest){ echo '<p><strong><font color="#FF0000">Authorize.Net payments is in Test Mode</font> &mdash; payments will not be sent to your live account. To turn off test mode set <code>$AuthNetTest = false;</code> in <code>PaymentSettings.php</code>.</strong></p>';

if (!(isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on'))) { echo '<p><strong><font color="#FF0000">Authorize.Net payments <em>requires</em> a secure connection (https://).</font> &mdash; when you set <code>$AuthNetTest = false;</code> in <code>PaymentSettings.php</code> this page will automatically redirect you to the secure version of this page (https://) if you visit it from the non-secure version (http://). However, in test mode you can use the non-secure version to remove the hassle of creating self-signed SSL certificates.</strong></p>'; }}

if ($debug) echo '<p><strong><font color="#FF0000">Debugging turned on</font> &mdash; All actions will be logged to log file.</strong></p>';?></div><SCRIPT LANGUAGE="javascript">

function KeepCount() {

var NewCount = 0

if (document.signup_form.HR.checked){NewCount = NewCount + 1}

if (document.signup_form.RawMaterial.checked){NewCount = NewCount + 1}

if (document.signup_form.Stores.checked){NewCount = NewCount + 1}

if (document.signup_form.Preparatory.checked){NewCount = NewCount + 1}

if (document.signup_form.Spinning.checked){NewCount = NewCount + 1}

if (document.signup_form.PostSpinning.checked){NewCount = NewCount + 1}

if (document.signup_form.Outprocess.checked){NewCount = NewCount + 1}

if (document.signup_form.Maintenance.checked){NewCount = NewCount + 1}

if (document.signup_form.Sales.checked){NewCount = NewCount + 1}

if (document.signup_form.Accounts.checked){NewCount = NewCount + 1}

if (document.signup_form.WasteCotton.checked){NewCount = NewCount + 1}

if (NewCount ><?php echo $Module;?>){alert('select only <?php echo $Module;?> Modules otherwise Choose another plan')document.signup_form; return false;}}</SCRIPT>

</body></html>

----------------------------------------------------------------------------------------------------------------------

paymentsetting.php

<?phprequire('config.php');require('paymentinsert.php');

// $HR=$_POST['HR'];// if($HR=="on")// {// $HR='y';// // // }// else// {// $HR='n';// // } // $RawMaterial=$_POST['RawMaterial'];// if($RawMaterial=='on')// {// $RawMaterial='y';// }// else// {// $RawMaterial='n';// }// // $Stores=$_POST['Stores'];// if($Stores=='on')// {// $Stores='y';// }// else// {// $Stores='n';// }// // $Preparatory=$_POST['Preparatory'];// if($Preparatory=='on')// {// $Preparatory='y';// }// else// {// $Preparatory='n';// }// // $Spinning=$_POST['Spinning'];// if($Spinning=='on')// {// $Spinning='y';// }// else// {// $Spinning='n';// }// // $PostSpinning=$_POST['PostSpinning'];// if($PostSpinning=='on')// {// $PostSpinning='y';// }// else// {// $PostSpinning='n';// }// // $Outprocess=$_POST['Outprocess'];// if($Outprocess=='on')// {// $Outprocess='y';// }// else// {// $Outprocess='n';// }// // $Maintenance=$_POST['Maintenance'];// if($Maintenance=='on')// {// $Maintenance='y';// }// else// {// $Maintenance='n';// }// // $Sales=$_POST['Sales'];// if($Sales=='on')// {// $Sales='y';// }// else// {// $Sales='n';// }// // $Accounts=$_POST['Accounts'];// if($Accounts=='on')// {// $Accounts='y';// }// else// {// $Accounts='n';// }// // $WasteCotton=$_POST['WasteCotton'];// if($WasteCotton=='on')// {// $WasteCotton='y';// }// else// {// $WasteCotton='n';// }// // $sqldate ="SELECT DATEADD(month, 1,getdate())//// AS ExpiryDate";//// // $res = odbc_exec($con,$sqldate);// $row1 = odbc_fetch_array($res);// $ExpiryDate=($row1[ExpiryDate]);

$HR = $_POST['HR'] == 'on' ? 'y' : 'n';$RawMaterial = $_POST['RawMaterial'] == 'on' ? 'y' : 'n';$Stores = $_POST['Stores'] == 'on' ? 'y' : 'n';$Preparatory = $_POST['Preparatory'] == 'on' ? 'y' : 'n';$Spinning = $_POST['Spinning'] == 'on' ? 'y' : 'n';$PostSpinning = $_POST['PostSpinning'] == 'on' ? 'y' : 'n';$Outprocess = $_POST['Outprocess'] == 'on' ? 'y' : 'n';$Maintenance = $_POST['Maintenance'] == 'on' ? 'y' : 'n';$Sales = $_POST['Sales'] == 'on' ? 'y' : 'n';$Accounts = $_POST['Accounts'] == 'on' ? 'y' : 'n';$WasteCotton = $_POST['WasteCotton'] == 'on' ? 'y' : 'n';$ExpiryDate = date('Y-m-d', strtotime('+1 month'));$feature_names = "array('Accounts', 'HR', 'License_expires', 'Maintenance', 'OutProcess', 'Post Spinning', 'Preparatory', 'Raw Material','Sales','Spinning', 'Stores', 'WasteCotton')";$feature_values ="array($Accounts, $HR, $ExpiryDate, $Maintenance, $Outprocess, $PostSpinning, $Preparatory, $RawMaterial, $Sales, $Spinning, $Stores, $WasteCotton)";//<!--<!--echo $feature_names;//echo $feature_values;//echo $ExpiryDate;-->-->debug_log('Are these feature names correct?: '."\r\n\r\n".print_r($feature_names, true), true);debug_log('Are these feature values correct?: '."\r\n\r\n".print_r($feature_values, true), true);

$debug = true;

// Set any of the following 4 boolean values to either// true or false based on whether you're using that// particular payment method. "payment.php" automatically// shows or hides the payment method based on these boolean// values.

// If you set a payment setting to true then you'll also// have to configure the payment settings for that// particular payment method below.$UseAuthorizeNetCC = true;$UseAuthorizeNetBank = true;$UseMoneybookers = true;$UsePayPal = true;

// dollars, cents$AppPrice = array(1, 00);$Currency = 'USD';

// The currency symbol that the end-user will see.// If you're not using "$" then you should use// the HTML-entity equivalent of the symbol.// Your customers will see the symbol.

// = &euro;// = &pound;// = &yen;// etc.$CurrencySign = '$';

$CompanyName = 'VERTEX';$AppName = 'SPINSOFT';

// api key found in http://wyday.com/limelm/settings/$LimeLM_ApiKey = 'ee9335e4ce0c33522d773.93125420';

// the version id is found in the url.// For example http://wyday.com/limelm/version/100/ the version id is '100'.$LimeLM_VersionID = '160';

// URL of the "paychecker.php" script.// This is where Moneybookers and PayPal orders are confirmed and processed.// If you're not using Moneybookers or PayPal then you don't have to set this.$CheckScript = 'http://aaraa.co.in/testing/payment/paychecker.php';

// Where the user can buy your products$BuyPage = 'http://aaraa.co.in/testing/payment/payment.php';

// Thank you page (once payment is made, user is sent to this page)$ThankYouPage = 'http://aaraa.co.in/testing/payment/pay-thankyou.php';

// The logo to display on the PayPal / Moneybookers checkout// this site must be HTTPS or it won't display.// Maximum size (PayPal): 150px (width) by 50px (height)// Maximum size (Moneybookers): 200px (width) by 50px (height)$YourLogo; // = 'https://example.com/buy/toplogo.png';

//==== Authorize.Net Config ====

// the API Login ID and Transaction Key must be replaced with valid values$AuthNetLogin = 'PASTE LOGIN HERE';$AuthNetTansKey = 'PASTE Transaction Key HERE';$AuthNetTest = false;

//==== PayPal Config ====

// Use PayPal Sandbox (set to false on your live server)$PayPalSandbox = false;

// Paypal Email$PayPalEmail = 'your@email.com';

//==== Moneybookers Config ====

// Your Moneybookers email$MBEmail = 'sudhavs86@gmail.com';

// Set the "Secret Word" in your Moneybookers account// on the "Merchant tools" page. Then set it here.$SecretWord = '3067108';

function debug_log($message, $success, $end = false){ global $debug, $debug_log;

if (!$debug || !$debug_log) return;

// Timestamp $text = '['.date('m/d/Y g:i A').'] - '.(($success)?'SUCCESS :':'FAILURE :').$message. "\n";

if ($end) $text .= "\n------------------------------------------------------------------\n\n";

// Write to log $fp=fopen($debug_log, 'a'); fwrite($fp, $text); fclose($fp);}

function SendPKeys($quantity, $email, $first, $last){ //Note: we put LimeLM in this directory. Change it as needed. require('LimeLM.php');

global $LimeLM_VersionID, $LimeLM_ApiKey;

$errors = false;

// set your API key LimeLM::SetAPIKey($LimeLM_ApiKey);

try { //using that coding

// Generate the product key - set the number of activations using the quantity// $xml = new SimpleXMLElement(LimeLM::GeneratePKeys($LimeLM_VersionID, 1, $quantity, $email,array('Accounts', 'HR', 'License_expires','Maintenance','OutProcess','Post Spinning','Preparatory','Raw Material','Sales','Spinning','Stores','WasteCotton'),array('y', 'y', 'y', 'y', 'y', 'y', 'y', 'y', 'y', 'y', 'y', 'y'))); // Generate the product key - set the number of activations using the quantity //$xml = new SimpleXMLElement(LimeLM::GeneratePKeys($LimeLM_VersionID, 1, $quantity, $email,array('Accounts', 'HR', 'License_expires','Maintenance','OutProcess','Post Spinning','Preparatory','Raw Material','Sales','Spinning','Stores','WasteCotton'),//array($Accounts,$HR,$ExpiryDate,$Maintenance,$Outprocess,$PostSpinning,$Preparatory,$RawMaterial,$Sales,$Spinning,$Stores,$WasteCotton)));//$xml = new SimpleXMLElement(LimeLM::GeneratePKeys($LimeLM_VersionID, 1, $quantity, $email,array('Accounts', 'HR', 'License_expires','Maintenance','OutProcess','Post Spinning','Preparatory','Raw Material','Sales','Spinning','Stores','WasteCotton'),////array($Accounts,$HR,$ExpiryDate,$Maintenance,$Outprocess,$PostSpinning,$Preparatory,$RawMaterial,$Sales,$Spinning,$Stores,$WasteCotton)));$xml = new SimpleXMLElement(LimeLM::GeneratePKeys($LimeLM_VersionID, 1, $quantity, $email, $feature_names, $feature_values)); if ($xml['stat'] == 'ok') { foreach ($xml->pkeys->pkey as $pkey) { // add a newline if you're generating more than one key if ($product_keys) $product_keys .= "\r\n";

// set the product key $product_keys .= $pkey['key']."\r\n"; } } else //failure { // use the error code & message debug_log('Failed to generate product keys: ('.$xml->err['code'].') '.$xml->err['msg'],false); } } catch (Exception $e) { debug_log('Failed to generate product keys, caught exception: '.$e->getMessage(),false); }

if (empty($product_keys)) { // the product key didn't generate, don't send e-mail to the customer yet. $errors = true; }

// form the customer name $customerName = $first;

if (!empty($last)) // append the last name $customerName .= ' '.$last;

$emailBody = $customerName.',

Thank you for your order. Your product key is:

'.$product_keys.'

This product key is licensed for '.$quantity.( $quantity > 1 ? ' users' : ' user' ).' of '.$AppName.'.

Thank you,

'.$CompanyName;

if (!empty($product_keys)) { // Send Email to the buyer $emailSent = mail($email, 'Your '.$AppName.' product key', $emailBody,$headers); }

// generate an array you can insert into your database $new_order_info = array( 'quantity_licenses' => $quantity, 'pkey' => $product_keys, 'pkey_emailed' => $emailSent ? '1' : '0', // 0 = no, 1 = yes 'first_name' => $first, 'last_name' => $last, 'email' => $email );

//TODO: delete logging, or log to a safe location (not accessible to outside world) debug_log('TODO: Insert array into db: '."\r\n\r\n".print_r($new_order_info, true), true);

if (!$emailSent) { $errors = true; debug_log('Error sending product Email to '.$email.'.',false); }

LimeLM::CleanUp();}?>

-------------------------------------------------------------

please check that coding how to pass parameter help me.................

What does your debug log say?

i use for check box coding....

<INPUT TYPE="checkbox" NAME="HR"onClick="return KeepCount()"> HR &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<INPUT TYPE="checkbox" NAME="RawMaterial"onClick="return KeepCount()">RawMaterial &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<INPUT TYPE="checkbox" NAME="Stores"onClick="return KeepCount()"> Stores<br /><INPUT TYPE="checkbox" NAME="Preparatory"onClick="return KeepCount()"> Preparatory &nbsp;

<INPUT TYPE="checkbox" NAME="Spinning"onClick="return KeepCount()"> Spinning &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<INPUT TYPE="checkbox" NAME="PostSpinning"onClick="return KeepCount()"> PostSpinning &nbsp;&nbsp;&nbsp;&nbsp;

<INPUT TYPE="checkbox" NAME="Outprocess"onClick="return KeepCount()"> Outprocess &nbsp;&nbsp;

<INPUT TYPE="checkbox" NAME="Maintenance"onClick="return KeepCount()"> Maintenance &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<INPUT TYPE="checkbox" NAME="Sales"onClick="return KeepCount()"> Sales &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br /><INPUT TYPE="checkbox" NAME="Accounts"onClick="return KeepCount()"> Accounts &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<INPUT TYPE="checkbox" NAME="WasteCotton"onClick="return KeepCount()"> WasteCotton &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

---------------------------------------------------------

pass parameter for this coding

else if ($("#Moneybookers").prop("checked")){ $redirect="https://www.moneybookers.com/app/payment.pl";$insert="https://aaraa.co.in/testing/payment/paymentinsert.php";// $("#signup_form").attr("action", "https://aaraa.co.in/testing/payment/paymentsettings.php");// $("#signup_form").attr("action", "https://aaraa.co.in/testing/payment/paymentinsert.php");<!--$("#signup_form").attr("action", "https://aaraa.co.in/testing/payment/paymentinsert.php") && -->$("#signup_form").attr("action", "$insert":"$redirect");

$("#cc_info").hide(); $("#bank_info").hide(); $("#mb_amt").attr("value", total);}

how to set the multiple url .... please help me.........-------------------------------------------------------------------------this error only come for debug log.........

[02/09/2012 11:51 AM] - SUCCESS :paychecker intiated by 193.105.47.7[02/09/2012 11:51 AM] - SUCCESS :Validating Moneybookers order[02/09/2012 11:51 AM] - SUCCESS :IPN successfully verified.[02/09/2012 11:51 AM] - SUCCESS :Creating product Information to send.[02/09/2012 11:51 AM] - FAILURE :Failed to generate product keys: (117) You must enter a value for the feature "Accounts". It's a required feature.[02/09/2012 11:51 AM] - SUCCESS :TODO: Insert array into db:

Array( [quantity_licenses] => 1 [pkey] => [pkey_emailed] => 0 [first_name] => [last_name] => => sudhavs86@gmail.com) [02/09/2012 11:51 AM] - FAILURE :Error sending product Email to sudhavs86@gmail.com.[02/09/2012 11:51 AM] - SUCCESS :paychecker finished.

It looks like *nothing* is being logged. The last log statement is more than a day ago. This means that some change you made in the last day or so stopped things working. My guess is you've changed the "callback" url. That is, the script that Moneybookers talks to.

Did you change this line of code?:

<input type="hidden" name="status_url" value="<?=$CheckScript.'?moneybookers=1'?>"/>

And is your $CheckScript variable still pointing to your "paychecker.php" url?

I have no idea what you're doing with the "$insert" and "$redirect" variables. That's probably causing problems too.

The short answer is that you need to do some legwork. This isn't a problem with LimeLM or our example scripts. These are basic web development problems. Here's what you need to do:

  1. Check your PHP error logs. Do you see any errors? Read them all. Fix them.
  2. Check your HTTP server error logs. Do you see any errors? Read them all. Fix them.
  3. Is Moneybookers contacting your server? If so, what page?
  4. Is the page Moneybookers contacting doing any work?

i am creating the number of checkbox in payment.php pages .how to pass this checkbox values to paymentsetting.php pages(as per $email,$firstname,$quantity)

You "pass" the value the same way you "pass" any value in web forms. That is, you read the POST value. For instance, if this "checkbox" type input is between the <form></form> tags on the website:

<input type="checkbox" value="1" id="chkAccounts" name="Accounts"/>

When you read this after the user has POSTed the form the $_POST['Accounts'] will contain either "1" or a null value. Thus if you want to store either a "y" or "n" value in LimeLM then you can do it like this:

$Accounts = $_POST['Accounts'] ? 'y' : 'n';

Now you have an $Accounts php variable that contains either "y" or "n". Pass that to LimeLM::GeneratePKey(....) like we've discussed.

If it's not working then read your debug logs and make sure everything is being submitted correctly. See my last post.