davidtsadler / ebay-sdk-php

An eBay SDK for PHP. Use the eBay API in your PHP projects.
Apache License 2.0
350 stars 342 forks source link

Shopping API version not recognized #175

Closed cosmopolit closed 6 years ago

cosmopolit commented 6 years ago

No matter what version i suggest in the service object, the response is everytime using the highest version (1045).

      $service = new Services\ShoppingService([
          'credentials' => $config['production']['credentials'],
          'sandbox'     => false,
          'siteId'      => $siteID,
          'apiVersion'  => '997'
      ]);

{"Timestamp":"2018-02-17T23:58:01.000Z","Ack":"Success","Build":"E1045_CORE_APILW_18610074_R1","Version":"1045","Item":{"BestOfferEnabled":false,"ItemID":"273065036827","EndTime":"2018-02-21T14:28:45.000Z","StartTime":"2018-02-11T14:28:45.000Z","ViewItemURLForNaturalSearch":"http:\/\/www.ebay.de\/itm\/Asf-Guzzi-Le-Mans1-2-SP-T-T3-NOS-sfiati-teste-originali-\/273065036827","ListingType":"Chinese","Location":"Italia","PaymentMethods":["DirectDebit","PayPal","CreditCard"],"GalleryURL":"http:\/\/thumbs4.ebaystatic.com\/pict\/2730650368278080_1.jpg","PictureURL":["https:\/\/i.ebayimg.com\/00\/s\/MTA4MFgxNjAw\/z\/yX8AAOSwLUpaVpVq\/$_57.JPG?set_id=8800005007","https:\/\/i.ebayimg.com\/00\/s\/MTA4MFgxNTk5\/z\/kHYAAOSwItJaVpV3\/$_57.JPG?set_id=8800005007"],"PrimaryCategoryID":"126575","PrimaryCategoryName":"Veicoli: ricambi e accessori:Moto d'epoca: ricambi:Moto Guzzi","Quantity":1,"Seller":{"UserID":"asfaltoaromatico","FeedbackRatingStar":"Turquoise","FeedbackScore":400,"PositiveFeedbackPercent":100},"BidCount":0,"ConvertedCurrentPrice":{"value":22,"currencyID":"EUR"},"CurrentPrice":{"value":22,"currencyID":"EUR"},"ListingStatus":"Active","QuantitySold":0,"ShipToLocations":["Americas","Asia","EuropeanUnion","AU"],"Site":"Italy","TimeLeft":"P3DT14H30M44S","Title":"Asf Guzzi Le Mans1 2 SP T T3 NOS sfiati teste originali","ShippingCostSummary":{"ShippingType":"Flat"},"ItemSpecifics":{"NameValueList":[{"Name":"Tipo di restituzioni accettate","Value":["ReturnsNotAccepted"]}]},"HitCount":-1,"PrimaryCategoryIDPath":"131090:32098:126575","Country":"IT","ReturnPolicy":{"ReturnsAccepted":"ReturnsNotAccepted"},"MinimumToBid":{"value":22,"currencyID":"EUR"},"AutoPay":false,"IntegratedMerchantCreditCardEnabled":false,"HandlingTime":3,"ConditionID":1500,"ConditionDisplayName":"Nuovo: altro (vedi dettagli)","GlobalShipping":false,"ConditionDescription":"NOS nuovo d'epoca","QuantitySoldByPickupInStore":0}}

davidtsadler commented 6 years ago

The version number is to let eBay know which version of the schema you are sending in the request. This is so that eBay can validate that you are sending the correct fields. I.e It prevents you from accidentally sending a field that is not available until a later version, or prevents you from sending a field that was removed several versions ago.

The response as far as I know always returns the latest version, independently of your version. To be honest I've never used the version in the response.

There is more information at https://developer.ebay.com/DevZone/XML/docs/HowTo/eBayWS/eBaySchemaVersioning.html