I am not much familiar with web security, but trying to develop a django based application. For payments, I am using Payu payment gateway, integrated successfully following the documentation.
In payment url I have to post some sensitive information like - merchant_key, txnid
along with user information, for sensitive data I am using hidden fields but I don't think it is a good option because anyone can see my sensitive data in source code.
<form action="https://test.payu.in/_payment" name="payuForm" method="post">
<input type="hidden" name="csrfmiddlewaretoken" value="pOz2jZlcwLuLJRfBor9xqr4KIXtqGUCmcUSdZl6QeIXZnKc00ApNU2BxInA94Esy">
<input type="hidden" name="key" value="123456789">
<input type="hidden" name="hash" value="98231e7321875de86639070b07a1940effad7cac37e15e277f62e6d9c9488085cd060a3b9963864f2b10a334f2c04be4387b3fe24422d01cf5ed49d1a54c39f0">
<input type="hidden" name="txnid" value="833657e26b12fde34b620c67a3a8646c">
<input type="hidden" name="amount" value="1.0">
<input type="hidden" name="email" value="pankaj@gmail.com">
<input type="hidden" name="firstname" value="Pankaj">
<input type="hidden" name="phone" value="9950542612">
<input type="hidden" name="productinfo" value="Message showing product details.">
<input type="hidden" name="surl" value="http://127.0.0.1:8000/orders/payment/success">
<input type="hidden" name="furl" value="http://127.0.0.1:8000/orders/payment/failure">
<!-- <input type="hidden" name="service_provider" value="" /> -->
<div class="form-group">
<div class="col-md-12 col-sm-12">
Amount : 1.0
</div>
</div>
<div class="form-group">
<div class="col-md-12 col-sm-12">
Purpose : Message showing product details.
</div>
</div>
<div class="form-group">
<div class="col-md-12 col-sm-12">
Name : Pankaj
</div>
</div>
<div class="form-group">
<div class="col-md-12 col-sm-12">
Email : pankaj@gmail.com
</div>
</div>
<div class="form-group">
<div class="col-md-12 col-sm-12">
Mobile : 9950542612
</div>
</div>
<div class="form-group">
<div class="col-md-12 col-sm-12">
Transaction ID : 833657e26b12fde34b620c67a3a8646c
</div>
</div>
<div class="form-group">
<div class="col-md-12 col-sm-12" style="padding-bottom:20px;padding-top:20px;">
After clicking 'Pay Now' button, you will be redirected to PayUMoney Secure Gateway.
</div>
</div>
<div class="form-group">
<div class="col-md-12 col-sm-12">
<input type="submit" class="btn btn-success btn-sm" value="Pay Now">
</div>
</div>
Is it a only way to post data to url, I tried to post data with redirect but because of some security issues we can't post data with redirect - see this.
If anyone can help to understand this.