question

thegoodies4u avatar image
0 Likes"
thegoodies4u asked ·

eBay Platform Notifications Problems

Hi I am trying to connect to the eBay Platform notifications. I subscribed manually with with a live seller account and a sandbox seller account from the API Test Tool to the Feedback and the FixedPriceTransaction notifications. I received a "success" ack for both accounts. Currently, I am just trying to see if I get any response at the server. This is my php code: $file = fopen("ebay_notifications.log","a"); fwrite($file,"\n\n"); fwrite($file,"g: ".print_r($_GET,true)."\n"); fwrite($file,"p: ".print_r($_POST,true)."\n"); fwrite($file,"s: ".print_r($_SERVER,true)."\n"); $xml = file_get_contents('php://input'); $xmlData = simplexml_load_string($xml); fwrite($file,"xmlData: ".print_r($xmlData,true)."\n"); The live account does record a notification, but the xml body is empty. I don't get any response with the sandbox account. Could it be because I forgot to put this at the php file? header("HTTP/1.1 200 OK"); I would appreciate any help. Thanks
notifications
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.

1 Answer

· Write an Answer
thegoodies4u avatar image
0 Likes"
thegoodies4u answered ·
new info: The xml returns empty when using php://input. The following code does work: $payLoad = $GLOBALS["HTTP_RAW_POST_DATA"] ; fwrite($file,"xmlData: ".$payLoad."\n\n"); To convert the payload xml string to a xml object I used this code: $xml = simplexml_load_string(str_ireplace("soapenv:", "", $payLoad)); fwrite($file,"response_obj: ".print_r($xml,true)."\n\n"); the str_ireplace command is needed to allow reading the unusual envelope header. So now it is possible to get individual elements inside the xml, for example: $orderID = $xml->Body->GetFeedbackResponse->FeedbackDetailArray->FeedbackDetail->OrderLineItemID; This code works fine for feedback notifications from the sandbox. My question right now is why I am not getting ItemSold and FixedPriceTransaction notifications when in sandbox mode. GetNotificationPreferences shows that I am subscribed to both, and my server logs don't show any action when I perform a sandbox fixed price purchase. I would appreciate any help. Thanks
· Share
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.