RoboKassa

An electronic payment company created for quick and easy payments for services.

RoboKassa integrates using POST callback.
Note! This is description ofintegration with RoboKassa.

1.

###

  1. Activate RoboKassa plugin in Merchant Panel -> Plugins
  2. Configure RoboKassa plugin and set secure password 2
  3. Go to RoboKassa merchant panel and set Result URL3 to: https://URL_TO_PostAffiliatePro/plugins/RoboKassa/robokassa.php

2.

Add RoboKassa Pay Form - DEMO1

Now you can add RoboKassa Pay Form to your page.
Example DemoShop1: http://robokassa.ru/DemoShop/Demo1.aspx?CodeLang=Php
Please edit settings of RoboKassa PayForm in CODE below.
Please add this code to your website(DEMO1):

<?php

function print_kassa() {

// registration info (login, password #1)
$mrh_login = "demo";
$mrh_pass1 = "Morbid11";

// 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 = 1;

// default payment e-currency
$in_curr = "PCR";

// language
$culture = "en";

// encoding
$encoding = "utf-8";

require_once 'PapApi.class.php';

// init session for PAP
$session = new Gpf_Api_Session("URL_TO_PostAffiliatePro/scripts/server.php");

// register click
$clickTracker = new Pap_Api_ClickTracker($session);
try {
    $clickTracker->track();
    $clickTracker->saveCookies();
} catch (Exception $e) {
}
$clickTracker->save3rdPartyCookiesOnly();

$visitorId = $clickTracker->getVisitorId();

// generate signature
$crc = md5("$mrh_login:$out_summ:$inv_id:$mrh_pass1:Shp_item=$shp_item:shp_papCookie=$visitorId");

?>

<table cellspacing="1" cellpadding="5" align="center" style="border: 1px solid black;">
	<colgroup>
		<col style="text-align: center; background-color: White;">
		<col style="text-align: center; background-color: White;">
	</colgroup>
	<tbody>
		<tr>
		<td rowspan="3"><img alt="" src="http://www.roboxchange.com/Images/Qiwi.gif"></td>
		<td>
		<form id="fq0" name="fq0" action="https://merchant.roboxchange.com/Index.aspx" method="post" style="margin: 0px;">
			<table>
				<colgroup><col style="text-align: left; background-color: White; width: 100px;"><col style="text-align: center; background-color: White; width: 99%;"><col style="text-align: right; background-color: White; width: 10px;">
				</colgroup>
				<tbody><tr><td>
					<input name="MrchLogin" value="<?php echo $mrh_login; ?>" type="hidden">
					<input name="InvId" value="<?php echo $inv_id; ?>" type="hidden">
					<input name="Desc" value="<?php echo $inv_desc; ?>" type="hidden">
					<input name="Culture" value="<?php echo $culture; ?>" type="hidden">
					<input name="SignatureValue" value="<?php echo $crc;?>" type="hidden">
					<input name="EMail" value="" type="hidden">
					<input name="OutSum" value="<?php echo $out_summ; ?>" type="hidden">
					<input name="Shp_item" value="<? echo $shp_item; ?>" type="hidden">
					<input name="in" readonly="readonly" size="7" value="<?php echo $out_summ ;?>">
					<input name="shp_papCookie" value="<?php echo $visitorId;?>" type="hidden" id="pap_g93jq7x6">
					<input name="IncCurrLabel" value="QiwiR" type="hidden">

				</td><td>
				<span style="font-weight: bold;">QIWI</span></td><td><input value="Pay" type="submit">
				</td></tr></tbody>
			</table>
		</form></td></tr><tr><td><img alt="" src="http://www.roboxchange.com/Images/Robokassa115x15.gif"></td></tr><tr><td>
		<form id="f0" name="f0" action="https://merchant.roboxchange.com/Index.aspx" method="post" style="margin: 0px;">
			<table>
				<colgroup><col style="text-align: left; background-color: White; width: 100px;"><col style="text-align: center; background-color: White; width: 99%;"><col style="text-align: right; background-color: White; width: 10px;"></colgroup>
				<tbody><tr><td id="sIncSum0">
					<input name="MrchLogin" value="<?php echo $mrh_login; ?>" type="hidden">
					<input name="InvId" value="<?php echo $inv_id; ?>" type="hidden">
					<input name="Desc" value="<?php echo $inv_desc; ?>" type="hidden">
					<input name="Culture" value="<?php echo $culture; ?>" type="hidden">
					<input name="SignatureValue" value="<?php echo $crc;?>" type="hidden">
					<input name="EMail" value="" type="hidden">
					<input name="OutSum" value="<?php echo $out_summ;?>" type="hidden">
					<input name="Shp_item" value="<? echo $shp_item; ?>"" type="hidden">
					<input name="shp_papCookie" value="<?php echo $visitorId;?>" type="hidden" id="pap_g93jq7x6">
					<input id="in" name="in" readonly="readonly" size="7" value="">
				</td><td id="sIncCurr0"><select id="IncCurrLabel" name="IncCurrLabel" onchange="curr_chf0()"><option value="">Other payment methods</option><optgroup label="Electronic currencies"><option value="PCR">Yandex.Money</option><option value="WMR">WMR</option><option value="WMZ">WMZ</option><option value="WME">WME</option><option value="WMU">WMU</option><option value="WMY">WMY</option><option value="WMB">WMB</option><option value="MoneyMailR">RUR MoneyMail</option><option value="RuPayR">RUR RBK Money</option><option value="W1R">RUR W1</option><option value="EasyPayB">EasyPay</option><option value="LiqPayZ">USD LiqPay</option><option value="WebCredsR">RUR WebCreds</option></optgroup><optgroup label="Other payment methods"><option value="ElecsnetR">Via Elecsnet terminals</option><option value="IFreeR">Via SMS</option><option value="ContactR">Via CONTACT system</option><option value="PayPalZ">Via PayPal</option><option value="BANKR">By bank card</option><option value="OceanBankR">By bank card via Platezh.ru</option><option value="MPBeelineR">Beeline mobile payments</option></optgroup></select></td><td id="sSubmit0"><input id="BSubmit" value="Pay" type="submit"></td></tr></tbody>
			</table>
		</form>
	</td></tr>
	</tbody>

</table>
<?php
}

print_kassa();
?>

Notice, that you have to have actual PapApi file into directory where is pay form located. You can download it from your merchant panel > start > tools > integration > api integration > Download PAP API

3.

Add RoboKassa Pay Form - DEMO2

Now you can add RoboKassa Pay Form(DEMO2) to your page.
Example DemoShop2: http://robokassa.ru/DemoShop/Demo2.aspx?CodeLang=Php
Please edit settings of RoboKassa PayForm in CODE below.
Please add this code to your website:

<?php

// registration info (login, password #1)
$mrh_login = "demo";
$mrh_pass1 = "Morbid11";

// 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 = "PCR";

// language
$culture = "en";

require_once 'PapApi.class.php';

// init session for PAP
$session = new Gpf_Api_Session("URL_TO_PostAffiliatePro/scripts/server.php");

// register click
$clickTracker = new Pap_Api_ClickTracker($session);
try {
    $clickTracker->track();
    $clickTracker->saveCookies();
} catch (Exception $e) {
}
$clickTracker->save3rdPartyCookiesOnly();

$visitorId = $clickTracker->getVisitorId();

// generate signature
$crc = md5("$mrh_login:$out_summ:$inv_id:$mrh_pass1:Shp_item=$shp_item:shp_papCookie=$visitorId");

// payment form
print
	"<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=hidden name=shp_papCookie value=\"$visitorId\" id=\"pap_g93jq7x6\">".
		"<input type=submit value='Pay'>".
	"</form>";

?>

Notice, that you have to have actual PapApi file into directory where is pay form located. You can download it from your merchant panel > start > tools > integration > api integration > Download PAP API

4.

Notifications

If you want to send notification emails to merchant or affiliates, do not forget to set it in Configurations -> Email Notifications -> On new sale