question

davidtsadler avatar image
1 Like"
davidtsadler asked ·

New PHP SDK available.

If anyone is interested in trying a new PHP SDK, and you are comfortable with using [Composer]( http://getcomposer.org/), I have just released the following, - [Finding]( https://github.com/davidtsadler/ebay-sdk-finding) - [Trading]( https://github.com/davidtsadler/ebay-sdk-trading) - [Shoppping]( https://github.com/davidtsadler/ebay-sdk-shopping) i should point out that these projects are early releases and may not be quite suitable for production code just yet, but they do support all operations available in the API. I'm currently working on writing more examples and documentation so that people can see what the SDKs have to offer. Hopefully what I have done so far will be of help to someone and if there is any feedback it will be welcomed in the comments below. A very simple example of what can be done with the [Finding]( https://github.com/davidtsadler/ebay-sdk-finding) SDK. , 'globalId' => GlobalIds::US )); // Create the API request object. $request = new FindItemsByKeywordsRequest(); $request->keywords = 'Harry Potter'; // Ask for the first 25 items. $request->paginationInput = new PaginationInput(); $request->paginationInput->entriesPerPage = 25; $request->paginationInput->pageNumber = 1; // Filter results to just fixed price items that are no more than $10. $filter = new ItemFilter(); $filter->name = 'ListingType'; $filter->value[] = 'FixedPrice'; $request->itemFilter[] = $filter; $filter = new ItemFilter(); $filter->name = 'MaxPrice'; $filter->value[] = '10.00'; $request->itemFilter[] = $filter; // Sort results from high to low price. $request->sortOrder = 'CurrentPriceHighest'; // Send the request. $response = $service->findItemsByKeywords($request); // Output the response from the API. foreach ($response->searchResult->item as $item) { printf("(%s) %s : %.2f\n", $item->itemId, $item->title, $item->sellingStatus->currentPrice->value); } This is very simple example of what can be done with the [Trading]( https://github.com/davidtsadler/ebay-sdk-trading) SDK. 859, 'siteId' => SiteIds::US )); // Create the API request object. $request = new GeteBayOfficialTimeRequestType(); $request->requesterCredentials = new CustomSecurityHeaderType(); $request->requesterCredentials->eBayAuthToken = ; // Send the request. $response = $service->geteBayOfficialTime($request); // Output the response from the API. echo 'eBay time is: '.$response->timestamp->format('H:i (\G\M\T) \o\n l jS Y')."\n";
PHPsdkresources
· 1
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

i am really happy to see that someone is doing a new SDK, i really believe that the ebatNS (from intradesys) is going to die in the next future.. they even don´t care about emails....
0 Likes 0 ·
$$anonymous$$ avatar image
0 Likes"
$$anonymous$$ answered ·
Good day sir, is there any way you can show an example on using GetMyMessage with this SDK? :)
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

davidtsadler avatar image
1 Like"
davidtsadler answered ·
The following has been adapted from the samples shown in the [documentation for GetMyMessages][1]. It makes two requests to the API: 1. Retrieves the message headers in order to get the message ids. 2. Use the message ids to get the message bodies. The example works but in no way should it be considered ideal for production code. 863, 'siteId' => Constants\SiteIds::US )); $request = new Types\GetMyMessagesRequestType(); $request->requesterCredentials = new Types\CustomSecurityHeaderType(); $request->requesterCredentials->eBayAuthToken = 'YOUR_AUTH_TOKEN'; $request->detailLevel = array('ReturnHeaders'); $response = $service->getMyMessages($request); if ($response->ack === 'Failure') { foreach ($response->errors as $error) { printf("Error: %s\n", $error->shortMessage); } } else { $messageIds = array(); foreach ($response->messages->message as $message) { $messageIds[] = $message->messageId; } $request->messageIdS = new Types\MyMessagesMessageIDArrayType(); $request->messageIdS->messageId = $messageIds; $request->detailLevel = array('ReturnMessages'); $response = $service->getMyMessages($request); if ($response->ack === 'Failure') { foreach ($response->errors as $error) { printf("Error: %s\n", $error->shortMessage); } } else { foreach ($response->messages->message as $message) { printf("Sender: %s : Subject: %s\n%s\n", $message->sender, $message->subject, $message->text); } } } [1]: http://developer.ebay.com/DevZone/XML/docs/Reference/eBay/GetMyMessages.html#Samples
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

franhuan6 avatar image
0 Likes"
franhuan6 answered ·
Hi David, Thank you very much for your eBay PHP SDK. I go through all the examples in the package, in trading API, do you have any example on 'VerifyAddItem' ? If it's possible to give out a simple example on how to use "VerifyAddItem" service. I think 'VerifyAddItem' is quiet important in the production environment, coz the seller need to know how much fee they need to pay for list the item. Thank you very much for your effort on eBay PHP SDK. Much appreciates on the up coming example.
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

mrniks12 avatar image
0 Likes"
mrniks12 answered ·
Thank you very much for your eBay PHP SDK. I go through all the examples in the package, in trading API, do you have any example on 'VerifyAddItem' ? testThank you very much for your eBay PHP SDK. I go through all the examples in the package, in trading API, do you have any example on 'VerifyAddItem' ? testThank you very much for your eBay PHP SDK. I go through all the examples in the package, in trading API, do you have any example on 'VerifyAddItem' ? test
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

mrniks12 avatar image
0 Likes"
mrniks12 answered ·
Thank you very much for your eBay PHP SDK. I go through all the examples in the package, in trading API, do you have any example on 'VerifyAddItem' ? testThank you very much for your eBay PHP SDK. I go through all the examples in the package, in trading API, do you have any example on 'VerifyAddItem' ? testThank you very much for your eBay PHP SDK. I go through all the examples in the package, in trading API, do you have any example on 'VerifyAddItem' ? test
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

davidtsadler avatar image
1 Like"
davidtsadler answered ·
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

franhuan6 avatar image
0 Likes"
franhuan6 answered ·
Hi David, Thank you so much for your example on the "VerifyAddFixed PriceItem". I will download it right now. Really appreciates for your effort.
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

franhuan6 avatar image
0 Likes"
franhuan6 answered ·
Good Day Dave, Thank you very much for the "VerifyFixedPriceItem" on the last post, it works perfectly in my program. Just wondering is there a method can be call in the SDK to display the raw request XML string ? Thank you for your time,Good Day Dave, Thank you very much for the 'VerifyAddFixedPriceItem' in last post, it works perfect in my program. Just wondering, if there a method to call to display the raw request xml string ? Thank you very much,
· 1
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

You can use the following to get a string of the XML request. echo $request->toRequestXml();
0 Likes 0 ·
franhuan6 avatar image
0 Likes"
franhuan6 answered ·
Thank you very much Dave !!!
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1001jouetsfr avatar image
0 Likes"
1001jouetsfr answered ·
@davidtsadler, thanks for this work.
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.