2012-01-02 12 views
5

मुझे ईबे गेटऑर्डर एपीआई का उपयोग करके ऑर्डर की एक सूची मिलती है, लेकिन अब मैं एक ऑर्डर चुनना चाहता हूं और इसकी स्थिति अपडेट करना चाहता हूं।एपीआई का उपयोग कर eBay पर ऑर्डर स्थिति अपडेट करें?

मैं यह कैसे कर सकता हूं? कृपया, किसी भी मदद

सराहना होता जा रहा इंटरनेट से कुछ कोड का उपयोग कर रहा है, और यह स्थिति को बदलने पर "सफलता" को दर्शाता है। लेकिन जब मैं ऑर्डर सूची को फिर से लोड करता हूं तो यह अभी भी "पूर्ण" है (या यदि मैं एपीआई में शिप = झूठी का उपयोग करता हूं) अभी भी इसका "पूर्ण" है।

कोड:

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

आप की कोशिश की एपीआई के completeSale विधि है? –

+0

हाय हाँ, धन्यवाद मैं completessale विधि :)। मैं भुगतान आदेश की स्थिति को बदल सकते हैं का उपयोग कर ऐसा किया है, और भारी मात्रा में भेजा है.पर एक बात क्यों अभी भी जब मैं usingapi orderstatus getorder करता = सक्रिय? क्या इसे शिप या पेड इत्यादि में नहीं बदला जाना चाहिए? – ehsankayani

+0

इसे नवीनतम स्थिति वापस करनी चाहिए। क्या आप completesale के जवाब में निपुणता प्राप्त कर रहे हैं? –

उत्तर

1

यह काम करना चाहिए: CompleteSale in Trading AP मैं

+2

क्या डाउनवॉटर कृपया डाउनवोट का कारण दे सकता है? – zengr

1

पूरा आप कॉल कर सकते हैं "ReviseCheckoutStatus" एपीआई को सक्रिय से ईबे आदेश की स्थिति को बदलने के लिए, यह मेरे लिए काम किया :)

संबंधित मुद्दे