I tried to use the accelerator kit to get all sold items from ebay. - The challange is to create a full automated invoice system for my shop.
[code]
$cs = new EbatNs_ServiceProxy($session);
$logger = new EbatNs_Logger(true);
$logger->_debugXmlBeautify = false;
$logger->_debugSecureLogging = true;
$cs->attachLogger($logger);
$cs->setTransportOptions(array("HTTP_VERBOSE" => true) );
echo $session->getLogFilename();
echo "logger ready";
// Set the Request type
//#type $req GetSellerListRequestType
$req = new GetSellerListRequestType();
// Set Detail Level
$req->setDetailLevel($Facet_DetailLevelCodeType->ReturnAll);
// Set the Start Time and End Time Filter
$req->setUserID('3Bleuchtmittel');
$req->setStartTimeFrom('2012-01-01 00:00:00');
$req->setDetailLevel($Facet_DetailLevelCodeType->ReturnAll);
$req->setErrorLanguage('de_DE');
$req->setWarningLevel("High");
//$req->StartTimeFrom = gmdate('Y-m-d H:i:s', time() - 60 * 60 * 24 * 15);
//$req->StartTimeTo = gmdate('Y-m-d H:i:s');
echo "filter set";
// Set the Pagination
$pag = new PaginationType();
$pag->setEntriesPerPage(10);
$pag->setPageNumber(1);
$req->setPagination($pag);
echo "pagenation set";
// Make the Call
$res = $cs->GetSellerList($req);
if ($res->getAck() != $Facet_AckCodeType->Success)
[/code]
But all get is some raw (compressed?) Data.
"ResponseRaw :
2†ù´}
£Í[‡ö?sbÑ “ЏUCÆ£ôÝ_rG<ÛÝW‘¼ k'둯IEå@±.GLM"
and a PHP error Message:
"Fatal error: Call to a member function getAck() on a non-object in"
What is with my code?
Appears EbatNS won't pull from the sandbox file. Rather have to set your sandbox credentials within ebay.config instead.
For the record: This is a good PHP5 OOP SOAP eBay API interface...but the gotcha is you have to fix some depreciated things. I've been working with this EbatNS for over a month. I was about to give up on it yesterday with EbatNS and go back to figuring out the XML. But I kept thinking it would be great to get this going as it appears to be working for other people and has most if not all the eBay calls. Anyway, I was up until 3am, but finally got this baby figured out so it's working!! Yahooo!
How to fix this error with the getAck() as described below?
Running WAMP on Windows 7 64/32 bit OS
Running PHP 5.2.2
Plan to run this in YII PHP Framework after I get this figured out.
***EbatNS eBay API for PHP***
http://localhost/EbatNS/samples/sample_GeteBayOfficialTime.php
Fatal error: Call to a member function getAck() on a non-object in C:\wamp\www\EbatNS\EbatNs_Environment.php on line 67
Kind Regards,
Jeff