2012-01-02 11 views
5

eBay getorder APIを使用して注文リストを取得しましたが、今すぐ注文を選択してステータスを更新したいと考えています。apiを使用してeBayで注文状況を更新しますか?

どうすればいいですか?してください、助けていただければ幸いです

私はインターネットからいくつかのコードを使用しており、ステータスを変更すると "成功"と表示されます。しかし、注文リストを再度ロードすると、まだ「完全」です(または、APIで出荷された= falseを使用する場合)。

コード:

//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); 

これは動作するはずですあなた

+0

apiの完全な販売方法を試してみましたか? –

+0

こんにちは、私はcompletessaleメソッドを使用していただきありがとうございます:)私は支払いを注文ステータスを変更することができますbulk.Butで出荷されましたなぜ私はgetorderinapi orderstatusアクティブ=出荷や支払などに変更しないでください。 – ehsankayani

+0

最新のステータスを返します。あなたはcompletesaleに応答して幸せになっていますか? –

答えて

1

アクティブから完了までeBayの注文状況を変えるために、あなたは "ReviseCheckoutStatus" APIを呼び出すことができ、それは私のために働きました:)

関連する問題