5

eBay getorder API を使用して注文のリストを取得しましたが、注文を選択してステータスを更新したいと考えています。

どうやってやるの?お願いします、助けていただければ幸いです

私はインターネットからいくつかのコードを使用していますが、ステータスの変更で「成功」を示しています。しかし、注文リストを再度読み込むと (またはshipped=falseAPI で使用する場合)、まだ「完了」しています。

コード:

    //create the context
    ApiContext context = new ApiContext();

    //set the User token
    context.ApiCredential.eBayToken = "token";

    //set the server url
//    context.SoapApiServerUrl = "https://api.sandbox.ebay.com/wsapi";
    context.SoapApiServerUrl = "https://api.ebay.com/wsapi";


    //enable logging
    context.ApiLogManager = new ApiLogManager();
    context.ApiLogManager.ApiLoggerList.Add(new FileLogger("log.txt", true, true, true));
    context.ApiLogManager.EnableLogging = true;

    //set the version
    context.Version = "705";
    context.Site = SiteCodeType.UK;

    //Create the call and set the fields
    CompleteSaleCall apicall = new CompleteSaleCall(context);

    //Either ItemID-TransactionID or OrderLineItemID or OrderID is required. If item is part of an order, specify OrderID.
    apicall.OrderLineItemID = "123467585959-0";
    apicall.Shipped = true;

    //apicall.Shipment = new ShipmentType();
    //apicall.Shipment.ShipmentTrackingDetails = new ShipmentTrackingDetailsTypeCollection();

    //ShipmentTrackingDetailsType shpmnt = new ShipmentTrackingDetailsType();
    //shpmnt.ShipmentTrackingNumber = "VZ9478668";
    //shpmnt.ShippingCarrierUsed = "YourCarrier";

    //apicall.Shipment.ShipmentTrackingDetails.Add(shpmnt);

    //Specify time in GMT. This is an optional field
    //If you don't specify a value for the ShippedTime, it will be defaulted to the time at which the call was made
   // apicall.Shipment.ShippedTime = new DateTime(2011, 3, 5, 10, 0, 0).ToUniversalTime();

    //call the Execute method
    apicall.Execute();
    Console.WriteLine(apicall.ApiResponse.Ack);

ありがとうございました

4

2 に答える 2

4

これは動作するはずです: Trading AP Iでの CompleteSale

于 2012-02-24T00:08:36.040 に答える
1

eBay の注文ステータスをアクティブから完了に変更するには、「ReviseCheckoutStatus」API を呼び出すことができます。

于 2013-02-08T16:23:01.383 に答える