使用nusoap客户端进行数组到字符串转换

时间:2015-10-31 17:17:00

标签: php nusoap

我向webservice发送了这样的请求:

 $transaction = new Transaction();
    $transaction->amount = $amount;
    $transaction->order_id = $orderId;
    $transaction->status = 0;
    $transaction->additional_data = $additionalData;
    $transaction->type = 1;
    $transaction->ip = Request::getClientIp();
    $transaction->save();
    $soap = new nusoap_client(self::$request_url);
    $fields = array(
        'terminalId' => self::$terminalId,
        'userName' => self::$username,
        'userPassword' => self::$password,
        'orderId' => $transaction->order_id,
        'amount' => $amount,
        'localDate' => date('Ymd'),
        'localTime' => date('His'),
        'additionalData' => $additionalData,
        'callBackUrl' => self::$callBackUrl,
        'payerId' => 0,
    );
    $response = $soap->call('bpPayRequest', $fields, 'http://interfaces.core.sw.bps.com/');

但我在2125中的nusoap.php行中遇到异常:

  

数组到字符串转换

抛出异常:

    // TODO: there is a PHP bug that can cause this to SEGV for CURLINFO_CONTENT_TYPE
    foreach(curl_getinfo($this->ch) as $k => $v){
        $err .= "$k: $v<br>";
    }
    $this->debug($err);

0 个答案:

没有答案