2012-01-02 10 views
5

eBay getorder API kullanarak siparişlerin bir listesini alıyorum, ancak şimdi bir sipariş seçmek ve durumunu güncellemek istiyorum.API ile eBay'da sipariş durumunu güncelle?

Bunu nasıl yapabilirim? Lütfen, herhangi bir yardım için teşekkür ederiz

İnternet'ten bazı kodları kullanıyorum ve durumu değiştirirken "başarı" gösteriyorum. Ancak sipariş listesini tekrar yüklediğimde yine de "tamam" (ya da api içinde false = false kullanıyorsa) hala "tamamlandı".

Kodu:

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

teşekkür ederiz

+0

api'nin fullSale yöntemini denediniz mi? –

+0

merhaba evet, ben completessale yöntemini kullanarak yaptım :).Ödeme durumunu değiştirmek için ödenmiş ve şimdi toplu olarak sevk edilebilir.Ama bir şey useapi usingapi hala aktif iken hala neden bir şey? sevk edilen veya ödenen vb. değişmemeli mi? – ehsankayani

+0

en son durumu döndürmelidir. tamamlanmış birime cevap olarak cesaret mi alıyorsun? –

cevap

1

Arayabileceğin tamamlandı "ReviseCheckoutStatus" API aktif ebay sipariş durumunu değiştirmek için, benim için çalıştı :)