-
Notifications
You must be signed in to change notification settings - Fork 18
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
Buckaroo iDeal push is not sending authorization header when using httppost #67
Comments
I saw that @Michael-Buckaroo responded to a similarly sounding issue in #61 , so perhaps they have some advice? |
I came across some code that generates the authHeader in the following link: However, I am unsure if this is the correct way to generate it. Shouldn't the nonce and requestTimestamp values match the ones we sent in the request to Buckaroo? When these values are different, a different HMAC signature is generated, so I have doubts about the correctness of this approach. Despite this, I still encountered errors when I attempted to use this solution. At my current company, another project obtains an authorization header from the PUSH webhook from Buckaroo, so I am convinced that I should be getting a request including an authorization header. |
#Hey @sander1095, i think my hunch there was in the right direction; in Note; i havent tested more cases than this, so not sure if removing that line is the real fix or adding the encode in another place so it matches. But hope it helps! In case you need it, this is the JSON i used in the Unit Test:
|
I've discovered the actual source of the problem. In Buckaroo Plaza we have configured that we want to receive if we would switch to However, I can't switch to I see 2 solutions:
|
@Michael-Buckaroo Your answer is appreciated, but sadly this doesn't help me. As you can see in my previous comment, the problem lies with the SDK and buckaroo itself. Your answer also expects us to use JSON, which we don't do. We use |
Any chance you could provide an unit test that reproduces your current scenario? Would be happy to look into it a bit further. Another (a bit out of the box) way to find a way to get this to work would be to look at the other SDK's to see what is done in there, which seem to be maintained much better in the last few years. |
Other SDK'sI think you're an employee of Buckaroo. Are you saying that Buckaroo doesn't maintain their own SDK's for its own platform? I don't really want to install other SDK's because they are not as trustworthy as an official one; what if an unofficial SDK messes around with the transaction I send to Buckaroo? And what incentive does a third party have to maintain this SDK for free? Regardless of the previous sentences, can you recommend other SDK's? Unit testI can try to create a unit test today, but I'm not sure if I'll be able to complete it. If not, you can reproduce our problem like this:
Now change that push contenttype to JSON and perform another request. You'll see that an authorization header is returned. Problem 1: The fact that JSON does give us an authorization header and httppost DOESN't, is problem 1! Unless there is a reason for this, which I don't understand. Now that we have an authorization header, we can try to use the code from my post, which verifies and deserializes the push:
When trying this with push contenttype Problem 2: However, with |
That's correct, not a contributor of this repository though.
Seeing it has not been touched in quite some years, i think it probably needs a ReadMe that informs people about it's state. Currently it has some focus to get it updated (or replaced), but as in every company, i would expect this to take some time before it's done.
Only if you have time for it and it's not too much work! In the end, we're debugging the same thing.
The PHP SDK seems to be actively maintained. |
@sander1095 : welp, you saved me there. I've spent days going back and forth the docs, repositories and buckaroo email support to find out what the heck authorizationHeader is. It's always empty but it's mandatory in all |
Hey @umbracotrd . It's been some time that I worked on this ,but I can tell you the following. I think we ended up using the HTTP post method of receiving callbacks from Buckaroo. You can configure this in the Buckaroo portal. However, this other callback method is not supported by the BUckaroo SDK; the HTTP post does not give the PushValidator/SignatureCalculationService enough data to its job. If you switch to the other callback method in the Buckaroo portal ( I can't remember its name), everything should work with the Pushvalidator/signaturecalculationservice. If that's possible for you, I recommend that you do this. We were unable to switch to that other method because of reasons, so we ended up parsing the request body ourselves and wrote our own For now, this is all the info I can give you. I hope it works. Let me know if there's something else I can do. |
Hello!
We are using buckaroo to accept ideal payments. Creating a transaction and redirecting the user works, but handling the push messages doesn't.
We use .NET, and we use the following code to check if the incoming push message is safe and sound:
This throws a nullreference exception, the only reason why I can imagine this happens is because the
RequestAuthorizationHeader
is in fact empty.When checking the incoming request we also don't see an authorization header.
How can we fix this? Do we need we to do something special with the request to ensure that Buckaroo sends us an authorization header? Is the mistake on our end? Or can we work around this somehow?
I'd love some advice. Thanks!
The text was updated successfully, but these errors were encountered: