public function IPN() { //send all fields back to papypal in exact order for confirmation and wait for VERFIED response foreach ($_POST as $k => $v) { if ($fields != NULL) { $fields .= '&'; } $fields .= "{$k}={$v}"; } $fields = "cmd=_notify-validate&" . $fields; $this->curl->setDefaults($this->IPNUrl, $fields); $this->curl->curl_exec(); //make sure the response is VERFIED and that items price and currency are correct if ($ret == 'VERIFIED' && $_POST['payment_status'] == 'Completed' && isUnique($_POST['txn_id']) && $_POST['receiver_email'] == '*****@*****.**' && $_POST['mc_gross'] == '1.00' && $_POST['mc_currency'] == 'USD' & $_POST['item_name'] == 'ITEM NAME XXX' && $_POST['item_name'] == 'ITEM NAME XXX') { ///success code here } else { //log failed. } }
$rwsfname = trim(addslashes($_POST["gtname"])); $rwsuemailid = trim($_POST["gtemailid"]); $errors = array(); //Initialize error array if (empty($_POST['gtname'])) { $errors[] = "Name field can't be blank!"; } if (empty($_POST['gtemailid'])) { $errors[] = "Email field can't be blank!"; } else { if (!eregi('^[[:alnum:]][a-z0-9_\\.\\-]*@[a-z0-9\\.\\-]+\\.[a-z]{2,4}$', stripslashes(trim($_POST['gtemailid'])))) { $errors[] = 'Please provide a <strong>valid email address</strong>!'; } } if (empty($errors)) { if (isUnique("email", $_POST['gtemailid'], "tbl_newsletter")) { // Insert data into database $gtregquery = "INSERT INTO `tbl_newsletter` (`id`, `name`, `email`, `status`, `add_date`) VALUES (NULL, '{$rwsfname}', '{$rwsuemailid}', '1', NOW())"; $gtresult = mysql_query_with_throw($gtregquery); $subject = "Newsletter Registration on {$sitename} - by " . $rwsfname; $body = '<table width="634" border="0" align="left" cellpadding="0" cellspacing="0"> <tr> <td height="52" bgcolor="#00798c"><font style="font-family:Arial, Helvetica, sans-serif; font-size:24px; font-weight:bold; color:#FFFFFF;"> <span class="style1">' . $sitename . ' - </span></font><span style="color: #FFFFFF"><strong><font style="font-family:Arial, Helvetica, sans-serif; font-size:24px; color:#ffffff;"> Contact us details</font></strong></span></td> </tr> <tr> <td align="left" valign="middle"><table width="633" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="22" colspan="2" align="left" valign="middle"></td> </tr> <tr> <td width="227" height="30" align="left" valign="middle"><span style="color: #FFFFFF"><font style="font-family:Arial, Helvetica, sans-serif; font-size:12px; font-weight:bold; color:#333333"> Name:</font></span></td>
} if (empty($_POST['gtlname'])) { $errors[] = "Last Name field can't be blank!"; } if (empty($_POST['gtemailid'])) { $errors[] = "Email field can't be blank!"; } else { if (!eregi('^[[:alnum:]][a-z0-9_\\.\\-]*@[a-z0-9\\.\\-]+\\.[a-z]{2,4}$', stripslashes(trim($_POST['gtemailid'])))) { $errors[] = 'Please provide a <strong>valid email address</strong>!'; } } if (empty($_POST['gtmobile'])) { $errors[] = "Mobile field can't be blank!"; } if (empty($errors)) { if (isUnique("email", $_POST['gtemailid'], "tbl_userdetails")) { $year = date("Y"); $month = date("m"); $date = date("d"); $rand2 = mt_rand(1000000, 9999999); $unikuserid = "CMD-" . $date . $month . $year . '-' . $rand2; $randpass = rand(100000, 999999); $pass = md5($randpass); $gtregquery = "INSERT INTO `tbl_userdetails` (`id`, `firstname`, `middlename`, `lastname`, `email`, `password`, `mobile`, `address1`, `address2`, `city`, `state`, `country`, `pincode`, `id_proof`, `address_proof`, `cibil_report`, `imgurl`, `unikuserid`, `status`, `validate`, `mvalidate`, `add_date`, `otpstatus`) VALUES (NULL, '{$rwsfname}', '{$rwsmname}', '{$rwslname}', '{$rwsuemailid}', '{$pass}', '{$rwsmobile}', '', '', '', '', '', '', '', '', '', '', '{$unikuserid}', '1', '0', '0', NOW(), '0')"; $gtresult = mysql_query_with_throw($gtregquery); $userid = mysql_insert_id(); $rwsuserid2 = $userid; $validateid = base64_encode("ClearMyDues-" . $userid); $activeurl = $baseurl . "index.php?p=validate&vid=" . $validateid; $usermobile = $rwsmobile; $usermessage = 'Dear ' . $rwsfname . ', Thank you for registering with ClearMyDues. Your OTP is : ' . $randpass . ' ClearMyDues';
<label for="cemail" class="control-label col-md-4 col-sm-4">MI Name:</label> <div class="col-md-8 col-sm-8"> <select class="" data-width="100%" name="medicartOffer_MIId" id="miName"> </select> <label class="error"><?php echo form_error('medicartOffer_MIId'); ?> </label> </div> </article> <article class="form-group m-lr-0 "> <label for="cemail" class="control-label col-md-4 col-sm-4">Id :</label> <div class="col-md-8 col-sm-8"> <input class="form-control disabled" id="medicartOffer_OfferId" name="medicartOffer_OfferId" type="disabled" required="" aria-required="true" placeholder="ACM304" value="<?php echo isUnique(); ?> " readonly="" > <label class="error"><?php echo form_error('medicartOffer_OfferId'); ?> </label> </div> </article> <article class="form-group m-lr-0"> <label for="cname" class="control-label col-md-4 col-sm-4">Offer Category:</label> <div class="col-md-8 col-sm-8"> <select class="selectpicker" data-width="100%" name="medicartOffer_offerCategory"id="medicartOffer_offerCategory" required=""> <?php foreach ($allOffetCategory as $keys => $values) {
} if (empty($_SESSION['myForm']["bank"])) { $errors[] = 'Creditor field can\'t be blank!'; } if ($_SESSION['myForm']["bank"] == "cmdbankother" && $_POST["rwsconfirm"] != 1) { if (empty($_SESSION['myForm']["otherbank"])) { $errors[] = 'Specify Bank Name field can\'t be blank!'; } } else { if ($_SESSION['myForm']["bank"] != "cmdbankother") { $_SESSION['myForm']["otherbank"] == ""; } } /*if (empty($_POST["recaptcha_response_field"])) {$errors[]='Security Code';}*/ if (empty($errors)) { if (isUnique("account_no", $_SESSION['myForm']['account_no'], "tbl_accounts") != 0) { $account = addslashes($_SESSION['myForm']['account']); $dateofbirth = addslashes($_SESSION['myForm']['dateofbirth']); $bank = addslashes($_SESSION['myForm']['bank']); $product_type = addslashes($_SESSION['myForm']['product_type']); $account_no = trim(addslashes($_SESSION['myForm']['account_no'])); $pancard = addslashes($_SESSION['myForm']['pancard']); $notes = addslashes($_SESSION['myForm']['notes']); $otherbank = addslashes($_SESSION['myForm']['otherbank']); $caption = addslashes($_SESSION['myForm']['caption']); $rwspayfull = addslashes($_SESSION['myForm']['rwspayfull']); if ($bank == "cmdbankother") { $querybank = mysql_query_with_throw("INSERT INTO `tbl_banks` ( `id` , `bank` , `logo` , `status` , `add_date`) VALUES (0, '{$otherbank}', '', '1', NOW())"); $bankidn = mysql_insert_id(); } if ($bankidn != "") {