-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NotificationFilterUrlMonetaryAccount create responds with incorrect data, doesn't match spec, create fails #184
Comments
Seems related to #177, though it was marked as fixed. |
You can wrap this in a try/catch block as temporary workaround (in PHP 7+). The callback URLs are set on the server, just the response is faulty. I do not recommend this approach in a production environment, because this will ignore real errors as well. But yes, this works: try {
NotificationFilterUrlMonetaryAccount::create($id, $filters);
} catch(\Error $e) {} |
Have a look at the readme, it says:
So it works as long as you use NotificationFilterUrlMonetaryAccountInternal::createWithListResponse() instead of NotificationFilterUrlMonetaryAccount::create() because createWithListResponse() does have the correct return type. |
Thanks a bunch for mentioning this! This different approach using these internal objects does work fine indeed. But I think it's weird the regular endpoint object doesn't work, even if you'd consider this to be because of 'compatibility purposes', because the actual implementation is broken. Therefore I'll leave this open. |
NotificationFilterUrlMonetaryAccountInternal::createWithListResponse returns an empty result set as does NotificationFilterUrlMonetaryAccountInternal::listing: createWithListResponse does create the notification correctly but I cannot check if it has been made using sdk_php. I am able to check using the direct api https://public-api.sandbox.bunq.com/v1/user/xxxxxx/monetary-account/xxxxxx/notification-filter-url or production equivalent. Seems to get to Guzzle ok but the response is wrong! |
Ugh, is this still not fixed? I am unable to see my notifications or callbacks whatever bunq calls them. It would be convenient to offer a way to manage these "webhooks" through a web interface, like Wise, Mollie, Stripe etc does. @hurnell how did you create a call to this direct API? Because I need to see if I created a notification or not :P |
It appears there's an API specification and server response inconsistency.
The API specification clearly states that
NotificationFilterUrlMonetaryAccount::create
should respond with anId
object. Instead, the server responds with a list ofNotificationFilterUrl
objects.Steps to reproduce:
$id
.What should happen:
What happens:
Id
is not found. See 'Extra info'.Traceback
SDK version and environment
Extra info:
Here is a prettified JSON response, that is received from the server when invoking the
create
function:This clearly shows the API responds with
NotificationFilterUrl
objects, and not anId
object.Providing a different number of filters doesn't improve things.
It is not clear to me what the response
Id
should represent.I see two possible solutions for this:
Id
object, as shown in the specification.The text was updated successfully, but these errors were encountered: