English 中文(简体)
e 《亚普森报》呼吁获得所有销售物品
原标题:eBay API call to get all sold articles
  • 时间:2011-09-03 12:57:55
  •  标签:
  • php
  • ebay-api

I m reading a little bit about the eBay API, but I can t find anything about getting a list with all "open and finished articles" that I am selling.

Is it in the buying API or trading? Could someone help me a little bit where to look? Or some lines of code?

我附在后面。

$request = "<?xml version= 1.0  encoding= iso-8859-1 ?><request>"
   . "<RequestUserId>" . $EBAY_UID . "</RequestUserId>"
   . "<RequestPassword>" . $EBAY_PWD . "</RequestPassword>"
   . "<ErrorLevel>0</ErrorLevel>"
   . "<DetailLevel>0</DetailLevel>"
   . "<SiteId>0</SiteId>"
   . "<Verb>GeteBayOfficialTime</Verb></request>";

$headers[] = "X-EBAY-API-COMPATIBILITY-LEVEL: 305";
$headers[] = "X-EBAY-API-SESSION-CERTIFICATE: ".DEVID.";".APPID.";".CERTID;
$headers[] = "X-EBAY-API-DEV-NAME: ".DEVID;
$headers[] = "X-EBAY-API-APP-NAME: ".APPID;
$headers[] = "X-EBAY-API-CERT-NAME: ".CERTID;
$headers[] = "X-EBAY-API-CALL-NAME: GeteBayOfficialTime";
$headers[] = "X-EBAY-API-SITEID: 0";
$headers[] = "X-EBAY-API-DETAIL-LEVEL: 0";
$headers[] = "Content-Type: text/xml";
$headers[] = "Content-Length: " . strlen($request);

var_dump($header);

$curl = curl_init("https://api.sandbox.ebay.com/ws/api.dll");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_POSTFIELDS, $request);
$result = curl_exec($curl);

to get the eBay time but now I want to get a list with details like my product x was paid on the xx and I received the money on the xx and the price is xx and the person who got the article is called...

最佳回答

详细了解你在eBay出售的物品:

你们需要获得,Trading rel=“nofollow”get(Orders)

问题回答

它进行了大量阅读......和定稿。

Yes I use Trading API. If you use eBay Acellerator Toolkit for PHP, in documentation there was an example for GetSellerTransactions - which returns a list of all items for selling with additional info for statuses and etc.

echo "<pre>";
print_r("begin");


require_once  ../EbatNs/EbatNs_ServiceProxy.php ;
require_once  ../EbatNs/EbatNs_Logger.php ;
require_once  ../EbatNs/GetSellerTransactionsRequestType.php ;
require_once  ../EbatNs/GetSellerTransactionsResponseType.php ;
$session = new EbatNs_Session( config/ebay.config.php );
$cs = new EbatNs_ServiceProxy($session);

//$cs->attachLogger(new EbatNs_Logger(true));
$req = new GetSellerTransactionsRequestType();
$now = time();
$start = $now - (3600 * 24 * 30);
$end = $start + (3600 * 24 * 30);
// period 60 days
$req->ModTimeFrom = gmdate( Y-m-d H:i:s , $start);
$req->ModTimeTo = gmdate( Y-m-d H:i:s , $end);
$req->DetailLevel = $Facet_DetailLevelCodeType->ReturnAll;

//#type $res GetSellerTransactionsResponseType
$res = $cs->GetSellerTransactions($req);
if ($res->Ack == $Facet_AckCodeType->Success)
{
echo "<pre>";
print_r($res);
} else
{
echo "<pre>failure:";
print_r($res);

}




相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签