Home » Php » jquery – PayUMoney Payment Gateway PHP integration

jquery – PayUMoney Payment Gateway PHP integration

Posted by: admin February 25, 2020 Leave a comment

Questions:

I am trying to integrate PayUMoney payment gateway to my site where there are three modals that stores value of package and price. when user clicks on Buy Now i want him to redirect to PayUMoney gateway page and complete the payment. But the problem is when user clicks on BUY NOW it goes to payment page which is Blank and don’t show any data but when i open payment page manually it it shows all data and works fine. how can i resolve this?

here is my code index.php

<!DOCTYPE html>
<html>
<head>
	<title>index</title>
	<style type="text/css">
		#outer{width: auto; height: auto; float: left; }
		.box{width: 250px; height: 180px; border: 1px solid #000; margin: 5px; text-align: center; float: left;}
	</style>
</head>
<body>
	<div id="outer">
		<div class="box">
			<h4>Rs. 9,900/-</h4>
			<ul>
				<li>2-Days Classroom Training</li>
				<li>E-Learning Course</li>
			</ul>
			<form action="payment.php" method="post">
				<input type="hidden" name="amount" value="9900" readonly="readonly">
				<input type="hidden" name="package" value="basic" readonly="readonly">
				<input type="submit" name="BUY NOW" value="BUY NOW">
			</form>
		</div>
		<div class="box">
			<h4>Rs. 11,900/-</h4>
			<ul>
				<li>4-Days Classroom Training</li>
				<li>E-Learning Course</li>
			</ul>
			<form action="payment.php" method="post">
				<input type="hidden" name="amount" value="11900" readonly="readonly">
				<input type="hidden" name="package" value="standard" readonly="readonly">
				<input type="submit" name="BUY NOW" value="BUY NOW">
			</form>	
		</div>
		<div class="box">
			<h4>Rs. 14,900/-</h4>
			<ul>
				<li>4-Days Classroom Training</li>
				<li>E-Learning Course</li>
				<li>5 Hours Personal Session With The Trainer</li>
			</ul>
			<form action="payment.php" method="post">
				<input type="hidden" name="amount" value="14900" readonly="readonly">
				<input type="hidden" name="package" value="pro" readonly="readonly">
				<input type="submit" name="BUY NOW" value="BUY NOW">
			</form>
		</div>
	</div>
</body>
</html>

payment.php

response.php

and also after payment submission it is showing error on response.php Notice: Undefined index: salt in C:\wamp64\www\PayU\response.php on line 6 even though the salt name is same.

How to&Answers: