vue-braintree
v2.1.0
Published
[![Build Status](https://travis-ci.org/francoislevesque/vue-braintree.svg?branch=master)](https://travis-ci.org/francoislevesque/vue-braintree) [![Maintainability](https://api.codeclimate.com/v1/badges/b448a5b0646bc4fcf196/maintainability)](https://codec
Downloads
845
Readme
Vue Braintree
- Works with: Credit Cards, Paypal, Apple Pay, Google Pay, etc.
- Choose your own language. Available in English, French, Spanish, etc.
- Fully customizable
Documentation
Complete documentation and examples available at https://francoislevesque.github.io/vue-braintree/.
Quick start
Import the plugin in your Vue Application.
import Vue from 'vue'
import vue-braintree from 'vue-braintree'
Vue.use(vue-braintree)
In order to use the Drop-in UI, you'll first need to get a tokenization key from the Control Panel or generate a client token on your server. This will be your authorization
used when creating Drop-in.
<v-braintree
authorization="xxxxxxxxxxxxxxxxxxxxxx"
@success="onSuccess"
@error="onError"
></v-braintree>
export default {
methods: {
onSuccess (payload) {
let nonce = payload.nonce;
// Do something great with the nonce...
},
onError (error) {
let message = error.message;
// Whoops, an error has occured while trying to get the nonce
}
}
}