Skip to content
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

SDK not working on Windows (XAMPP) #8

Closed
BabyDino opened this issue Aug 3, 2017 · 3 comments
Closed

SDK not working on Windows (XAMPP) #8

BabyDino opened this issue Aug 3, 2017 · 3 comments
Assignees
Labels

Comments

@BabyDino
Copy link
Contributor

BabyDino commented Aug 3, 2017

When using XAMPP on a local windows development machine I get the following error:

Error: An unexpected error occurred with status code "400" and message "The request signature is invalid."

Code used:

$environmentType = BunqEnumApiEnvironmentType::SANDBOX();
$apiKey = '### Your API Key ###';
$deviceDescription = '### Your device description ###';
$permittedIps = ['my.local.ip.address'];

$apiContext = ApiContext::create(
    $environmentType,
    $apiKey,
    $deviceDescription,
    $permittedIps
);

This does not happen on Linux machines. It seems to be a problem with the session-server call, the first call that has to be signed.

@dnl-blkv
Copy link
Contributor

dnl-blkv commented Aug 3, 2017

@BabyDino It is most probably related to the line endings! Thank you for pointing out, I'll fix it and roll out hopefully today :)

@BabyDino
Copy link
Contributor Author

BabyDino commented Aug 3, 2017

Most probably yes, I had the same issue with my own wrapper now you mention it.

Do not rely on PHP_EOL when signing. bunq expects \n.

@dnl-blkv
Copy link
Contributor

dnl-blkv commented Aug 3, 2017

Fixed by @BabyDino :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants