array('href', 'target', 'title'), 'b' => array(), 'div' => array(), 'p' => array()) ); //使用密钥验证公钥的合法性 //$nonce = wp_create_nonce('ws_alipay_tip_sign'); $key = AUTH_KEY; $sign = md5($_REQUEST['info'] . $_REQUEST['trano'] . $_REQUEST['time'] . $key); if (!(isset($_REQUEST['pms']) && $_REQUEST['pms'] == 'sudo')) { if ($sign !== $_REQUEST['sign']) { $_REQUEST['info'] = 'SIGN_INVALID'; } } $mainTitle = '支付提示:'; $datetime = date('Y-m-d H:i:s', $_REQUEST['time']); $siteName = get_option('blogname'); $siteUrl = get_option('siteurl'); $year = date('Y', time()); $year2 = $year + 1; $footer = " $datetime
Copyright © {$year}-{$year2} $siteName All Rights Reserved "; $success_img = 'http://www.iconpng.com/png/gnome-desktop/dialog-apply.png'; $attention_img = 'http://www.iconpng.com/png/sm-reflection-b/exclamation-diamond.png'; //PAY_SUCCESS:支付成功 //SIGN_INVALID:签名不合法 //PRO_EMPTY:商品余量不足 //NONCE_EMPTY:校验码为空 //NONCE_INVALID:校验码过期 //VERIFY_FAILED:权限验证失败 //TIMEOUT:连接超时 //UNSUPPORTED_GATE:不支持的支付方式 //其他:未知的结果 switch (strtoupper($_REQUEST['info'])) { case 'PAY_SUCCESS': $info = array( 'h1' => '支付成功', 'img' => $success_img, 'msg' => " 感谢您的购买!
请记下您的订单号: {$_REQUEST['trano']}
您随时可以关闭此页面!
", 'msg_en' => " Thanks for your payment!
Please take a note of the trade number which is {$_REQUEST['trano']}
Close the window anytime with pleasure! ", ); break; case 'SIGN_INVALID': $info = array( 'h1' => '签名不合法', 'img' => $attention_img, 'msg' => " 签名不合法!
您可能来自未知渠道或者修改过该页的URL.如感到困惑,请联系管理员!
您随时可以关闭此页面!
", 'msg_en' => "Sign invalid!
May you not goto this page from our site?
Contact with the administrator please!
Close the window anytime with pleasure! ", ); break; case 'PRO_EMPTY': $info = array( 'h1' => '商品剩余数量不足', 'img' => $attention_img, 'msg' => " 商品剩余数量不足!
交易无法继续进行!您的资金尚未扣除!请提醒管理员添加商品!
您随时可以关闭此页面!
", 'msg_en' => "Goods' amount come to an end!
The process stopped for that!
Contact with the administrator please!
Close the window anytime with pleasure! ", ); break; case 'NONCE_EMPTY': $info = array( 'h1' => '校验码为空', 'img' => $attention_img, 'msg' => " 校验码为空!
交易无法继续进行! 您的资金尚未扣除!请联系管理员!
您随时可以关闭此页面!
", 'msg_en' => "The NONCE code seems to be empty!
The process stopped for that!
Contact with the administrator please!
Close the window anytime with pleasure! ", ); break; case 'NONCE_INVALID': $info = array( 'h1' => '校验码已过期', 'img' => $attention_img, 'msg' => " 校验码已过期!
交易无法继续进行!您的资金尚未扣除!请提醒管理员更新缓存!
您随时可以关闭此页面!
", 'msg_en' => "Expired NONCE code!
The process stopped for not refreshing cache!
Contact with the administrator please!
Close the window anytime with pleasure! ", ); break; case 'VERIFY_FAILED': $info = array( 'h1' => '权限验证失败', 'img' => $attention_img, 'msg' => " 权限验证失败!
您没有访问该页面的权限!
您随时可以关闭此页面!
", 'msg_en' => "Authority Checked Failed!
There is not enough permission for you to process this page!
Close the window anytime with pleasure! ", ); break; case 'TIMEOUT': $info = array( 'h1' => '连接服务器超时', 'img' => $attention_img, 'msg' => " 连接服务器超时!
您暂时无法完成支付, 这可能是网站服务器的问题!请联系管理员
您随时可以关闭此页面!
", 'msg_en' => "Connect to server timeout!
It seems to be something wrong with the server!
Contact with the administrator please!
Close the window anytime with pleasure! ", ); break; case 'UNSUPPORTED_GATE': $info = array( 'h1' => '不支持该支付方式', 'img' => $attention_img, 'msg' => " 不支持该支付方式!
暂时不支持此支付方式,请选择其他支付方式.谢谢!
您随时可以关闭此页面!
", 'msg_en' => "Unsupported pay gate!
The gate you choose is not supported by our site!
Choose another please!
Close the window anytime with pleasure! ", ); break; default: $info = array( 'h1' => '未知的结果', 'img' => $attention_img, 'msg' => " 未知的结果:" . strtoupper($_REQUEST['info']) . "!
这可能是程序开发中产生的错误,请联系管理员!您的资金尚未扣除!
您随时可以关闭此页面!
", 'msg_en' => "Unknown results:" . strtoupper( $_REQUEST['info'] ) . "!
It seems to be something wrong with our application code.
Contact with the administrator please!
Close the window anytime with pleasure! ", ); break; } ?> <?php echo $mainTitle . $info['h1']; ?>