我正在尝试将Paytm付款网关集成到我的网站。我希望所有交易都通过UPI进行。我尝试过PAYMENT_TYPE_ID
参数,就像在Paytm Docs中定义的一样。但是当我开始交易时,UPI选项没有出现在屏幕上。
有人可以帮助我吗?
Request.php
<?php
header("Pragma: no-cache");
header("Cache-Control: no-cache");
header("Expires: 0");
require_once("./lib/config_paytm.php");
require_once("./lib/encdec_paytm.php");
$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"];
$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;
//------------------Currently Tested Method----------------------------
$paramList["PAYMENT_MODE_ONLY"] = "YES";
$paramList["PAYMENT_TYPE_ID"] = "UPI";
//--------------------------------------------------------
$paramList["CALLBACK_URL"] = CALL_BACK_URL;
$paramList["MSISDN"] = CUST_NUM;
$paramList["EMAIL"] = CUST_EMAIL;
$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 ?>">
</tbody>
</table>
<script type="text/javascript">
document.f1.submit();
</script>
</form>
</body>
</html>
更新:
我发现UPI在停滞模式下不可用。在实时模式下使用相同的参数可以正常工作。