<!doctype html>
<html lang="en">
<head>
	<meta charset="utf-8">
</head>
<body>
	<?php 
		echo $this->lang->line('js_text_processing');
		
		$native = array(
			"pay_memberid" => PG_SFPAY_MERCHANT_ID,
			"pay_orderid" => $order['order_no'],
			"pay_amount" => (isset($order['transaction_amount']) ? number_format($order['transaction_amount'], 2, '.', '') : '0.00'),
			"pay_applydate" => date("Y-m-d H:i:s"),
			"pay_bankcode" => '1',
			"pay_notifyurl" => base_url() . "callback/notify/" . $order['payment_method'] . "/",
			"pay_callbackurl" => base_url() . "callback/success/" . $order['payment_method'] . "/",
			"pay_userid" => $order['member_transaction_id'],
			"pay_username" => $order['to_member_username'],
			"pay_userphone" => '0911123123123',
			"pay_userip" => $this->input->ip_address()
		);
		ksort($native);
		$md5str = "";
		foreach ($native as $key => $val) {
			$md5str = $md5str . $key . "=" . $val . "&";
		}
		$sign = strtoupper(md5($md5str . "key=" . PG_SFPAY_KEY));
		$native["pay_md5sign"] = $sign;
		$native['pay_productname'] ='VIP基础服务';
	?>
	<form id='paysubmit' name='paysubmit' method="post" action="<?php echo PG_SFPAY_PAY_URL;?>" style="display: none;"> 
		<?php
			foreach ($native as $key => $val) {
				echo '<input type="hidden" name="' . $key . '" value="' . $val . '">';
			}
		?>
	</form>
	<script style="text/javascript">document.forms['paysubmit'].submit();</script>
</body>
</html>