#ozzy4654

1 messages · Page 1 of 1 (latest)

verbal groveBOT
obsidian thorn
#

Can you share more detail about what exactly you're trying to do. Do you expect you should be able to do this?

ashen pike
#

Yes i can,
Instead of haveing the user enter the card number manually which they can do if they choose. I want to provide them with the option to scan their card using your CardScanner SDK which returns the card number.

The problem I am having is updating the cardformview from your sdk to display the cardnumber.

Im also using jetpack compose

obsidian thorn
#

Are you following a guide related to this that you can share? How does that look in terms of implementation?

ashen pike
#

sadly the guides from stripe seem the only show using them separately and not together when looking at your examples.

AndroidView(
factory = { CardFormView(context) },
modifier = Modifier
.fillMaxWidth()
.padding(top = 15.dp, bottom = 35.dp)
)

is now im using your CardFormView with compose. However, there is no option to programmatically set the card-number field value as its a val.

CardFormView(context).cardParams.number

So is there a way to do this? Am I missing something?

#

Nvm, hade to go oldschool with findViewById call. Are the stripe sdks not compose ready? seems like a lot of workarounds for Jetpack compose

obsidian thorn
#

I thought most aspects were using compose, but I'm not intimately familiar with the internals

#

I wasn't finding a way to achieve this via the SDK reference, did you get this working?

ashen pike
#

yes, I had to do the following for reference:
val ccMultiLineForm = remember { CardFormView(context) }
ccMultiLineForm.findViewById<EditText>(R.id.et_card_number).setText(Your_Scanned_Card_Number_String)

obsidian thorn
#

Nice, thanks for sharing

ashen pike
#

thanks for the help haha sometimes it just helps to troubleshoot to find the solutions