这是我的客户肥皂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