RoboKassa integration
Una società di pagamento elettronico creata per farti effettuare dei pagamenti facili e veloci sui tuoi servizi.
Nota! Questa è la descrizione dell’integrazione con RoboKassa.
Attivazione
- Attiva il plugin RoboKassa nel Pannello commerciante > Plugin
- Configura il plugin RoboKassa e imposta la password sicura 2
- Vai al pannello commerciante di RoboKassa e imposta Result URL3 a: https://URL_TO_PostAffiliatePro/plugins/RoboKassa/robokassa.php
Aggiungi il Modulo di Pagamento RoboKassa – DEMO1
Ora puoi aggiungere il Modulo di Pagamento RoboKassa alla tua pagina.
Esempio di DemoShop1: http://robokassa.ru/DemoShop/Demo1.aspx?CodeLang=Php
Si prega di modificare le impostazioni del Modulo di Pagamento RoboKassa nel CODICE qui sotto. Inoltre dovresti aggiungere questo codice al tuo sito web (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="RoboKassa"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="RoboKassa"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();
?>
Nota, devi avere il file PapApi attuale nella directory dove si trova il modulo di pagamento. Puoi scaricarlo dal tuo pannello Commerciante > Avvia > Strumenti > Integrazione > Integrazione API > Download PAP.
Aggiungi il modulo di pagamento RoboKassa – DEMO2
Ora puoi aggiungere il Modulo di Pagamento RoboKassa(DEMO2) alla tua pagina. Esempio di DemoShop2: http://robokassa.ru/DemoShop/Demo2.aspx?CodeLang=Php
Si prega di modificare le impostazioni del Modulo di Pagamento RoboKassa nel CODICE qui sotto. Aggiungi questo codice al tuo sito web:
<?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>";
?>
Nota, devi avere il file PapApi attuale nella directory dove si trova il modulo di pagamento. Puoi scaricarlo dal tuo pannello Commerciante > Avvia > Strumenti > Integrazione > Integrazione API > Download PAP.
Notifiche
Se vuoi inviare delle email di notifica al commerciante o agli affiliati, non dimenticare di impostarlo in Configurazioni > Notifiche delle Email > Su nuova vendita.