Created
June 17, 2022 11:41
-
-
Save callstack-bot/841a531bd350dec514c91e487f8b0daf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ...your imports | |
import { View, StyleSheet } from 'react-native'; | |
import { | |
StripeProvider, CardField | |
} from '@stripe/stripe-react-native'; | |
import { Button } from 'react-native-paper'; | |
export default function App() { | |
return ( | |
<StripeProvider | |
publishableKey="pk_test_51AROWSJX9HHJ5bycpEUP9dK39tXufyuWogSUdeweyZEty3LC7M8yc5d9NlQ96fRCVL0BlAu7Nqt4V7N5xZjJnrkp005fDiTMIr" | |
> | |
<View style={styles.container}> | |
<CardField | |
postalCodeEnabled={false} | |
autofocus | |
style={styles.cardField} | |
cardStyle={{ | |
textColor: '#1c1c1c', | |
}} | |
/> | |
<Button>Pay</Button> | |
</View> | |
</StripeProvider> | |
); | |
} | |
const styles = StyleSheet.create({ | |
container: { | |
flex: 1, | |
justifyContent: 'center', | |
padding: 8, | |
}, | |
cardField: { | |
height: 50, | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment