We will use the react-native-credit-card-input library to capture the user's credit card details. For this screen to work, we will request the cart, the user, and several important actions from Redux:

/*** src/screens/Payment.js ***/import React from 'react';import { View } from 'react-native';import { CreditCardInput } from 'react-native-credit-card-input';import { bindActionCreators } from 'redux';import { connect } from 'react-redux';import { Icon, Button, Text, Spinner, Title } from 'native-base';import PropTypes from 'prop-types';import * as PaymentsActions from '../reducers/payments';import * as UserActions from '../reducers/user';import LoginOrRegister from '../components/LoginOrRegister';class Payment extends React.Component ...

Get React Native Blueprints now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.