Created
October 14, 2013 12:38
-
-
Save vladkorotnev/6974940 to your computer and use it in GitHub Desktop.
Имитация платежной системы с редиректом на один урл в случае отмены и на другой в случае оплаты
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Образец применения: | |
http://example.ex/payment.php?recv=%D0%9E%D0%9E%D0%9E%20%22%D0%9C%D0%BE%D1%81%D0%BA%D0%BE%D0%B2%D1%81%D0%BA%D0%B8%D0%B9%20%D0%9F%D1%81%D0%BA%D0%BE%D0%B2%D1%81%D0%BA%D0%B8%D0%B9%20%D0%A1%D1%8D%D0%B9%D0%B4%D0%B8%D1%81%D0%BD%D0%B8%D0%BB%D1%8E%D1%81%D1%81%D0%BA%D0%B8%D0%B9%22&amount=1000¤cy_code=USD&item_name=%D0%9B%D0%BE%D1%85%20%D0%9E%D0%B1%D1%8B%D0%BA%D0%BD%D0%BE%D0%B2%D0%B5%D0%BD%D0%BD%D1%8B%D0%B9 | |
recv = получатель | |
amount = сумма | |
currency_code = код валюты | |
item_name = название товара | |
return = адрес прохода платежа | |
cancel_return = адрес отмены платежа |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title> Какая-то платежная система </title> | |
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen"> | |
</head> | |
<body style="background-image: url(http://bradjasper.com/subtle-patterns-bookmarklet/patterns/satinweave.png); background-size: auto; background-repeat: repeat repeat;"> | |
<small > Данная страница является вымыслом и вообще используется только для проверки ПО</small> | |
<? | |
$names = array( | |
'Сосьёте, Женераль!', | |
'Расфуфайзен', | |
'Росгосбанк', | |
'Единая Россия', | |
'Гамма-банк' | |
); | |
$slogans = array( | |
'', | |
'', | |
'', | |
'Только у нас 146% по вкладам!', | |
'Самый радиоактивный банк галактики' | |
); | |
$ind = array_rand($slogans); | |
$name = $names[$ind]; | |
$slogan = $slogans[$ind]; | |
?> | |
<center><h1>Международный банк «<?= $name ?>»</h1> | |
<p style="font-size: 18px"><?= $slogan ?></small></center> | |
<div style="width: 700px; margin: 0 auto;"> | |
<hr> | |
<center><div class="alert alert-warning alert-block"><strong>Получатель: </strong><?= $_GET['recv'] ?></div></center> | |
<table style="width: 700px; margin: 0 auto; background:white;" class="table table-bordered table-hover table-alternating"> | |
<thead> | |
<tr> | |
<td>№ п/п</td> | |
<td>Название</td> | |
<td>Сумма к оплате</td> | |
</tr> | |
</thead> | |
<tbody> | |
<tr> | |
<td>1</td> | |
<td><?= $_GET['item_name'] ?></td> | |
<td><?= $_GET['amount'] ?> <?= $_GET['currency_code'] ?></td> | |
</tr> | |
<tr> | |
<td style="width:10%; background: #eee">Итого:</td> | |
<td style=" background: #eee" colspan="2"><center><strong><?= $_GET['amount'] ?> <?= $_GET['currency_code'] ?></strong></center></td> | |
</tr> | |
</tbody> | |
</table> | |
<hr> | |
<div class="alert alert-info alert-block"><center> | |
<a class="btn btn-large btn-success" href="<?= $_GET['return'] ?>">Оплатить</a> | |
<a class="btn btn-large btn-danger" href="<?= $_GET['cancel_return'] ?>">Отменить</a> | |
</center> | |
</div> | |
</div> | |
<i>Эмулятор платежных систем BankSim v0.1 by Akasaka Ryuunosuke</i> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment