I am trying to call all the customer info after placing an order and insert all these info into a database. All the parameters are passing ok beside getStreet() which ends up as array into database, Just the word array is inserted into database.
Here is my code:
$client = new SoapClient('http://xxxxxxxxxx', array("connection_timeout"=>120));
$aWebOrder->CustomerAddress = new CustomerAddress;
$aWebOrder->CustomerAddress->Email = $order->getCustomerEmail();
$aWebOrder->CustomerAddress->Address1 = $order->getBillingAddress()->getStreet();
$aWebOrder->CustomerAddress->City = $order->getBillingAddress()->getCity();
$aWebOrder->CustomerAddress->State = $order->getBillingAddress()->getRegion();
$aWebOrder->CustomerAddress->PostalCode = $order->getBillingAddress()->getPostcode();
$aWebOrder->CustomerAddress->CountryID = $order->getBillingAddress()->getCountry();
$params = array(
'OrderWebAPILogin' => array("login" => 'xxx', "password"=> 'xxx'),
'DbVersion' => 16,
'Order' => $aWebOrder,
'RequestOptions' => NULL
);
$result = $client->addOrder($params);
The error i get into the log file is :
Array to string conversion in C:\xampp\htdocs\xxx\app\code\local\InsertOrder\OrderExport\Model\Export.php on line 215
The line 215 is this line:
$result = $client->addOrder($params);