Ajout du nom dans le UI
This commit is contained in:
@@ -27,6 +27,7 @@ const CARD_OPTIONS = {
|
||||
const PaymentForm = ({ cost }) => {
|
||||
|
||||
const [success, setSuccess] = useState(false);
|
||||
const [cardName, setCardName] = useState("");
|
||||
const stripe = useStripe();
|
||||
const elements = useElements();
|
||||
|
||||
@@ -82,6 +83,7 @@ const PaymentForm = ({ cost }) => {
|
||||
{!success ?
|
||||
<form onSubmit={handleSubmit}>
|
||||
<fieldset className="FormGroup">
|
||||
<input className="FormRow" placeholder="Cardholder Name" id="cardholder-name" type="text" value={cardName} onChange={e => setCardName(e.target.value)} />
|
||||
<div className="FormRow">
|
||||
<CardElement options={CARD_OPTIONS} />
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user