S
S
Sergey750il2015-12-10 23:02:57
PHP
Sergey750il, 2015-12-10 23:02:57

Form of payment Robokassa without a basket?

Hello. There is only one form on the site with a drop-down list for buying certificates, there is no basket.
I want to make a form with passing parameters to the handler, but how to make it first generate MD5 ($crc = md5("$mrh_login:$out_summ:$inv_id:$mrh_pass1:Shp_item=$shp_item");) and a unique number, and then everything has been sent.

<?

// 2.
// Оплата заданной суммы с выбором валюты на сайте ROBOKASSA
// Payment of the set sum with a choice of currency on site ROBOKASSA

// регистрационная информация (логин, пароль #1)
// registration info (login, password #1)
$mrh_login = "demo";
$mrh_pass1 = "password_1";

// номер заказа
// number of order
$inv_id = 0;

// описание заказа
// order description
$inv_desc = "ROBOKASSA Advanced User Guide";

// сумма заказа
// sum of order
$out_summ = "8.96";

// тип товара
// code of goods
$shp_item = "2";

// предлагаемая валюта платежа
// default payment e-currency
$in_curr = "";

// язык
// language
$culture = "ru";

// формирование подписи
// generate signature
$crc  = md5("$mrh_login:$out_summ:$inv_id:$mrh_pass1:Shp_item=$shp_item");

// форма оплаты товара
// payment form
print "<html>".
      "<form action='https://merchant.roboxchange.com/Index.aspx' method=POST>".
      "<input type=hidden name=MrchLogin value=$mrh_login>".
      "<input type=hidden name=OutSum value=$out_summ>".
      "<input type=hidden name=InvId value=$inv_id>".
      "<input type=hidden name=Desc value='$inv_desc'>".
      "<input type=hidden name=SignatureValue value=$crc>".
      "<input type=hidden name=Shp_item value='$shp_item'>".
      "<input type=hidden name=IncCurrLabel value=$in_curr>".
      "<input type=hidden name=Culture value=$culture>".
      "<input type=submit value='Pay'>".
      "</form></html>";
?>

7d424da210df468c83436f32d958b9f2.JPG

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Adamos, 2015-12-10
@Adamos

Make an invisible form with action=Robokassa script.
On the submit of the visible form (with one amount), you hang up an ajax request to the site about the remaining fields, fill in the invisible form with them, make it submit.
And all business.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question