54 lines
2.0 KiB
PHP
54 lines
2.0 KiB
PHP
|
<?
|
|||
|
$fk_merchant_id = '65643'; //merchant_id ID <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> free-kassa.ru https://free-kassa.ru/merchant/cabinet/help/
|
|||
|
$fk_merchant_key = 'qtzl0igb'; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> https://free-kassa.ru/merchant/cabinet/profile/tech.php
|
|||
|
|
|||
|
if (isset($_GET['prepare_once'])) {
|
|||
|
$hash = md5($fk_merchant_id.":".$_GET['oa'].":".$fk_merchant_key.":".$_GET['l']);
|
|||
|
echo '<hash>'.$hash.'</hash>';
|
|||
|
exit;
|
|||
|
}
|
|||
|
?>
|
|||
|
<script src="https://yandex.st/jquery/1.6.0/jquery.min.js"></script>
|
|||
|
<script type="text/javascript">
|
|||
|
var min = 1;
|
|||
|
function calculate() {
|
|||
|
var re = /[^0-9\.]/gi;
|
|||
|
var url = window.location.href;
|
|||
|
var desc = $('#desc').val();
|
|||
|
var sum = $('#sum').val();
|
|||
|
if (re.test(sum)) {
|
|||
|
sum = sum.replace(re, '');
|
|||
|
$('#oa').val(sum);
|
|||
|
}
|
|||
|
if (sum < min) {
|
|||
|
$('#error').html('<27><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '+min);
|
|||
|
$('#submit').attr("disabled", "disabled");
|
|||
|
return false;
|
|||
|
} else {
|
|||
|
$('#error').html('');
|
|||
|
}
|
|||
|
if (desc.length < 1) {
|
|||
|
$('#error').html('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|||
|
return false;
|
|||
|
}
|
|||
|
$.get(url+'?prepare_once=1&l='+desc+'&oa='+sum, function(data) {
|
|||
|
var re_anwer = /<hash>([0-9a-z]+)<\/hash>/gi;
|
|||
|
$('#s').val(re_anwer.exec(data)[1]);
|
|||
|
$('#submit').removeAttr("disabled");
|
|||
|
});
|
|||
|
}
|
|||
|
</script>
|
|||
|
|
|||
|
<h2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <a href="https://wwww.free-kassa.ru">free-kassa.ru</a></h2>
|
|||
|
<div id="error"></div>
|
|||
|
<form method=GET action="https://www.free-kassa.ru/merchant/cash.php">
|
|||
|
<input type="hidden" name="m" value="<?=$fk_merchant_id?>">
|
|||
|
<input type="text" name="oa" id="sum" id="oa" onchange="calculate()" onkeyup="calculate()" onfocusout="calculate()" onactivate="calculate()" ondeactivate="calculate()"> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
<input type="hidden" name="s" id="s" value="0">
|
|||
|
<br>
|
|||
|
<input type="text" name="o" id="desc" value="" onchange="calculate()" onkeyup="calculate()" onfocusout="calculate()" onactivate="calculate()" ondeactivate="calculate()"> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*
|
|||
|
<br>
|
|||
|
<input type="submit" id="submit" value="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" disabled>
|
|||
|
</form>
|
|||
|
|