致命错误:未捕获的SoapFault异常:[soap:Client]

use*_*409 4 php soap payment-gateway

嗨我的支付网关有问题,当工作在网关完成时,它通过下面的编码返回到此文件

 <?php
 include("app/config.php"); 
 $db_connect = mysql_connect($AppConfig['db']['host'],$AppConfig['db']['user'],$AppConfig['db']['password']);
 mysql_select_db($AppConfig['db']['database'], $db_connect);
 $rest=mysql_query("SELECT * FROM p_players WHERE player_type=2" );   
 $rowa = mysql_fetch_assoc($rest); 
 $nameadmin=$rowa['name'];
 $idadmin=$rowa['id'];


 // Form Content
 echo '<html dir="rtl">
  <head>

  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <style>
    .title
    {
        height:30px;
    }     
    input
    {
        font-family:tahoma;
    }
  </style>
  </head>
  <body style="font-family:tahoma;line-height:30px">';
  //echo $this->package['cost'].'--'.$AppConfig['plus']['packages'][0]['cost'];

 // echo $st[1];
 // echo $AppConfig['plus']['payments']['paypal']['merchant_id'];
    if(isset($_POST['status']) && $_POST['status'] == 100){


    $Resnumber = $_POST['resnumber'];
    $Refnumber = $_POST['refnumber'];

    $info = split("_",$Resnumber,2);

    $UID = $info[0];
    $PgID = $info[1];

    $MerchantID = $AppConfig['plus']['payments']['paypal']['merchant_id'];
    $Password = $AppConfig['plus']['payments']['paypal']['key'];

    $Price = $AppConfig['plus']['packages'][$PgID]['cost'];

    $client = new SoapClient('http://merchant.parspal.com/WebService.asmx?wsdl');

    $res = $client->VerifyPayment(array("MerchantID" => $MerchantID , "Password" =>$Password , "Price" =>$Price,"RefNum" =>$Refnumber ));

    $Status = $res->verifyPaymentResult->ResultStatus;
    $PayPrice = $res->verifyPaymentResult->PayementedPrice;



    if($Status == 'success')// Your Peyment Code Only This Event
    {
    $result = mysql_query("SELECT * FROM p_players WHERE id='$UID'");
        while($row = mysql_fetch_array($result)){
            $idplayer=$row['id'];
            $nameplayer=$row['name'];
            $goldb=$AppConfig['plus']['packages'][$PgID]['gold'];

            $subject="???? ?? ??????";
            $sendsms="???? ??? ?? ?????? ????? ?? ? ????? $goldb ??? ?? ??????? ????? ????? .  ?? ???? ?? ??????? -  ????? ???? ?????? $Refnumber";
            $Codemaker=rand(10000,200000000);
            $goldenb=0;


            mysql_query("UPDATE p_players SET gold_num = gold_num + '$goldb',new_mail_count=new_mail_count+1,codemaker='$Codemaker',goldb='$goldenb' where id='$idplayer' ") or die(mysql_error());  
            mysql_query("INSERT INTO `p_msgs` (`from_player_id`, `to_player_id`, `from_player_name`, `to_player_name`, `msg_title`, `msg_body`, `creation_date`, `is_readed`, `delete_status`) VALUES( '$idadmin', '$idplayer', '$nameadmin', '$nameplayer', '$subject', '$sendsms', now(), 0, 0)");
        }   


    echo '<div style="color:green">
      ?????? ?? ?????? ??????? ?? ?????? ????? ??.
      <br />
        ????? ???? : '.$_POST['refnumber'].'
    <br/>
      <a href="http://'.$_SERVER['SERVER_NAME'].'">?????? ????</a></div>';
      exit();
}
else {
    echo '<div style="color:red">
      ????? ???? ???? ??? ???? . '.$Status.'
      <br />
        ????? ???? : '.$_POST['refnumber'].'
    <br/>
      <a href="http://'.$_SERVER['SERVER_NAME'].'">?????? ????</a></div>';
      exit();
}

    }
    if(isset($_POST['status'])){
    echo '<div style="color:red">
  ?????? ?? ?????? ??????? ??? ?? ????? ?????? ?????? ( ?????? ????? ) !
  <br />
  <a href="http://'.$_SERVER['SERVER_NAME'].'">?????? ???? </a></div>';
  exit();
    }

   echo '</body>
    </html>';
  ?>
Run Code Online (Sandbox Code Playgroud)

我正面临以下错误

致命错误:未捕获的SoapFault异常:[soap:Client]服务器无法读取请求.---> XML文档中存在错误(2,235).--->输入字符串格式不正确.在/home/travianx/public_html/ts1/parspal.php:53堆栈跟踪:#0 /home/travianx/public_html/ts1/parspal.php(53):SoapClient - > __ call('VerifyPayment',Array)#1/home/travianx/public_html/ts1/parspal.php(53):在第53行的/home/travianx/public_html/ts1/parspal.php中抛出的SoapClient-> VerifyPayment(数组)#2 {main}

我联系我的付款支持,他们说我必须提供访问权限:http://merchant.parspal.com/WebService.asmx?wsdl

而且我没有发现他们如何以及他们说了什么!请帮我!我有vps和cpanel安装在它上面

Sam*_*ook 8

您需要捕获您的Soap客户端错误,它们通常会返回更多格式:

try{
    $client = new SoapClient('http://merchant.parspal.com/WebService.asmx?wsdl');
    $res = $client->VerifyPayment(array("MerchantID" => $MerchantID , "Password" =>$Password , "Price" =>$Price,"RefNum" =>$Refnumber ));
}catch (SoapFault $e){
    print_r($client);
    // or other error handling
}
Run Code Online (Sandbox Code Playgroud)