尝试使用 phptoolkit 获取客户信息这是我的代码:
function getCustomer(){
$service = new NetSuiteService();
$request = new GetRequest();
$request->baseRef = new RecordRef();
$request->baseRef->account_id = "252206";
$request->baseRef->type = "customer";
$getResponse = $service->get($request);
if (!$getResponse->readResponse->status->isSuccess) {
echo "GET ERROR";
} else {
$customer = $getResponse->readResponse->record;
echo "GET SUCCESS, customer:";
echo "\nCompany name: ". $customer->companyName;
echo "\nInternal Id: ". $customer->internalId;
echo "\nEmail: ". $customer->email;
}
}
并得到这样的错误。
致命错误:未捕获的 SoapFault 异常:[soapenv:Server.userException] 无法确定 phptoolkit/NSPHPClient.php:338 中的客户 compid 堆栈跟踪:#0 phptoolkit/NSPHPClient.php(338):SoapClient->__soapCall('get', Array, NULL, Array) #1 phptoolkit/NetSuiteService.php(145953): NSPHPClient->makeSoapCall('get', Object(GetRequest)) #2 netsuite.php(23): NetSuiteService->get(Object(GetRequest)) #3