Answer the question
In order to leave comments, you need to log in
How to protect the amount of payment in the form from editing?
I'll start by describing the implementation of the payment system.
For payment, the Yandex.Money service is used, a form has been created with the attributes necessary to request and go to a protected area. But here's the problem: in the page code, the user can change any payment data, including the amount and addressee. Yes, you can, of course, double-check each order manually, but that's not it.
Actually, the code of the form:
<form action="https://money.yandex.ru/quickpay/confirm.xml" id ='formx' method="post" onsubmit='call()'>
{{ form.as_p}}
{% csrf_token %}
<input type="hidden" id='receiver' name="receiver" value="41001681163599">
<input type="hidden" id='quickpay-form' name="quickpay-form" value="small">
<input type="hidden" id='targets' name="targets" value="транзакция J-star">
<input type="hidden" id='sum' name="sum" value="{{cart.get_total_price}}">
<input type="hidden" id='paymentType' name="paymentType" value="AC">
<input type='submit' value='Отправить' onClick='create_Order()'/>
</form>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question