Card element
The card element is Pesepay’s Visa card fields, in a frame your page can’t
read. Type into it to see the field states. In a real checkout, your Pay
button calls confirmCardPayment(); if the bank asks for 3-D Secure, the
customer goes to the bank and comes back to your page. See
Cards and 3-D Secure for the code.
Card result, as after 3-D Secure:
Events
| State | What the customer sees | Event |
|---|---|---|
| Loaded | Empty card fields | ready |
| Typing | The card brand once it’s known | change with brand |
| Invalid | A message under the fields | change with error |
| Complete | Nothing new: your Pay button can enable | change with complete: true |
| Paid, declined | Your page shows the result, after 3-D Secure | handleRedirectResult() |
The card numbers you type here go nowhere: the fields only send to Pesepay. The result buttons show what your return page reads after 3-D Secure.
Reference: CardElement.