0.1.2 • Published 6 years ago

react-card-payment v0.1.2

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

ReactCardPayment

npm vue2

Awesome credit card payment form

DEMO

Vuejs version

Installation

npm install --save react-card-payment

Usage

with Webpack or Rollup

import ReactCardPayment from 'react-card-payment';

then, place this one in a place you want payment form to appear

  <ReactCardPayment/>

Properties

Labels

PropData typeDefault
labelCardnumberstringCard number
labelMonthstringMonth
labelYearstringYear
labelCardHolderstringCardholder name
buttonstringPay

Placeholders

PropData typeDefault
placeholderCardnumberstring0000 0000 0000 0000
placeholderMonthstring00
placeholderYearstring00
placeholderCardHolderstringJOHN DOE
placeholderCvvstring000

Events

EventDescription
onSubmitfires when form is submitted

Example with settings

  <ReactCardPayment {...{
    labelCardNumber: "Card number",
    labelMonth: "Month",
    labelYear: "Year",
    labelCardHolder: "Cardholder name",
    button: "Pay",

    placeholderCardnumber: "0000 0000 0000 0000",
    placeholderMonth: "00",
    placeholderYear: "00",
    placeholderCardHolder: "JOHN DOE",
    placeholderCvv: "000"
  }} onSubmit={alert('it was submitted')}/>

Thanks

iserdmi for card-info plugin, this plugin is primary-based on it braintree for card-validator plugin, this one used here for validation needs

License

MIT