#vis-fields
1 messages · Page 1 of 1 (latest)
@still ridge hi! can you share some of the code you've used and the specific problems you have with it?
i didn't find documentation to use stripe elements in react native.
yes, you wouldn't use Elements, you'd use our React Native SDK.
ok, thanks, the code and screenshot helps a little
<CardForm
onFormComplete={cardDetails => {
console.log('card details', cardDetails);
}}
cardStyle={inputStyles}
autofocus= {true}
style={{
height:Platform.OS=='android'?350:280,
// height:190,
backgroundColor: C.colors.textinputFill.grey,
marginVertical:50,
}} />
const inputStyles: CardFieldInput.Styles = {
borderWidth: 5,
backgroundColor:'green',
borderColor: 'red',
borderRadius: 8,
fontSize: 14,
placeholderColor: 'orange',
};
so ok, two issues,
- the height doesn't change what you want it to change
- on Android the background turns green but it doesn't on iOS
yes
actually i want to customise like ... can you see that email input in screenshot?? like that i need to implement ui for cardno,cvv,mmyy
is that possible in react native
I don't really have an immediate answer for you as I don't have much React Native experience myself and this is going to take some digging
like that i need to implement ui
what does that mean? Like you want it to have the same type of background colour/rounded border as your phone/email fields?
yes..that same height,width,borderradius,backgroundcolor for cardno, mmyy ,cvv as separate inputs ...here it seem to be attached without margin..
It's definitely possible to do, but would need some experimenting!
Also I'm a bit confused, are you using CardField, or the PaymentSheet? Your screenshot seems to show using both of them
i have tried both cardform (whole card showing one) and cardfield( single box container with all inputs for cardno,cvv,mmyy)
as you said it is possible to customise as separate components... how should i proceed??and if not how should i solve the issues i am facing with cardform in @stripe/stripe-react-native
as I said I can't give you an immediate answer since I'd have to experiment with this myself (I'm trying to run a React Native app I have but it's crashing right now because of an XCode thing)
for what it's worth I can customise the CardField this way so it should be possible to make it look like what you're looking for.
<CardField
style={PaymentComponentStyle.cardField}
....
....
....
const PaymentComponentStyle = StyleSheet.create({
cardField: {
height:50,
borderWidth: 5,
backgroundColor:'green',
borderColor: 'red',
borderRadius: 8,
fontSize: 14,
//placeholderColor: 'orange',
},
});
yeah .. thanks for this.. but i need to get cardno, mmyy,cvc,zip as separate boxes..and that's i why moved with cardform but had issue in setting height and background color
is the crash fixed? should i help you with that?
yes I fixed it
ok so you want to use the CardForm and not the CardField then, got it.
yes
ok. Give me a bit to try something.
sure..
ok, sorry, my React Native app needs to be updated(I haven't used it since before the CardForm was added to the SDK so I can't directly test this right now and will have to put some time into rebuilding it).
so if you're blocked I'd suggest writing a clear email to https://support.stripe.com/email with the full code you have , screenshots, and a clear description of what you're trying to achieve and we can dig in and help!
ok thanks ..but actually i didn't get what issue you have mentioned...
app needs tobe updated?
I'm using an old version of stripe-react-native that doesn't have CardForm. I can't update it quickly to the latest version because of some reasons. It's not your problem really! Sorry I can't help directly here with this very specific question about this library, but if you write in we can help, it just takes time!