transbank-vue

1.0.1 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i transbank-vue

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

16.6 kB

Total Files

6

Last publish

Collaborators

  • dannypackages