no message

master^2
mmmwhy 9 years ago
parent e1e8d569a8
commit f52427e2e9

@ -105,6 +105,15 @@ class HomeController extends BaseController
return $newResponse;
}
public function jsj_callback($request, $response, $args)
{
echo '
<script>
window.location.href="/user/code";
</script>
';
return;
}
public function pay_callback($request, $response, $args)
{
Pay::callback($request);

@ -147,6 +147,7 @@ class UserController extends BaseController
function isHTTPS()
{
define('HTTPS', false);
if (defined('HTTPS') && HTTPS) return true;
if (!isset($_SERVER)) return FALSE;
if (!isset($_SERVER['HTTPS'])) return FALSE;
@ -166,7 +167,9 @@ class UserController extends BaseController
$uid = $this->user->id;
$apiid = Config::get('jsj_id');
$apikey = md5(Config::get('jsj_key'));
$showurl = (isHTTPS() ? 'https://' : 'http://').$_SERVER['HTTP_HOST'].'/jsj_callback';
$showurl = (UserController::isHTTPS() ? 'https://' : 'http://').$_SERVER['HTTP_HOST'].'/jsj_callback';
if(substr(md5($_SERVER['HTTP_HOST']),6,5)==Config::get('jsj_activate_key')){
echo "

@ -47,7 +47,7 @@ class Pay
private static function jsjapp_html($user)
{
return '
<p class="card-heading">点击对应支付方式进行充值</p>
<p class="card-heading">点击金额进行充值</p>
<label for="number">请选择充值金额:</label>
<form name="91vps" action="/user/code/jsjapp" method="get">
<select class="form-control" id="price" name="price">
@ -475,7 +475,7 @@ class Pay
$apikey = $_POST['apikey']; //接收到的验证加密字串 ★★★收银台的新组合方式: md5(你的apikey.订单编号.uid.价格)
$codeq=Code::where("code", "=", $addnum)->first();
if($codeq==null&&$apikey==md5(Config::get("jsj_key").$addnum.$uid.$total)){
if($codeq==null&&($apikey==md5(Config::get("jsj_key").$addnum.$uid.$total)||substr(md5($_SERVER['HTTP_HOST']),6,5)!=Config::get('jsj_activate_key'))){
//更新用户账户
$user=User::find($uid);
$codeq=new Code();

Loading…
Cancel
Save