当有人点击现在支付btn时,没有收到电子邮件

时间:2018-01-11 04:39:07

标签: php html css

我是PHP的新手,建立一个带有paytm网关集成的网站。我现在已经注册了付费页面,但是当有人点击付费时,它会将它们指向pgRedirect.php(由paytm提供)。我想如果有人现在点击付费,但我们应该收到一封关于在注册页面中填写的所有详细信息的电子邮件

<?php
header("Pragma: no-cache");
header("Cache-Control: no-cache");
header("Expires: 0");
// following files need to be included
require_once("lib/config_paytm.php");
require_once("lib/encdec_paytm.php");

$NAME = $_POST['NAME'];
$EMAIL = $_POST['EMAIL'];
$phone = $_POST['phone'];
$model = $_POST['model'];
$add = $_POST['add'];
$ORDER_ID = $_POST['ORDER_ID'];
$TXN_AMOUNT = $_POST['TXN_AMOUNT'];

$sub = "enquiry from customer details";

$msg='';
$msg.="Name : $NAME <br>\r\n";
$msg.="EMAIL : $EMAIL <br>\r\n";
$msg.="Phone : $phone <br>\r\n";   
$msg.="Model : $model <br>\r\n";
$msg.="Add : $add<br>\r\n";
$msg.="ORDER_ID : $ORDER_ID<br>\r\n";
$msg.="TXN_AMOUNT : $TXN_AMOUNT <br>\r\n";

$to = 'abhi.singh779@gmail.com';

    $headers  = 'MIME-Version: 1.0' . "\r\n";
    $headers .='From: abhi.singh779@gmail.com'."\r\n";
    $headers .="Bcc: ".$emailList."\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";


    $mail=mail($to, $sub, $msg, $headers);


$checkSum = "";
$paramList = array();

$ORDER_ID = $_POST["ORDER_ID"];
$CUST_ID = $_POST["CUST_ID"];
$INDUSTRY_TYPE_ID = $_POST["INDUSTRY_TYPE_ID"];
$CHANNEL_ID = $_POST["CHANNEL_ID"];
$TXN_AMOUNT = $_POST["TXN_AMOUNT"];

// Create an array having all required parameters for creating checksum.
$paramList["MID"] = PAYTM_MERCHANT_MID;
$paramList["ORDER_ID"] = $ORDER_ID;
$paramList["CUST_ID"] = $CUST_ID;
$paramList["INDUSTRY_TYPE_ID"] = $INDUSTRY_TYPE_ID;
$paramList["CHANNEL_ID"] = $CHANNEL_ID;
$paramList["TXN_AMOUNT"] = $TXN_AMOUNT;
$paramList["WEBSITE"] = PAYTM_MERCHANT_WEBSITE;
$paramList["CALLBACK_URL"] = 'pgResponse.php';//Provided by Paytm
$paramList["EMAIL"] = $_POST["EMAIL"]; // customer email id
$paramList["MOBILE_NO"] = $_POST['phone']; // customer 10 digit mobile no.
/*$paramList["NAME"] = $_POST["name"];//Provided by Paytm
$paramList["EMAIL"] = $_POST["email"];//Provided by Paytm
$paramList["PHONE"] = $_POST["phone"];//Provided by Paytm
$paramList["MODEL"] = $_POST["model"];//Provided by Paytm
$paramList["CALLBACK_URL"] = $_POST["name"];//Provided by Paytm
$paramList["ADDRESS"] = $_POST["add"];//Provided by Paytm*/


//$paramList["MSISDN"] = $MSISDN; //Mobile number of customer
//$paramList["MERC_UNQ_REF"] =  $_POST['email'];
//$paramList["VERIFIED_BY"] = "EMAIL"; //
//$paramList["IS_USER_VERIFIED"] = "YES"; //



//Here checksum string will return by getChecksumFromArray() function.
$checkSum = getChecksumFromArray($paramList,PAYTM_MERCHANT_KEY);

?>
<html>
 <head>
 <title>Merchant Check Out Page</title>
 </head>
 <body>
    <center><h1>Please do not refresh this page...</h1></center>
        <form method="post" action="<?php echo PAYTM_TXN_URL ?>" name="f1">
        <table border="1">
            <tbody>
            <?php
            foreach($paramList as $name => $value) {
                echo '<input type="hidden" name="' . $name .'" value="' . $value . '">';
            }
            ?>
            <input type="hidden" name="CHECKSUMHASH" value="<?php echo $checkSum ?>">enter code here
            </tbody>
        </table>
        <script type="text/javascript">
            document.f1.submit();
        </script>
    </form>
</body>
</html>

1 个答案:

答案 0 :(得分:0)

您的邮件功能

$mail=mail($to, $sub, $msg, $headers);

从中删除标题

$mail=mail($to, $sub, $msg);

现在尝试