npm install rn-google-pay-button-only
![](https://private-user-images.githubusercontent.com/48245207/258630940-6925bc9f-c4a6-4a9a-97f2-5073e890aaee.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxNTA4NjYsIm5iZiI6MTcyNjE1MDU2NiwicGF0aCI6Ii80ODI0NTIwNy8yNTg2MzA5NDAtNjkyNWJjOWYtYzRhNi00YTlhLTk3ZjItNTA3M2U4OTBhYWVlLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEyVDE0MTYwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE3MmE2YjBiYTZlNjUyNWRhYmY3OGUwNGZiNjkyYTQ2ZTBkZWQ4NGM3NmM2OTJjMzk2M2U1Y2ZlN2YyMzFmN2ImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.cSBBfY-0_Bhtd0mVmpFWJqKJzEijgJQEYYhic1tAEcY)
import GooglePayImage from 'rn-google-pay-button-only';
// wrap with
<TouchableOpacity
style={styles.container}
onPress={() => console.log('Pressed')}
>
<GooglePayImage type="PAY_WITH" style={styles.box} />
</TouchableOpacity>;
const styles = StyleSheet.create({
box: {
width: 228,
height: 60,
},
});
type RnGooglePayButtonOnlyProps = {
type: payButtonType,
style: ViewStyle,
};
payButtonType |
---|
PAY_WITH |
SHADOW_PAY_WITH |
BUY_WITH |
SHADOW_BUY_WITH |
GOOGLE_PAY |
SHADOW_GOOGLE_PAY |
GOOGLE_PAY_PLAIN_DARK |
- This is a button only component and does not contain any logic to handle payment process.
- Android only
We obtained the assets from the Google Pay brand's static resources.Refer to the website link for further details.
https://developers.google.com/pay/api/android/guides/resources/payment-button-static-assets
MIT
Made with create-react-native-library