Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?PHP
2
/**
3
 * example that adds a shipment
4
 *
5
 * $Id: example_AddShipment.php,v 1.1 2004/10/28 17:14:53 schst Exp $
6
 *
7
 * @package     Services_Ebay
8
 * @subpackage  Examples
9
 * @author      Stephan Schmidt
10
 */
11
error_reporting(E_ALL);
12
require_once '../Ebay.php';
13
require_once 'config.php';
14
 
15
$session = Services_Ebay::getSession($devId, $appId, $certId);
16
$session->setToken($token);
17
$ebay = new Services_Ebay($session);
18
 
19
$shipment = Services_Ebay::loadModel('Shipment');
20
 
21
$shipment->InsuredValue = 400;
22
$shipment->PayPalShipmentId = '12345678';
23
$shipment->PostageTotal = 3;
24
$shipment->PrintedTime = date('Y-m-d H:i:s');
25
 
26
$shipment->ShippingServiceUsed = 3;
27
 
28
$shipment->ShippingPackage = 0;
29
$shipment->setPackageDimensions(10, 5, 8);
30
 
31
$shipment->ShipmentTrackNumber = uniqid('shipment');
32
 
33
$shipment->SetFromAddress('Foobar', 'Clark Kent', 'Any Street 123', null, 'San Francisco', '94101', 'CA', 'USA');
34
$shipment->SetAddress(2, 'Foobar', 'Clark Kent', 'Any Street 456', null, 'San Francisco', '94101', 'CA', 'USA');
35
 
36
$shipment->AddTransaction(4501333179, 0);
37
 
38
$shipment->InsuredValue = '450.00';
39
$shipment->ShippingCarrierUsed = 1;
40
$shipment->WeightMajor = 2;
41
$shipment->WeightMinor = 0;
42
$shipment->WeightUnit = 1;
43
 
44
$session->debug = 2;
45
 
46
$ebay->AddShipment($shipment);
47
?>