A
A
Alex Goncharov2015-09-09 11:02:00
Electronic commerce
Alex Goncharov, 2015-09-09 11:02:00

Kar connect Robokassa to your button on html-landing page?

Kar connect Robokassa to your button on html-landing page? There is a landing: http://againyouth.rf. How to connect a robokassa script to the "Buy" button?
There is a script code:

<?
// регистрационная информация (Идентификатор магазина, пароль #1)
// registration info (Merchant ID, password #1)
$mrh_login = "demo";
$mrh_pass1 = "password_1";

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

// описание заказа
// order description
$inv_desc = "Техническая документация по ROBOKASSA";

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

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

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

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

// кодировка
// encoding
$encoding = "utf-8"; 

// Адрес электронной почты покупателя
// E-mail
$Email = "[email protected]";

// Срок действия счёта
// Expiration Date
$ExpirationDate = "2015-07-30T12:00";

// Валюта счёта
// OutSum Currency
$OutSumCurrency = "USD";

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

// форма оплаты товара
// payment form
  print
   "<html>".
   "<form action='https://auth.robokassa.ru/Merchant/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=hidden name=Email value=$Email>".
   "<input type=hidden name=ExpirationDate value=$ExpirationDate>".
   "<input type=hidden name=OutSumCurrency value=$OutSumCurrency>".
   "<input type=submit value='Оплатить'>".
   "</form></html>";
?>

Button code:
<!-- m_editable region-id="editable-static-tag-U1128" template="index.html" data-type="image" -->
   
     <div class="clip_frame clearfix grpelem" id="u1128" data-muse-uid="U1128" data-muse-type="img_frame"><!-- image -->
      <div id="u1128_clip">
       <img class="position_content" id="u1128_img" src="images/btn.png" alt="" width="402" height="159" data-muse-src="images/btn.png"/>
      </div>
     </div>
     <!-- /m_editable -->

How to combine them into one? And start paying?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Menaskop, 2015-09-14
@calirails

Hello,
do you have a form?

<form action='https://auth.robokassa.ru/Merchant/Index.aspx' method=POST>
etc., the fields are all hidden. Just add to <input type=submit value='Оплатить'>drawing
<img class="position_content" id="u1128_img" src="images/btn.png" alt="" width="402" height="159" data-muse-src="images/btn.png"/>

The simplest, if you do not change the code at all and do it "as it is", then after <div id="u1128_clip">- make the form, and then - the button, close the form.
PS By the way, since you have a one-page - be sure to use the alt of the picture under the keywords (description), a small but always a bonus to SEO

H
HAbRAhabp, 2015-09-20
@HAbRAhabp

and you can also add an id to the form, and do this:
requires jquery

S
saidnavy, 2017-09-24
@saidnavy

Today there are widgets, all the information is presented in the documentation. Moreover, there is a decision 54FZ, when you can accept payments by bank cards without using an online cash desk. The site has all the documentation. Or write - I will try to help.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question