-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Describe the bug
I have been replacing our current V1 tracker with this one. We used to generate the URI with the signed string ourselves, but as per the documentation I am using this to generate the URI string. However if I set the testing endpoint (https://github.com/MyUNiDAYS/unidays-php#test-endpoint) I receive a 400 response with Signature is not valid
as the output. Setting the test to false works as expected and I receive a 204 response.
We are using the code approach (server side, not client side)
https://github.com/MyUNiDAYS/unidays-php#create-server-url
A clear and concise description of what the bug is.
To Reproduce
- Set the second param to true as per the documentation
$helper = new TrackingHelper($directTrackingDetails, true);
- Copy the URL generated from
$url = $helper->create_server_url($key);
- Paste the URL into a browser window (or API like postman) and see the response.
- Expected no response with 204 status
- Received 400 with
["Signature is not valid"]
.
- Repeat again but this time pass false in the TrackingHelper
$helper = new TrackingHelper($directTrackingDetails, false);
- Expected no response with 204 status
- Received no response with 204 status
Reproduces how often:
Every time I set the testing param to true
Expected behaviour
A 204 response if all is okay with the generated URL
Screenshots
Desktop (please complete the following information):
PHP 7.2 running on server using a Guzzle client to make a GET request with the generated URL.
Smartphone (please complete the following information):
N/A
Additional context