<?php
session_start();

$userName		= $_POST['user_name'];
$password		= $_POST['password'];
$pNum			= $_POST['p_num'];
$currency		= $_POST['currency'];
$amount			= $_POST['amount'];
$title			= $_POST['title'];
$successUrl		= $_POST['success_url'];
$failUrl		= $_POST['fail_url'];
$returnUrl		= $_POST['return_url'];
$language		= $_POST['language'];

$hash = hash('sha256', $userName . $password . $pNum);
?>

<!doctype html>
<html lang="ja">
	<head>
		<meta charset="utf-8">
	</head>
	<body>
		<form action="../<?php echo $language;?>/settlement" method="POST">
			シグネチャ：<?php echo $hash; ?><br/>
			番組コード：<?php echo $pNum; ?><br/>
			通貨：<?php echo $currency; ?><br/>
			金額：<?php echo $amount; ?><br/>
			商品名：<?php echo $title; ?><br/>
			成功時URL：<?php echo $successUrl; ?><br/>
			失敗時URL：<?php echo $failUrl; ?><br/>
			コールバック：<?php echo $returnUrl; ?><br/>

			<input type="submit" value="テスト送信">

			<input type="hidden" value="<?php echo $hash; ?>" name="signature" />
			<input type="hidden" value="<?php echo $pNum; ?>" name="p_num" />
			<input type="hidden" value="<?php echo $currency; ?>" name="currency" />
			<input type="hidden" value="<?php echo $amount; ?>" name="amount" />
			<input type="hidden" value="<?php echo $title; ?>" name="title" />
			<input type="hidden" value="<?php echo $successUrl; ?>" name="success_url" />
			<input type="hidden" value="<?php echo $failUrl; ?>" name="fail_url" />
			<input type="hidden" value="<?php echo $returnUrl; ?>" name="return_url" />

			<input type="hidden" value="111" name="aaa" />
			<input type="hidden" value="222" name="bbb" />
			<input type="hidden" value="333" name="ccc" />
			<input type="hidden" value="444" name="ddd" />
		</form>
	</body>
</html>