Skip to content

Instantly share code, notes, and snippets.

@ali-cedcoss
Created April 22, 2022 17:15
Show Gist options
  • Save ali-cedcoss/89958ffcefbc9a04e048f883cfd16c7d to your computer and use it in GitHub Desktop.
Save ali-cedcoss/89958ffcefbc9a04e048f883cfd16c7d to your computer and use it in GitHub Desktop.
set notification xml for sending notifications to multiple URLs
$main_xml = '<?xml version="1.0" encoding="utf-8"?>
		<SetNotificationPreferencesRequest xmlns="urn:ebay:apis:eBLBaseComponents">
		  <RequesterCredentials>
			<eBayAuthToken>'.$token.'</eBayAuthToken>
		  </RequesterCredentials>
		  <ApplicationDeliveryPreferences>
			<AlertEmail>mailto://alirizvi@cedcommerce.com</AlertEmail>
			<AlertEnable>Enable</AlertEnable>
			<ApplicationEnable>Enable</ApplicationEnable>
			<ApplicationURL>https://cedcommerce.com</ApplicationURL>
			<DeviceType>Platform</DeviceType>
			<PayloadVersion>1173</PayloadVersion>
			<DeliveryURLDetails>
			<DeliveryURL>https://wwe.fitermansports.com/wp-admin/admin-ajax.php?action=ced_ebay_notification_endpoint</DeliveryURL>
			<DeliveryURLName>danny_ebay_wwe</DeliveryURLName>
		  </DeliveryURLDetails>
		  <DeliveryURLDetails>
			<DeliveryURL>https://fitermansports.wpengine.com/wp-admin/admin-ajax.php?action=ced_ebay_notification_endpoint</DeliveryURL>
			<DeliveryURLName>danny_ebay_main</DeliveryURLName>
		  </DeliveryURLDetails>
		  </ApplicationDeliveryPreferences>
		  <DeliveryURLName>danny_ebay_wwe,danny_ebay_main</DeliveryURLName>
		  <UserDeliveryPreferenceArray>
			<NotificationEnable>
			  <EventType>ItemListed</EventType>
			  <EventEnable>Enable</EventEnable>
			</NotificationEnable>
			<NotificationEnable>
			  <EventType>ItemClosed</EventType>
			  <EventEnable>Enable</EventEnable>
			</NotificationEnable>
			<NotificationEnable>
			  <EventType>ItemRevised</EventType>
			  <EventEnable>Enable</EventEnable>
			</NotificationEnable>
		  </UserDeliveryPreferenceArray>
		</SetNotificationPreferencesRequest>';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment