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

No acceptHeader being passed on browserInfo when submitting payment #164

Open
joaooliveiramanteigas opened this issue Mar 17, 2023 · 12 comments
Labels
bug Something isn't working missing on Android This feature is missing on latest adyen-android missing on iOS This feature is missing on latest adyen-ios

Comments

@joaooliveiramanteigas
Copy link

Describe the bug
When the onSubmit prop function gets triggered we receive the data that is supposed to be sent to the server but this data is missing the field acceptHeader inside browserInfo. Is there something we are missing on the implementation?

Expected behavior
When sending this data to the server there is an exception because no acceptHeader is being sent, we expect acceptHeader to come inside the data parameter for the onSubmit function.

Screenshots
Screenshot 2023-03-17 at 11 58 45

Smartphone (please complete the following information):

  • Device: iPhone 14
  • OS: 16.3.1
@joaooliveiramanteigas joaooliveiramanteigas added the bug report when a bug report is created label Mar 17, 2023
@descorp
Copy link
Contributor

descorp commented Mar 17, 2023

Hey @joaooliveiramanteigas

thank you for reaching out!

Do you have same issue on Android?

there is an exception because no acceptHeader

What kind of exception?

@joaooliveiramanteigas
Copy link
Author

On Android we don't receive this browserInfo field, I will get into more details on the server error.

Screenshot 2023-03-17 at 16 55 39

@joaooliveiramanteigas
Copy link
Author

Server error log we have is this acceptHeader is a required property for BrowserInfo and cannot be null

@descorp
Copy link
Contributor

descorp commented Mar 19, 2023

This is unusual 🤔

Is this error coming from Adyen API? What version of Adyen API you are using? Are you using any API Library ?
Could you provide a full server response/exception?

acceptHeader is not expected for iOS and Android, hence our SDKs do not provide them. You might find our documentation that state otherwise, but it requires update.
This means that if null check of `acceptHeader is false-positive -any value should do:
For example:

text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8

As a side note, on your first screenshot I see that returnURL is "https://google.com".
returnURL property have complicated behaviour and triggering web-friendly POST or mobile-friendly GET redirect flow for "https" or "Custom URL Scheme" respectively.
We recommend using custom url scheme on iOS.

@joaooliveiramanteigas
Copy link
Author

The error occurs while using the latest dotNet library, it fails creating the object, making it impossible to send to Adyen's servers,
As seen bellow, the object forces that field: https://github.com/Adyen/adyen-dotnet-api-library/blob/9.2.0/Adyen/Model/Checkout/BrowserInfo.cs#L61

@descorp
Copy link
Contributor

descorp commented Mar 20, 2023

Indeed, acceptHeader is marked as "required" in OpenAPI, so it was applied to all API Libraries. We will look into fixing this.
Thanks for pointing on this misalignment! 💚


Have you tried providing random/mock value?

@descorp descorp added missing on iOS This feature is missing on latest adyen-ios missing on Android This feature is missing on latest adyen-android labels Mar 21, 2023
@joaooliveiramanteigas
Copy link
Author

Yes, it does work if we remove browserInfo form paymentData on iOS.

@avitsrimer
Copy link

Hey there! I dont think this issue should be closed, we can't just remove it from paymentData because we will get 15_002: Required field browserInfo missing for device channel browser.
Should it be reopened?

@descorp descorp reopened this Jul 24, 2023
@descorp
Copy link
Contributor

descorp commented Aug 1, 2023

@avitsrimer

we can't just remove it from paymentData

Removing browserInfo was never a good idea. Better provide a mock value:

"acceptHeader" : "*/*"

@descorp
Copy link
Contributor

descorp commented Aug 1, 2023

We are looking to address this exactly same way from native SDK(s) point of view

@StefanWallin
Copy link
Contributor

I can attest that on iOS I get userAgent but not on android. Is browserInfo.userAgent used for fraud scoring? Is it being checked if it matches for the browser visiting the 3DS prompt website?

@descorp
Copy link
Contributor

descorp commented Jan 15, 2024

Thanks @StefanWallin

browserInfo.userAgent is essential for fraud scoring, fingerprinting and for optimising shopper experience on web.
For mobile it is less relevant, since shopper can always open external browser different from build-in Chrome or Safari.

We are revisiting separation of web/mobile flows.
For now consensus is that browserInfo could be ignored for 3DS2 native and web-fallback flow when channel is "iOS" or "Android".

I will keep this thread posted.

@descorp descorp added bug Something isn't working and removed bug report when a bug report is created labels Jun 18, 2024
@descorp descorp pinned this issue Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working missing on Android This feature is missing on latest adyen-android missing on iOS This feature is missing on latest adyen-ios
Projects
None yet
Development

No branches or pull requests

4 participants