40 public function sendRequest($callName, $data, $devId =
"", $apiAppId =
"", $certId =
"")
45 $this->http->setHeader(
"X-EBAY-API-CALL-NAME", $callName);
48 $this->http->setHeader(
"X-EBAY-API-DEV-NAME", $devId);
51 $this->http->setHeader(
"X-EBAY-API-APP-NAME", $apiAppId);
54 $this->http->setHeader(
"X-EBAY-API-CERT-NAME", $certId);
57 if(mb_strtolower(SITE_CHARSET) !=
'utf-8')
58 $data = Encoding::convertEncodingArray($data, SITE_CHARSET,
'UTF-8');
60 $result = @$this->http->post($this->apiUrl, $data);
61 $errors = $this->http->getError();
63 if (!$result && !empty($errors))
67 foreach($errors as $errorCode => $errMes)
68 $strError .= $errorCode.
": ".$errMes;
74 $status = $this->http->getStatus();