AstraUI

Components

Payment Card

A form component for securely capturing and validating payment card details.

Props

NameTypeDefaultDescription
classNamestring-Additional CSS classes for custom styling.
onPaymentSuccessfunction-Callback function to be called on successful payment.
onPaymentErrorfunction-Callback function to be called on payment error.
amountnumber-Amount to be paid. Used for displaying in the button text.

Best Practices

  • Ensure all sensitive data fields are secure and not exposed in the client-side code.
  • Validate all inputs on both client-side and server-side to prevent invalid data submission.
  • Use HTTPS to ensure all data transmissions are secure.
  • Handle errors gracefully and provide user feedback on what went wrong.