transbank-vue
v1.0.1
Published
```shell npm install --save transbank-vue ``` _or_ ```shell yarn add transbank-vue ```
Downloads
3
Readme
Installation
npm install --save transbank-vue
or
yarn add transbank-vue
Usage
import Vue from "vue"
import TransbankForm from 'transbank-vue'
Vue.use(TransbankForm)
vue template html WebpayNormal, OneClick, PatPass
<transbank-form :ready="transactionReady" :url="url" :token="token"/>
vue template html WebpayPlus
<transbank-form :webpayPlus="true" :ready="transactionReady" :url="url" :token="token"/>
vue template js
export default {
props: {},
data() {
return {
url: '',
token: '',
transactionReady: false,
}
},
methods: {
whenReady() {
// API CALL PROMISE
this.url = apiUrl
this.token = apiToken
/*
* When the "ready" boolean is set to true,
* it starts to send the form after 500ms in case of any problem
*/
this.transactionReady = true
}
}
};