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

BrowserInfo.TimezoneOffset type #2719

Open
mderasse opened this issue Jun 20, 2024 · 2 comments
Open

BrowserInfo.TimezoneOffset type #2719

mderasse opened this issue Jun 20, 2024 · 2 comments
Labels
Needs more info Further information is requested

Comments

@mderasse
Copy link

mderasse commented Jun 20, 2024

Describe the bug
Hello,

The adyen documentation is not really clear on the browserInfo.timeZoneOffset type on /payments API.
API explorer show that it should be an integer
https://docs.adyen.com/api-explorer/Checkout/71/post/payments
and
https://docs.adyen.com/online-payments/3d-secure/api-reference/
is showing it as a string.

On the other end the golang SDK (https://github.com/Adyen/adyen-go-api-library) is expecting a Integer but from time to time the Adyen Component is returning that information as a string creating complexity and inaccurate information.

Expected behavior
Adyen component should probably always return that information as an integer

BrowserInfo

    "browserInfo": {
        "acceptHeader": "*/*",
        "colorDepth": 24,
        "language": "en-US",
        "javaEnabled": false,
        "screenHeight": 1080,
        "screenWidth": 1920,
        "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0",
        "timeZoneOffset": "-60"
    },
@ribeiroguilherme
Copy link
Contributor

Hey @mderasse ,

Sorry for the delay getting back to you here.

It is weird that you are getting different types for the browserInfo.timeZoneOffset property. We just call the built-in browser defined method of the Date object, getTimezoneOffset. This returns a number. We don't do any further manipulation of that field.

I tested through BrowserStack different Edge versions (122, 124, 125, 126) and they are all returning as Integer.
I am not sure what can be causing this function to return a string type in your case. Do you have more information about which browsers/versions are returning this as 'string', besides the Edge ones that I mentioned?

@ribeiroguilherme ribeiroguilherme added the Needs more info Further information is requested label Jul 9, 2024
@mderasse
Copy link
Author

mderasse commented Jul 9, 2024

Hi @ribeiroguilherme

I was able to list a few user agent based on the payload the adyen component return.

"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36"
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 Edg/122.0.0.0"
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.0.0"
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0"
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs more info Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants