Can someone help with this ebay API ...it a script with many files ... my concern is it does not seem to be passing the campaign_id to the ebay partner network ... my profile look is zero... ????? So I am not getting crediit for it ???? I guess... what more do I have to provide to get help _________________________________________ new file // eBay Info (developers.ebay.com) $config['ebay']['rest_token'] = '6334568^*&*bnb7anY%2FpGnkmGdkL8%3D'; $config['ebay']['user_id'] = 'bob'; // https://developer.ebay.com/devzone/account/ $config['ebay']['total_items'] = 50; $config['ebay']['campaign_id'] = '123400874633'; // eBay Partner's netwotk campaign ID $config['ebay']['sale_id'] = ''; // tracking id $config['ebay']['aff_network'] = 9; // eBay Partner's netwotk $config['ebay']['site_id'] = 1; // US $config['ebay']['api_version'] = '497'; _________________________________________ new file function do_ebay($query) { global $config; // date & time $date = date(U); // format date for calculation in seconds $time_adjust = ($config['hour_diff'] * 60 * 60); //this is how to calc it $adj_time_left = date("Y-m-d", $date + $time_adjust); //format display $adj_time_right = date("H:m:s", $date + $time_adjust); //format display $end_time_from = "&end_time_from=" . $adj_time_left . "T" . $adj_time_right . ".000Z";//2008-07-05T21:20:27.000Z"; // prepare query $query = urlencode($query); $api_url = 'http://rest.api.ebay.com/restapi?CallName=GetSearchResults&RequestToken='.$config['ebay']['rest_token'].'&RequestUserId='.$config['ebay']['user_id'].'&SiteId='.$config['ebay']['site_id'].'&Version='.$config['ebay']['api_version'].'&Query='.$query.'&EntriesPerPage='.$config['ebay']['total_items'].'&PageNumber=1&UnifiedInput=1'.$end_time_from.'&trackingpartnercode='.$config['ebay']['aff_network'].'&trackingid='.$config['ebay']['cj_publisher_id'].'&affiliateuserid='.$config['ebay']['cj_sid']; // curl session $curl = curl_init(); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_URL, $api_url); $ebay_data = curl_exec($curl); curl_close($curl); // read returned xml $ebay_xml = new SimpleXMLElement($ebay_data); $list = '<dl id="ebay_items">'; // build the items list if ($ebay_xml->SearchResultItemArray->SearchResultItem) { // parse the xml and and build links foreach ($ebay_xml->SearchResultItemArray->SearchResultItem as $searchitem) { $link = $searchitem->Item->ListingDetails->ViewItemURL . '&pid='.$config['ebay']['cj_publisher_id'].'&aid='.$config['ebay']['cj_sid']; $title = $searchitem->Item->Title; $pic = $searchitem->Item->PictureDetails->GalleryURL; if (empty($pic)) { $list .= '<dt><img src="pic.gif" alt="" /></dt>'; } else { $list .= '<dt><img src="'.$pic.'" alt="" /></dt>'; } $list .= '<dd><a href="'.$link.'">'.ucwords(strtolower($title)).'</a></dd>'; $list .= '<dd class="clear"></dd>' ."\n"; } } $list .= '</dl>'; return $list; } _____________________________________________________
I am not sure what I am missing. However as the site is running it is not passing details to ebay see example: http://gizbuilder.com/test2/ thanks for your help. can you look at the site? I paid a lot of money for the site/code
you're not sending your campaign id to the api. from what i can see anyways.. im currently working with the ebay api myself however i'm using rss.ebay.com instead of rest.ebay.com but i send my campaign id as afepn=CAMPAIGN_ID in the url. dunno if this will help or not but it's what i do.
webboy, where? ...what line William[ws] ...where?/ echo $api_url; and make sure all values are correct
right after add exit(); after the echo command and see whats your output $api_url = 'http://rest.api.ebay.com/restapi?CallName=GetSearchResults&RequestToken='.$config['ebay']['rest_token'].'&RequestUserId='.$config['ebay']['user_id'].'&SiteId='.$config['ebay']['site_id'].'&Version='.$config['ebay']['api_version'].'&Query='.$query.'&EntriesPerPage='.$config['ebay']['total_items'].'&PageNumber=1&UnifiedInput=1'.$end_time_from.'&trackingpartnercode='.$config['ebay']['aff_network'].'&trackingid='.$config['ebay']['cj_publisher_id'].'&affiliateuserid='.$config['ebay']['cj_sid']; Code (markup):
again, the only time that the campaign id is used (in the code that you showed us) is in the settings where $config['ebay']['campaign_id'] is set.