Skip to main content
Published: April 13 2008, 11:55:00 PMUpdated: August 05 2022, 11:22:31 AM

Details on how to troubleshoot the PHP 5 notification sample code.

To verify that you're subscribed to the proper events, it's  best to look at your NotificationPreferences on a user-level basis, so change this line in GetNotificationPreferences.php : 
      $params = array('Version' => 1193, 'PreferenceLevel' => 'User');
to add the PreferenceLevel of User

Then you should get something like this :

stdClass Object (
[Timestamp] => 2022-08-05T18:08:15.396Z
[Ack] => Success
[Version] => 1193
[UserDeliveryPreferenceArray] => stdClass Object (
[NotificationEnable] => Array (
[0] => stdClass Object (
[EventType] => EndOfAuction
[EventEnable] => Enable )
[1] => stdClass Object (
[EventType] => ItemRevised            <<----  Subscribe to ItemRevised
[EventEnable] => Enable )
[2] => stdClass Object (
[EventType] => CustomCode
[EventEnable] => Enable ) ) ) )

You may not be able to use the debugging "error_log()" messages in the original sample code because you may not have access to your server error log.  To get debugging information in this case, where needed, change the error_log statements to log to an accessible file rather than the Apache error log :

  error_log("This writes to a file", 3, "/var/tmp/my-errors.log");

Also, in eBaySOAP.php, class eBayPlatformNotifications, set debug to be true by default, at least for now :
       public function __construct(eBaySession $session, $debug = true) {

For example, to the ItemRevised event.  You then will get output like this in your error log :

[Tue Aug 05 18:04:15 2022] [error]  eBayPlatformNotificationListener: ItemRevised - ItemID : 110030062203

[Tue Aug 05 18:04:15 2022] [error]

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="" xmlns:xsd="" xmlns:xsi="">
  <ebl:RequesterCredentials soapenv:mustUnderstand="0" xmlns:ns="urn:ebay:apis:eBLBaseComponents" xmlns:ebl="urn:ebay:apis:eBLBaseComponents">
   <ebl:NotificationSignature xmlns:ebl="urn:ebay:apis:eBLBaseComponents">2LoZdKnWgizobDsrTo9Ujw==</ebl:NotificationSignature>
  <GetItemResponse xmlns="urn:ebay:apis:eBLBaseComponents">
    <BuyItNowPrice currencyID="USD">0.0</BuyItNowPrice>



[Tue Aug 05 18:04:15 2022] [error] eBayPlatformNotificationListener: ItemRevised - ItemID : 110030062203

Note the first line comes from the "carp" method (modified to add a little more info).  The next entry is the actual SOAP body for a GetItem coming back.  This will have to be parsed to get the specific information you're looking for.  Finally comes a line with more output from the "carp" method.

So recommendations for troubleshooting the PHP 5 sample notification code are :

  • Modify GetNotificationPreferences.php so you can get user-level information on the events you're subscribed to.  Send this to me as needed.
  • Modify the error_log messages so you send output to an accessible file
  • Modify the carp and other debug methods so you can better see what's going on.
  • You may want to use the API Test Tool  to send in raw XML requests like Set/GetNotificationPreferences


How well did this answer your question?
Answers others found helpful