yii2:致命错误:未捕获SoapFault异常:[8]数组到字符串转换

时间:2018-05-14 08:24:06

标签: php soap yii yii2

这是我的客户肥皂api:

         $client = new SoapClient('http://sabapal.ir/sabapal/frontend/web/apit/PaymentRequest?WSDL', array('encoding' => 'UTF-8'));

        $result = $client->PaymentRequest(
                array(
                    'Amount' => 1000,
                )
        );

这是我的肥皂服务器:

    public function PaymentRequest($Amount)
{

    \Yii::$app->response->format = \yii\web\Response::FORMAT_XML;
    $xmlValues = ['test1' => 'value1', 'test2' => 'value2'];
      return $xmlValues;
}

我有这个错误:

Fatal error: Uncaught SoapFault exception: [8] Array to string conversion in /home/sefroweb/domains/sefroweb.com/public_html/wp-content/plugins/zarinpal-paid-downloads/zarinpalpaid-downloads.php:2890

我不想更改客户端soap api

我只想更改public function PaymentRequest

0 个答案:

没有答案