#branyoto_code

1 messages ยท Page 1 of 1 (latest)

lethal juniperBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1265303734699950301

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

mild wolf
#

Sorry forgot to mention that I work in a React Native.

I've already read this page multiple times but where is the part that speak about retrieving the card brand selected by the user ?
I've tried to add preferredNetworks with possible networks (ie. for card 4000 0025 0000 1001 i've used [Visa, CartesBancaires]) but it still doesn't return any networks

earnest pagoda
#

How/where are you looking for that?

mild wolf
#

That's why I'm here, I have no idea how to get the selected network. I've tried to console.log the card when onCardChange event is trigger but it doesn't have the information

earnest pagoda
lethal juniperBOT
earnest pagoda
#

After which you can use the payment method ID to call confirmPayment

mild wolf
#

Oh okay the preferredNetworks are mandatory!
I've tried that before without those and only got null in Card.preferredNetwork...

#

Thank you very much ๐Ÿ™
Is there a way to avoid having to specify preferredNetworks ?
In the documentation it state that : "The list of preferred networks that should be used to process payments made with a co-branded card. This value will only be used if your user hasn't selected a network themselves."

But when I leave the preferredNetworks blank, i get null in preferredNetwork ๐Ÿค”

nimble frost
#

hello! I'm here now give me a second

#

just to confirm, what version of the RN SDK are you on?

mild wolf
#

react-native: 0.73.6
@stripe/stripe-react-native: 0.37.3

nimble frost
#

can you share the PaymentMethod ID of the 4000 0025 0000 1001 once you've created a PM from it with Card Element?

#

I'm not super familiar with this integration so confirming some things for myself too, thanks for bearing with me

mild wolf
#

No problems here is the ID pm_1PfjehH8Rz8h5V3qojk6FHzu
If this takes you too much time, don't bother checking it. I have a working use-case this is just for my curiosity ๐Ÿ™‚

nimble frost
#

thanks, looking

nimble frost
#

Hello @mild wolf ! just circling back on this as a colleague helped clarify this to me, so I'm wrong about

yeah so I think you want display_brand there from the created PM: https://dashboard.stripe.com/test/logs/req_zQ2Cyt7MCDMf9R
that is the brand displayed to the user

for the brand that a customer selected, that would be the networks.preferred field which as you note can also be null if none was selected by a customer at PaymentMethod creation

when a PaymentMethod is charged, the PaymentIntent's Charge (or SetupIntent SetupAttempt) has a payment_method_details.card.network field which is the brand used on the Charge