PHP 支付接口集成问题

这是支付成功服务器回掉参数
这是支付成功服务器回调参数

<?php
header("Content-type: text/html; charset=utf-8");
require_once('../../../../wp-config.php');
require("info.php");


        $partner=$_GET['partner'];//商户订单号
        $orderstatus=$_GET['orderstatus']; //1表示支付成功
        $paymoney=$_GET['paymoney'];//订单金额
        $ordernumber=$_GET['ordernumber'];//宝龙订单号
        $systime=$_GET['systime'];//处理完时间
        $attach=$_GET['attach'];//备注消息
        $sign=$_GET['sign'];//加密密文

        //准备加密字符串
        $signStr="partner={$partner}&orderstatus={$orderstatus}&ovalue={$ovalue}$key";
        //加密
        $mysign=md5($signStr);
        if($mysign==$sign){

                if($orderstatus==1){
                    //支付成功,请处理订单
                    global $wpdb;

                    $money_info=$wpdb->get_row("select * from ".$wpdb->icemoney." where ice_num=".$partner);
                    if($money_info){
                        if(!$money_info->ice_success){
                            addUserMoney($money_info->ice_user_id, $ovalue*get_option('ice_proportion_alipay'));
                        }
                        $wpdb->query("UPDATE $wpdb->icemoney SET ice_money = '".$ovalue*get_option('ice_proportion_alipay')."', ice_alipay = '".$sysorderid."',ice_success=1, ice_success_time = '".date("Y-m-d H:i:s")."' WHERE ice_num = '".$partner."'");
                    }
                    echo "orderstatus=1";


                }else if($orderstatus==-1){
                    echo "请求参数无效";

                }else if($orderstatus==-2){
                    echo "签名错误";

                }
                exit;

        }else{
            echo "交易数据被串改";
        }


//http_redirect($gatewayUrl);

?>

这是回调页面PHP代码
目前是支付成功,回调失败

图片说明
这是参数说明

http://blog.csdn.net/hubu2006/article/details/20624299