As the title states, we've set up message notifications according to the documentation. However, when a user sends a message, we don't receive a callback from eBay. What could be the cause?
I've confirmed that the callback link is accessible.
// The code is below.
@TEST
public void SetNotificationPreferencesCall()
throws Exception {
SetNotificationPreferencesCall api =
new SetNotificationPreferencesCall(getApiContext())
;
ApplicationDeliveryPreferencesType appPrefs =
new ApplicationDeliveryPreferencesType()
;
appPrefs.setApplicationEnable(EnableCodeType.
ENABLE)
;
appPrefs.setApplicationURL(
"https://dzdev.dezhuyun.cn/chat/api/v1/channel/ebay/msg/a")
;
appPrefs.setAlertEnable(EnableCodeType.
ENABLE)
;
api.setApplicationDeliveryPreferences(appPrefs)
;
NotificationEnableType notify1 =
new NotificationEnableType()
;
notify1.setEventType(NotificationEventTypeCodeType.
ASK_SELLER_QUESTION)
;
notify1.setEventEnable(EnableCodeType.
ENABLE)
;
NotificationEnableType notify2 =
new NotificationEnableType()
;
notify2.setEventType(NotificationEventTypeCodeType.
TOKEN_REVOCATION)
;
notify2.setEventEnable(EnableCodeType.
ENABLE)
;
NotificationEnableArrayType eventArray =
new NotificationEnableArrayType()
;
eventArray.setNotificationEnable(
new NotificationEnableType[]{ notify1
, notify2 })
;
api.setUserDeliveryPreferenceArray(eventArray)
;
// === 发送请求 ===
api.setNotificationPreferences()
;
System.
out.println(
"Response Ack: " + api.getResponseObject().getAck())
;
if (api.getResponseObject().getErrors() !=
null) {
for (ErrorType err : api.getResponseObject().getErrors()) {
System.
err.println(
"Error: " + err.getLongMessage())
;
}
}
}