Answer the question
In order to leave comments, you need to log in
How to correctly set up a robokassa on a website using a free form?
Robokassa has a solution. which works, but for a number of reasons it does not suit me.
The solution proposed as an example by the robocash itself:
<?php
$mrh_login = "login";
$mrh_pass1 = "pass1";
$inv_id = 0;
$inv_desc = "Оплата услуг";
$def_sum = "0";
$crc = md5("$mrh_login::$inv_id:$mrh_pass1");
print "<html><script language=JavaScript ".
"src='https://auth.robokassa.ru/Merchant/PaymentForm/FormFL.js?".
"MerchantLogin=$mrh_login&DefaultSum=$def_sum&InvoiceID=$inv_id".
"&Description=$inv_desc&SignatureValue=$crc'></script></html>";
?>
<form action="https://auth.robokassa.ru/Merchant/Index.aspx" method="POST">
<input type="text" name="psh-name" placeholder="Название УК или ТСЖ" required>
<input type="text" name="psh-phone" placeholder="Номер телефона" required>
<input type="text" name="email" placeholder="E-mail (не обязательное поле)">
<input type="text" name="DefaultSum" placeholder="Сумма платежа" required>
<input type=submit value='Оплатить'>
</form>
<?php
$mrh_login = "login";
$mrh_pass1 = "pass";
$Email = trim($_GET["email"]);
$inv_desc = "Оплата услуг";
$def_sum = trim($_GET["DefaultSum"]);
$shp_phone = trim($_GET["psh-name"]);
$shp_name = trim($_GET["psh-phone"]);
$encoding = "utf-8";
$inv_id = 0;
$crc = md5("$mrh_login::$inv_id:$mrh_pass1:$def_sum:$psh_phone:$psh_name:$encoding:Email");
?>
Answer the question
In order to leave comments, you need to log in
just read the documentation carefully
$crc = md5("$mrh_login::$inv_id:$mrh_pass1:$def_sum:$psh_phone:$psh_name:$encoding:Email");nonsense is written here
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question