$strmessage .= "Sincerely \r\n";
         $strmessage .= "{$_SESSION['gw_emails_sales']} \r\n";
         $strmessage .= "{$_SESSION['gw_title']} \r\n";
         $str_from = "{$_SESSION['gw_emails_sales']}";
         func_send_mail($str_from, $toemail, $str_subject, $strmessage);
     } else {
         if ($i_bnk_creditcard == 9 || $i_bnk_creditcard == 10) {
             $toemail = func_get_value_of_field($cnn_cs, "cs_bank", "bank_email", "bank_id", $i_bnk_creditcard);
             $refer_num = func_get_value_of_field($cnn_cs, "cs_scanorder", "ScanOrderId", "transactionId", $oldtrans_id);
             $str_subject = "Cancellation of Transaction";
             $strmessage = "Please cancel the transaction having Identification Number: {$refer_num} .\r\n";
             $strmessage .= "Sincerely \r\n";
             $strmessage .= "{$_SESSION['gw_emails_sales']} \r\n";
             $strmessage .= "{$_SESSION['gw_title']} \r\n";
             $str_from = "{$_SESSION['gw_emails_sales']}";
             func_send_mail($str_from, $toemail, $str_subject, $strmessage);
         }
     }
 }
 //exit();
 //	print($qryUpdate."<br>");
 if (!mysql_query($qryUpdate, $cnn_cs)) {
     print mysql_errno() . ": " . mysql_error() . "<BR>";
     print "Can not execute query cancel update query";
     exit;
 }
 $qryUpdate = "update cs_transactiondetails set reason='Customer Cancel', other=null,admin_approval_for_cancellation='A' where transactionId={$iTransactionId}";
 if (!mysql_query($qryUpdate, $cnn_cs)) {
     print mysql_errno() . ": " . mysql_error() . "<BR>";
     print "Can not execute query cancel update query";
     exit;
Exemplo n.º 2
0
                    $mail_sent = mysql_result($rst_select_sent, 0, 1);
                }
                $email_from = $email1;
                $email_to = $email1;
                $email_subject = "Registration Confirmation";
                $transactiontype = func_get_merchant_name($transaction_type);
                $email_message = func_getreplymailbody_admin($companyname, $username, $password, $user_reference_num, $transactiontype, $how_about_us, $voulmeNumber);
                if (!func_send_mail($email_from, $email_to, $email_subject, $email_message)) {
                    print "An error encountered while sending the mail.";
                }
                if ($mail_sent == 1) {
                    $email_from = $email1;
                    $email_to = $email;
                    $email_subject = "Registration Confirmation";
                    $email_message = func_getreplymailbody_gateway($companyname, $username, $password, $companyname1, $email1, $url1, $user_reference_num);
                    if (!func_send_mail($email_from, $email_to, $email_subject, $email_message)) {
                        print "An error encountered while sending the mail.";
                        exit;
                    }
                }
            }
            /*************************************************************************/
            $msgtodisplay = "<table width='350' height='100' align='center' valign='middle' style='border:1px solid black'><tr><td align='center' valign='middle'><font face='verdana' size='1' color='red'>An email has been sent with your offshore merchant account infomation</font></td></tr><tr><td align='center'><a href='javascript:window.history.back();'><img border='0' src='images/back.jpg'></a></td></tr></table>";
            //	$msgtodisplay = $email_message;
        }
    }
}
?>

<html>
<head>
Exemplo n.º 3
0
function func_send_transaction_success_mail($trans_id)
{
    $headers = "";
    $headers .= "From: Companysetup <*****@*****.**>\n";
    $headers .= "X-Sender: Admin Companysetup\n";
    $headers .= "X-Mailer: PHP\n";
    // mailer
    $headers .= "X-Priority: 1\n";
    // Urgent message!
    $headers .= "Return-Path: <*****@*****.**>\n";
    // Return path for errors
    $headers .= "Content-Type: text/plain; charset=iso-8859-1\n";
    // Mime type
    $sender = "*****@*****.**";
    $str_qry = "select a.companyname, b.transactionId, b.voiceAuthorizationno, b.name, b.surname, b.address,  b.country, b.state, b.city, b.zipcode, b.CCnumber, b.cvv, b.cardtype, b.amount, b.transactionDate, b.validupto, b.misc, b.ipaddress, a.transaction_type, a.billingdescriptor, b.email, a.send_mail, a.send_ecommercemail, a.email, a.userId from cs_companydetails a, cs_transactiondetails b where a.userId = b.userId and b.transactionId = {$trans_id}";
    if (!($show_sql_run = mysql_query($str_qry))) {
        dieLog(mysql_errno() . ": " . mysql_error() . "<BR>");
    }
    $company_name = mysql_result($show_sql_run, 0, 0);
    $trans_id = mysql_result($show_sql_run, 0, 1);
    $voiceauth = mysql_result($show_sql_run, 0, 2);
    $firstname = mysql_result($show_sql_run, 0, 3);
    $lastname = mysql_result($show_sql_run, 0, 4);
    $address = mysql_result($show_sql_run, 0, 5);
    $country = mysql_result($show_sql_run, 0, 6);
    $state = mysql_result($show_sql_run, 0, 7);
    $city = mysql_result($show_sql_run, 0, 8);
    $zipcode = mysql_result($show_sql_run, 0, 9);
    $number = etelDec(mysql_result($show_sql_run, 0, 10));
    $cvv2 = mysql_result($show_sql_run, 0, 11);
    $cardtype = mysql_result($show_sql_run, 0, 12);
    $amount = mysql_result($show_sql_run, 0, 13);
    $dateToEnter = mysql_result($show_sql_run, 0, 14);
    $validupto = mysql_result($show_sql_run, 0, 15);
    $misc = mysql_result($show_sql_run, 0, 16);
    $domain1 = mysql_result($show_sql_run, 0, 17);
    $transaction_type = mysql_result($show_sql_run, 0, 18);
    $billingdescriptor = mysql_result($show_sql_run, 0, 19);
    $email = mysql_result($show_sql_run, 0, 20);
    $send_mails = mysql_result($show_sql_run, 0, 21);
    $send_ecommercemail = mysql_result($show_sql_run, 0, 22);
    $fromaddress = mysql_result($show_sql_run, 0, 23);
    $company_id = mysql_result($show_sql_run, 0, 24);
    $typeofcard = "";
    if ($cardtype == "Master") {
        $typeofcard = "Master card Order";
    } else {
        $typeofcard = "Visa card Order";
    }
    $subject = "Transaction Confirmation of " . $firstname . " " . $lastname;
    $numLen = strlen($number);
    $frNum = $numLen - 4;
    $lastFour = substr($number, $frNum, $numLen);
    $message = "Transaction details of {$company_name}\r\n\r\n";
    $message .= "Transaction ID : {$trans_id} \r\n\r\n";
    $message .= "Voice Authorization ID : {$voiceauth}\r\n\r\n";
    $message .= "Name : {$firstname}  {$lastname}\r\n\r\n";
    $message .= "Address : {$address}\r\n\r\n";
    $message .= "Country : {$country}\r\n\r\n";
    $message .= "State : {$state}\r\n\r\n";
    $message .= "City : {$city}\r\n\r\n";
    $message .= "Zipcode : {$zipcode}\r\n\r\n";
    $message .= "Credit Card No : {$lastFour}\r\n\r\n";
    $message .= "CVV2 : {$cvv2}\r\n\r\n";
    $message .= "Card Type : {$typeofcard}\r\n\r\n";
    $message .= "Amount : {$amount}\r\n\r\n";
    $message .= "Date : {$dateToEnter}\r\n\r\n";
    $message .= "Expiry Date : {$validupto}\r\n\r\n";
    $message .= "Misc : {$misc}\r\n\r\n";
    $message .= "IP Address : {$domain1}\r\n\r\n";
    $message .= "Your credit card  has been charged the above amount TODAY\r\n";
    if ($send_mails == 1) {
        //$ecommerce_letter = func_get_value_of_field($cnn_cs,"cs_registrationmail","mail_sent","mail_id",2);
        $ecommerce_letter = 1;
        if ($email != "" && $transaction_type != "tele" && $ecommerce_letter == 1 && $send_ecommercemail == 1) {
            $str_email_content = func_getecommerce_mailbody();
            $str_email_content = str_replace("[customername]", $firstname . " " . $lastname, $str_email_content);
            $str_email_content = str_replace("[companyname]", $company_name, $str_email_content);
            $str_email_content = str_replace("[amount]", $amount, $str_email_content);
            $str_email_content = str_replace("[billingdescriptor]", $billingdescriptor, $str_email_content);
            $str_email_content = str_replace("[companyemailaddress]", $fromaddress, $str_email_content);
            $str_email_content = str_replace("[chargeamount]", $amount, $str_email_content);
            $str_email_content = str_replace("[cardtype]", $typeofcard, $str_email_content);
            $str_email_content = str_replace("[name]", $firstname, $str_email_content);
            $str_email_content = str_replace("[address]", $address, $str_email_content);
            $str_email_content = str_replace("[city]", $city, $str_email_content);
            $str_email_content = str_replace("[state]", $state, $str_email_content);
            $str_email_content = str_replace("[zip]", $zipcode, $str_email_content);
            $str_email_content = str_replace("[ccnumber]", substr($number, strlen($number) - 4, 4), $str_email_content);
            //	echo $str_email_content;
            $b_mail = func_send_mail($sender, $email, "Ecommerce Transaction Letter", $str_email_content);
        }
        if ($email != "") {
            mail($email, $subject, $message, $headers);
        }
        func_sendMail($company_id, $subject, $message, $headers);
    }
}
            }
            $str_email_content = str_replace("[customername]", $first_name . " " . $last_name, $str_email_content);
            $str_email_content = str_replace("[companyname]", $company_name, $str_email_content);
            $str_email_content = str_replace("[amount]", $total_amt, $str_email_content);
            $str_email_content = str_replace("[billingdescriptor]", $billingdescriptor, $str_email_content);
            $str_email_content = str_replace("[companyemailaddress]", $fromaddress, $str_email_content);
            $str_email_content = str_replace("[chargeamount]", $total_amt, $str_email_content);
            $str_email_content = str_replace("[cardtype]", $trans_type, $str_email_content);
            $str_email_content = str_replace("[name]", $first_name, $str_email_content);
            $str_email_content = str_replace("[address]", $address, $str_email_content);
            $str_email_content = str_replace("[city]", $city, $str_email_content);
            $str_email_content = str_replace("[state]", $state, $str_email_content);
            $str_email_content = str_replace("[zip]", $zipcode, $str_email_content);
            $str_email_content = str_replace("[ccnumber]", substr($account_numb, strlen($account_numb) - 4, 4), $str_email_content);
            //echo $str_email_content;
            $b_mail = func_send_mail($fromaddress, $to_id, "Ecommerce letter", $str_email_content);
            if ($b_mail) {
                $mail_status = "Mail Send";
            } else {
                $mail_status = "Failed";
            }
            ?>
		 
		<tr>
		<td bgcolor="#E2E2E2" height="30"><font size="1" face="Verdana" ><?php 
            echo $i_loop;
            ?>
&nbsp;</font></td>
		<td bgcolor="#E2E2E2"><font size="1" face="Verdana" ><?php 
            echo $i_trans_id;
            ?>
Exemplo n.º 5
0
function func_send_cancel_mail($iCompanyId, $strTransactionType)
{
    $str_trans_type = $strTransactionType == "C" ? "Check" : "Card";
    $str_from_id = "*****@*****.**";
    $str_mail_subject = "Cancellation Of Transaction";
    $str_mail_body = "Please Cancel the Following Transaction";
    /*$str_to_id = func_get_value_of_field($cnn_cs,"cs_bankdetails","bank_email","bank_routing_code",$strBankRoutingCode);*/
    $str_to_id = "";
    $qry = "select bank_email from cs_bankdetails where bank_user_id = {$iCompanyId}";
    if (!($result_set = mysql_query($qry))) {
        dieLog(mysql_errno() . ": " . mysql_error() . "<BR>");
    }
    while ($arr_result = mysql_fetch_row($result_set)) {
        $str_to_id = $arr_result[0];
        /*$str_to_id = func_get_value_of_field($cnn_cs,"cs_bankdetails","bank_email","bank_routing_code",$strBankRoutingCode);*/
        if ($str_to_id != "") {
            //print($str_to_id."<br>");
            func_send_mail($str_from_id, $str_to_id, $str_mail_subject, $str_mail_body);
        }
    }
    $qry = "select bank_email from cs_company_bankdetails where bank_user_id = {$iCompanyId} and bank_transaction_type = '{$str_trans_type}'";
    if (!($result_set = mysql_query($qry))) {
        dieLog(mysql_errno() . ": " . mysql_error() . "<BR>");
    }
    while ($arr_result = mysql_fetch_row($result_set)) {
        $str_to_id = $arr_result[0];
        if ($str_to_id != "") {
            //print($str_to_id."<br>");
            func_send_mail($str_from_id, $str_to_id, $str_mail_subject, $str_mail_body);
        }
    }
}
Exemplo n.º 6
0
	
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php 
$str_from = "*****@*****.**";
$str_to = "*****@*****.**";
$str_subject = "Test mail from CS";
$str_message = "Test content";
func_send_mail($str_from, $str_to, $str_subject, $str_message);
?>
</body>
</html>
Exemplo n.º 7
0
                         $str_email_content = func_getecommerce_mailbody();
                         $str_email_content = str_replace("[customername]", $firstname . " " . $lastname, $str_email_content);
                         $str_email_content = str_replace("[companyname]", $company_name, $str_email_content);
                         $str_email_content = str_replace("[amount]", $amount, $str_email_content);
                         $str_email_content = str_replace("[billingdescriptor]", $billingdescriptor, $str_email_content);
                         $str_email_content = str_replace("[companyemailaddress]", $fromaddress, $str_email_content);
                         $str_email_content = str_replace("[chargeamount]", $amount, $str_email_content);
                         $str_email_content = str_replace("[cardtype]", "Check", $str_email_content);
                         $str_email_content = str_replace("[name]", $firstname, $str_email_content);
                         $str_email_content = str_replace("[address]", $address, $str_email_content);
                         $str_email_content = str_replace("[city]", $city, $str_email_content);
                         $str_email_content = str_replace("[state]", $state, $str_email_content);
                         $str_email_content = str_replace("[zip]", $zip, $str_email_content);
                         $str_email_content = str_replace("[ccnumber]", substr($chequenumber, strlen($chequenumber) - 4, 4), $str_email_content);
                         //		echo $str_email_content;
                         $b_mail = func_send_mail($sender, $email, "Ecommerce Transaction Letter", $str_email_content);
                     }
                     if ($email != "") {
                         //mail($email,$subject,$message,$headers);
                     }
                     //func_sendMail($i_company_id,$subject,$message,$headers);
                 }
                 //$msgtodisplay="Order number ".$voiceauth." entered";
                 $msgtodisplay = "The Order number {$reference_number} details have been entered successfully";
                 $outhtml = "y";
                 message($msgtodisplay, $outhtml, $headerInclude);
             }
         }
     }
     exit;
 }
         $company_name = mysql_result($show_sql, 0, 1);
         $user_name = mysql_result($show_sql, 0, 2);
         $pass_word = mysql_result($show_sql, 0, 3);
         $mail_confirm = mysql_result($show_sql, 0, 4);
         $strMaildata = func_getreplymailbody($company_name, $user_name, $pass_word);
         /*			$str_current_path = "csv/confirmationmail.htm";
         			//	print $str_current_path;
         			$create_file = fopen($str_current_path,'w');
         			//	print $create_file;
         			$file_content = $strMaildata;
         			fwrite($create_file,$file_content);
         			fclose($create_file);
         */
         $txtBody = $strMaildata;
         if ($mail_confirm == 1) {
             if (!func_send_mail($fromaddress, $to_id, $subject, $txtBody)) {
                 $msgtodisplay = "Sorry, some of the emails could not be sent.";
             } else {
                 $msgtodisplay = "Mails successfully send to the users.";
             }
         }
     }
     $outhtml = "y";
     message($msgtodisplay, $outhtml, $headerInclude);
     exit;
 }
 /*	if ($i_mail_id==0)
 	{
 		$qry_query = "Insert into cs_registrationmail (mail_sent) values ($str_mail_send)";
 	}
 	else
Exemplo n.º 9
0
function func_canceledTransaction_receipt($user_id, $transactionId, $cnn_connection)
{
    $qry_select = "SELECT A.name,A.surname,A.email,B.url1,B.companyname,B.transaction_type,A.reference_number,A.cancel_refer_num FROM cs_transactiondetails as A, cs_companydetails  as B WHERE A.userId = B.userId  and A.transactionId ={$transactionId}";
    $rst_select = mysql_query($qry_select, $cnn_connection) or dieLog("Error: " . mysql_error());
    $str_return_value = "";
    if (mysql_num_rows($rst_select) > 0) {
        $str_UserName = mysql_result($rst_select, 0, 0);
        $str_UserSurName = mysql_result($rst_select, 0, 1);
        $str_UserEmail = mysql_result($rst_select, 0, 2);
        $str_URL = mysql_result($rst_select, 0, 3);
        $str_CompanyName = mysql_result($rst_select, 0, 4);
        $str_merchant_type = mysql_result($rst_select, 0, 5);
        $str_RefNum = mysql_result($rst_select, 0, 6);
        $str_CancelNum = mysql_result($rst_select, 0, 7);
    }
    if ($str_merchant_type != "tele") {
        $str_from = "*****@*****.**";
        $str_to = $str_UserEmail;
        $str_subject = "Ecommerce Letter for Canceled Transaction.";
        $str_message = "{$str_UserName} {$str_UserSurName},\r\n\r\n\n\tYour charge to {$str_URL}  {$str_CompanyName} has been cancelled. You will NOT be billed again.\r\n\r\n\n\tReference Number: {$str_RefNum} \r\n\r\n\n\tCancelation Number: {$str_CancelNum} \r\n\r\n\n\tFor any additional questions regarding billing, please contact eTeleGate at customerservice@etelegate.com.";
        func_send_mail($str_from, $str_to, $str_subject, $str_message);
    }
}