question

wheldot avatar image
0 Likes"
wheldot asked ·

I don't understand SetNotificationPreferences

I'm very new to API's so this is a bit over my head, but so far I've download the eBay API and I've playing around with the SetNotificationPreferences.php I've ran this line of code: $params = array('Version' => 525, 'ApplicationDeliveryPreferences' => array( 'ApplicationURL' => ' http://www.example.com/ebay/notifications/listener.php' ) ); $results = $client->SetNotificationPreferences($params); print_r($results); And this works fine, I can see in the control panel on ebay its updated with my example url. What I want is to set up just 2 notifications - Every time a new item is listed on my store - Every time a item is sold on my store I assume I need to add more to this array that im sending, but after hours of searching I can't see how to do it. I've seen lots of XML examples , but I don't understand how I can bolt that on to my above code. Isn't there something as simple as: $params = array('Version' => 525, 'ApplicationDeliveryPreferences' => array( 'ApplicationURL' => ' http://www.trachtenberg.com/ebay/notifications/listener.php', 'newItemListend' => true, 'itemSold' => true ) );
soapsetnotificationpreferences
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.

eva3636 avatar image
0 Likes"
eva3636 answered ·
Hey fella, Try this: $params = array('Version' => 525, 'ApplicationDeliveryPreferences' => array( 'ApplicationURL' => ' http://www.trachtenberg.com/ebay/notifications/listener.php', 'ApplicationEnable' => 'Enable' ), 'UserDeliveryPreferenceArray' => array( array( 'NotificationEnable' => array( 'EventType' => 'ItemListed', 'EventEnable' => 'Enable' ) ), array( 'NotificationEnable' => array( 'EventType' => 'ItemSold', 'EventEnable' => 'Enable' ) ) ) );
· 2 · 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.

This is exactly what I needed! Thank you very much sir!
0 Likes 0 · ·
No probs! Let me know how you get on as I've not been able to get a notification sent via the sandbox - even though the configuration all looks hunky dory.
0 Likes 0 · ·
appsarsokul avatar image
0 Likes"
appsarsokul answered ·
· 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.