| 1 |
lars |
1 |
<?PHP
|
|
|
2 |
/**
|
|
|
3 |
* example that fetches shipping rates
|
|
|
4 |
*
|
|
|
5 |
* $Id: example_AddOrder.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 |
|
|
|
17 |
$session->setToken($token);
|
|
|
18 |
|
|
|
19 |
$ebay = new Services_Ebay($session);
|
|
|
20 |
|
|
|
21 |
$order = Services_Ebay::loadModel('Order');
|
|
|
22 |
|
|
|
23 |
$order->Currency = 1;
|
|
|
24 |
$order->CreatedBy = 2;
|
|
|
25 |
$order->Total = '60.0';
|
|
|
26 |
|
|
|
27 |
$order->AddTransaction('4501333765', 0);
|
|
|
28 |
$order->AddTransaction('4501336808', 0);
|
|
|
29 |
$order->AddShippingServiceOption(1, '40.0', 1);
|
|
|
30 |
|
|
|
31 |
$order->AcceptPaymentTerms('CCAccepted', 'PaymentOther');
|
|
|
32 |
$order->AcceptPaymentTerms('PayPalAccepted', 'VisaMaster');
|
|
|
33 |
|
|
|
34 |
$result = $ebay->AddOrder($order);
|
|
|
35 |
?>
|