Otrzymuję listę zamówień za pomocą interfejsu API eBay getorder, ale teraz chcę wybrać zamówienie i zaktualizować jego status.Aktualizacja statusu zamówienia w serwisie eBay za pomocą api?
Jak mogę to zrobić? Proszę, każda pomoc byłaby doceniana.
Używam kodu z Internetu i pokazuje "sukces" w zmianie statusu. Ale kiedy ponownie ładuję listę zamówień, nadal jest ona "kompletna" (lub jeśli używam opcji przysłana = false w api), to nadal jest "kompletna".
Kod:
//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);
Dziękuję
wypróbowałeś kompletną metodę api? –
cześć tak, dziękuję zrobiłem to za pomocą metody completessale :). Mogę zmienić status zamówienia na płatny i teraz wysyłam luzem. Ale jedno, dlaczego nadal otrzymuję zamówienie za pomocą polecenia orderstatus = aktywne? czy nie powinna się zmienić na wysłane lub opłacone itp.? – ehsankayani
powinien zwrócić ostatni status. czy otrzymujesz nieuczciwość w odpowiedzi na kompletne? –