0.2.1 • Published 5 years ago

vue-card-payment v0.2.1

Weekly downloads
11
License
MIT
Repository
github
Last release
5 years ago

VueCardPayment

npm vue2

Awesome credit card payment form

DEMO

React version

Installation

npm install --save vue-card-payment

Usage

with Webpack or Rollup

import Vue from 'vue'
import VueCardPayment from 'vue-card-payment'
// You need a specific loader for CSS files like https://github.com/webpack/css-loader
import 'vue-card-payment/dist/vue-card-payment.css'

Vue.use(VueCardPayment)

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

  <VueCardPayment></VueCardPayment>

Properties

Settings

PropData typeDefaultDescription
showBankbooltrueif false, card form will not be themed with bank logo and corporate styles
showPaymentSystembooltrueif false, payment system logo will not be showed

Labels

PropData typeDefault
labels.cardnumberstringCard number
labels.monthstringMonth
labels.yearstringYear
labels.cardHolderstringCardholder name
labels.buttonstringPay

Placeholders

PropData typeDefault
placeholders.cardnumberstring0000 0000 0000 0000
placeholders.monthstring00
placeholders.yearstring00
placeholders.cardHolderstringJOHN DOE
placeholders.cvvstring000

Events

EventDescription
card-submitfires when button is pressed

Example with settings

  <VueCardPayment :settings="{
    labels: {
        cardNumber: 'Card number',
        month: 'Month',
        year: 'Year',
        cardHolder: 'Cardholder name',
        button: 'pay'
    },
    placeholders: {
        cardNumber: '0000 0000 0000 0000',
        month: '00',
        year: '00',
        cardHolder: 'JOHN DOE',
        cvv: '000'
    },

    showBank: true,
    showPaymentSystem: true
  }" @card-submit=""></VueCardPayment>

Browser

<!-- Include after Vue -->
<!-- Local files -->
<link rel="stylesheet" href="vue-card-payment/dist/vue-card-payment.css"></link>
<script src="vue-card-payment/dist/vue-card-payment.js"></script>

<!-- From CDN -->
<link rel="stylesheet" href="https://unpkg.com/vue-card-payment/dist/vue-card-payment.css"></link>
<script src="https://unpkg.com/vue-card-payment"></script>

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

0.2.1

5 years ago

0.2.0

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.0

6 years ago