stripe / stripe-react-native

React Native library for Stripe.
https://stripe.dev/stripe-react-native
MIT License
1.28k stars 264 forks source link

Preferred network for co-branded cards not working on android #1720

Open undeadborn opened 2 months ago

undeadborn commented 2 months ago

Describe the bug

Looks like co-branded cards are not working as expected on android.

If user selects any of the brands available in the dropdown, the response for preferredNetwork is always null.

If we force a default option programmatically through the preferredNetworks property, the result is the same.

The response is always null regardless of what we do.

I tested the functionality on iOS and it works fine there.

To Reproduce

This can be reproduced using the example folder from the project.

Steps to reproduce the behavior:

  1. Configure a CardField with preferredNetworks={[CardBrand.CartesBancaires, CardBrand.Visa]}
  2. Enter co-branded visa test card 4000002500001001
  3. Press Pay button
  4. Check server response which will contain "preferredNetwork": null

Expected behavior

The preferred network manually selected or the default provided through preferredNetworks property must be used

Screenshots

screenshot from emulator

image

screenshot from test server logs

image

Smartphone:

Additional context

ja-mike-a commented 1 month ago

I've the same issue in the Android SDK: https://github.com/stripe/stripe-android/issues/9210

ipinto commented 1 month ago

Same problem here! This bug was fixed on stripe-android a month ago. Please, could you take the fix to this repo to comply with the EU regulation? Thanks!