1.0.1 • Published 4 years ago

transbank-vue v1.0.1

Weekly downloads
6
License
MIT
Repository
-
Last release
4 years ago

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
      }
  }
};
1.0.1

4 years ago

1.0.0

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago