Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?PHP
2
/**
3
 * Test-script for bug 4296
4
 *
5
 * $Id: bug4296.php,v 1.1 2005/06/05 13:28:39 schst Exp $
6
 *
7
 * @package     Services_Ebay
8
 * @subpackage  Tests
9
 * @author      Stephan Schmidt
10
 */
11
 
12
error_reporting(E_ALL);
13
require_once '../Ebay.php';
14
require_once '../examples/config-local.php';
15
 
16
$session = Services_Ebay::getSession($devId, $appId, $certId);
17
$session->setToken($token);
18
 
19
$session->setDebug(Services_Ebay_Session::DEBUG_PRINT);
20
 
21
$ebay = new Services_Ebay($session);
22
 
23
$item = Services_Ebay::loadModel('Item', null, $session);
24
$item->Category = 57882;
25
$item->Title = 'International Item';
26
$item->Description = 'This description contains Umlaut characters like Ä, ü and ß';
27
$item->Location = 'At my home';
28
$item->MinimumBid = '532.0';
29
 
30
$item->VisaMaster = 1;
31
 
32
$item->ShippingType = 1;
33
$item->CheckoutDetailsSpecified = 1;
34
 
35
$item->Country = 'US';
36
 
37
$item->SetShipToLocations(array('US', 'DE', 'GB'));
38
 
39
$item->addShippingServiceOption(1, 1, 3, 1, array('US'));
40
 
41
$result = $ebay->AddItem($item);
42
 
43
// You could as well call the Add() method on the item directly
44
//$result = $item->Add();
45
 
46
 
47
if ($result === true) {
48
    echo 'Item has been added with ItemId: '.$item->Id.' and ends on '.$item->EndTime.'<br />';
49
} else {
50
    echo 'An error occured while adding the item.';
51
}
52
?>