Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export default class App extends Component<Props> {
- render() {
- const METHOD_DATA = [{
- supportedMethods: ['android-pay'],
- data: {
- supportedNetworks: ['visa', 'mastercard', 'amex'],
- currencyCode: 'USD',
- environment: 'TEST', // defaults to production
- paymentMethodTokenizationParameters: {
- tokenizationType: 'NETWORK_TOKEN',
- parameters: {
- publicKey: 'my public key'
- }
- }
- }
- }];
- const DETAILS = {
- id: 'basic-example',
- displayItems: [
- {
- label: 'Movie Ticket',
- amount: { currency: 'USD', value: '15.00' }
- }
- ],
- total: {
- label: 'Merchant Name',
- amount: { currency: 'USD', value: '15.00' }
- }
- };
- const paymentRequest = new PaymentRequest(METHOD_DATA, DETAILS);
- return (
- <View style={styles.container}>
- <TouchableOpacity onPress={()=>paymentRequest.show()}>
- <Text style={styles.welcome}>pay button!</Text>
- </TouchableOpacity>
- </View>
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement