1.0.5 • Published 7 years ago

vue-stripe-card-form v1.0.5

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

vue-stripe-card-form

Form for collecting credit card details and receiving a token from Stripe

Installation


##npm

npm install --save vue-stripe-card-form

Include the stripe script in the head of your index.html file

<script type="text/javascript" src="https://js.stripe.com/v2/"></script>

Use the component by passing though your stripe publishable key. The tokenReceived event will fire as soon as the form recieves a token from the Stripe API.

<stripe-payment @tokenReceived="gotToken" :stripe-key="[YOUR_STRIPE_PUBLISHABLE_KEY_GOES_HERE]">
</stripe-payment>

You can get the token in the callback function defined in the tokenReceived event.

methods:{
    gotToken(token){
        // Send your token to the server or whatever
    }
}
1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago