L
L
Lander2015-07-14 15:03:02
Yii
Lander, 2015-07-14 15:03:02

What's wrong with robokassa?

Good afternoon.
I want to stop using the generated form for paying an arbitrary amount. Since I did not find a description of such a form in the documentation, I decided to create a set of fields manually. Forming a value

['SignatureValue' => md5($config['MerchantLogin'].'::'.$config['InvoiceID'].':'.$password1.':Shp_user='.$userID)]

At the output I get the following form:
<form action="http://test.robokassa.ru/Index.aspx" method="POST">
  <input type="hidden" name="MerchantLogin" value="***">
  <input type="hidden" name="DefaultSum" value="5000">
  <input type="hidden" name="InvoiceID" value="0">
  <input type="hidden" name="Description" value="Пополнение счета">
  <input type="hidden" name="Culture" value="ru">
  <input type="hidden" name="Encoding" value="utf-8">
  <input type="hidden" name="SignatureValue" value="de9f7416223c9f6e0514af455b9a8283">
  <input type="hidden" name="Shp_user" value="1">
  <input type="text" name="OutSum" class="form-control" value="5000" maxlength="10">
  <button class="btn btn-success" type="submit">Пополнить</button>
</form>

After sending, the script expects the value 9eb02a6d061a3caf6647af177d2e09dd from me in the SignatureValue field. I tried different methods of formation, but the result is ALWAYS different from the desired one.
What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Entelis, 2015-07-14
@usdglander

1. You have two colons between MerchantLogin and InvoiceID for some reason.
2. As far as I remember the form looks like

<form action="..." method="POST" name="robokassa">
<input type="hidden" name="MrchLogin" value="...">
<input type="hidden" name="OutSum" value="...">
<input type="hidden" name="InvId" value="...">
<input type="hidden" name="Desc" value="...">
<input type="hidden" name="SignatureValue" value="...">
<input type="hidden" name="IncCurrLabel" value="...">
<input type="hidden" name="Culture" value="...">
</form>

E
Eugene, 2016-04-09
@deadsandro

At first I found a solution using the "poke method", and then I started to look if it was possible to find this information somewhere .. Neither Robokassa itself (documentation), nor Google knows about the "magic parameter".
you need to use FreeOutSum instead of OutSum as an input for the payment amount.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question