<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<?php
// Merchant key here as provided by Payu
$MERCHANT_KEY = "3rBJuDi3";
$SALT = "5WbcqHhoXH";
//$txnid="b728690de9f3635d5671";
$txnid= substr(hash('sha256', mt_rand() . microtime()), 0, 20);
$name="anil";
$email="1994supriyapaul@gmail.com";
$amount=80;
$phone="8759315113";
$surl= "http://localhost/joyram/index.php";
$furl="http://localhost/joyram/signup.php";
$productInfo="xyzabc";
// Merchant Salt as provided by Payu
$hashSequence = "key|txnid|amount|productinfo|firstname|email|udf1|udf2|udf3|udf4|udf5|udf6|udf7|udf8|udf9|udf10";
$hashString=$MERCHANT_KEY."|".$txnid."|".$amount."|".$productInfo."|".$name."|".$email."|||||||||||".$SALT;
   
$hash = strtolower(hash('sha512', $hashString));
?>
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
https://secure.payu.in/_payment
-->
<html>
<head >
</head>
<body>
<h1>PayUMoney Payment Request Form </h1>
<form action="https://sandboxsecure.payu.in/_payment"  name="payuform" method=POST >
<input type="hidden" name="key" value="<?php echo $MERCHANT_KEY;?>" />
<input type="hidden" name="hash"  value="<?php echo $hash;?>" />
<input type="hidden" name="txnid" value="<?php echo $txnid;?>"/>
<table>
<tr>
<td>Amount: </td>
<td><input name="amount" value="<?php echo $amount;?>" /></td>
<td>First Name: </td>
<td><input name="firstname" id="firstname" value="<?php echo $name;?>" /></td>
</tr>
<tr>
<td>Email: </td>
<td><input name="email" id="email"  value="<?php echo $email;?>" /></td>
<td>Phone: </td>
<td><input name="phone" value="<?php echo $phone;?> " /></td>
</tr>
<tr>
<td>Product Info: </td>
<td colspan="3"><textarea name="productinfo" ><?php echo $productInfo;?></textarea></td>
</tr>
<tr>
<td>Success URI: </td>
<td colspan="3"><input name="surl"  size="64" value="<?php echo $surl;?> " /></td>
</tr>
<tr>
<td>Failure URI: </td>
<td colspan="3"><input name="furl"  size="64" value="<?php echo $furl;?> " /></td>
</tr>
<tr>
<td colspan="3"><input type="hidden" name="service_provider" value="payu_paisa" /></td>
</tr>
<tr>

<td colspan="4"><input type="submit" value="Submit"  /></td>
</tr>
</table>
</form>
</body>
</html>
<!--<html>
<head >
</head>
<body>
<h1>PayUMoney Payment Request Form </h1>
<form action="https://sandboxsecure.payu.in/_payment"  name="payuform" method=POST >
  <input type="hidden" name="key" value="<?php echo $MERCHANT_KEY ?>" />
      <input type="hidden" name="hash" value="<?php echo $hash ?>"/>
      <input type="hidden" name="txnid" value="<?php echo $txnid ?>" />
<table>
<tr>
<td><b>Mandatory Parameters</b></td>
</tr>
<tr>
<td>Amount: </td>
<td><input name="amount"  value="<?php echo $amount ?>" /></td>
<td>First Name: </td>
<td><input name="firstname" id="firstname" value="<?php echo $name ?>" /></td>
</tr>
<tr>
<td>Email: </td>
<td><input name="email" id="email"  value="<?php echo $email ?>" /></td>
<td>Phone: </td>
<td><input name="phone" value="<?php echo $phone ?>" /></td>
</tr>
<tr>
<td>Product Info: </td>
<td colspan="3"><textarea name="productinfo"  >  <?php echo $productInfo ?> </textarea></td>
</tr>
<tr>
<td>Success URI: </td>
<td colspan="3"><input name="surl"  size="64" value="<?php echo $surl ?>" /></td>
</tr>
<tr>
<td>Failure URI: </td>
<td colspan="3"><input name="furl"  size="64" value="<?php echo $furl ?>" /></td>
</tr>
<tr>
<td colspan="3"><input type="hidden" name="service_provider" value="payu_paisa" /></td>
</tr>
<tr>
<td><b>Optional Parameters</b></td>
</tr>
<tr>
<td>Last Name: </td>
<td><input name="lastname" id="lastname"  /></td>
<td>Cancel URI: </td>
<td><input name="curl" value="" /></td>
</tr>
<tr>
<td>Address1: </td>
<td><input name="address1" /></td>
<td>Address2: </td>
<td><input name="address2"  /></td>
</tr>
<tr>
<td>City: </td>
<td><input name="city"  /></td>
<td>State: </td>
<td><input name="state"  /></td>
</tr>
<tr>
<td>Country: </td>
<td><input name="country"  /></td>
<td>Zipcode: </td>
<td><input name="zipcode"  /></td>
</tr>
<tr>
<td>UDF1: </td>
<td><input name="udf1"  /></td>
<td>UDF2: </td>
<td><input name="udf2"  /></td>
</tr>
<tr>
<td>UDF3: </td>
<td><input name="udf3"   /></td>
<td>UDF4: </td>
<td><input name="udf4"  /></td>
</tr>
<tr>
<td>UDF5: </td>
<td><input name="udf5"  /></td>
<td>PG: </td>
<td><input name="pg"  /></td>
</tr>
<td colspan="4"><input type="submit" value="Submit"  /></td>
</tr>
</table>
</form>
</body>
</html>-->