@lyracom/embedded-form-dev
v0.0.3
Published
Vue embedded form
Downloads
2
Readme
Lyra Embedded Form
Installation
Add the next package to your library:
yarn add @lyracom/embedded-form-dev
Usage
You can add a form to any Vue2 component as follows:
// Import the library and get the plugin for Vue2
import lyra from "@lyracom/embedded-form-dev"
const LyraForm = lyra.vue2.form;
const options = {
clientSrc: 'https://api.payzen.eu',
publicKey: '69876357:testpublickey_DEMOPUBLICKEY95me92597fd28tGD4r5'
};
// Plugin installation
Vue.use(LyraForm, options);
Now, you can add the component to yout view:
<lyra-form kr-form-token="DEMO-TOKEN-TO-BE-REPLACED"
kr-language="es-ES"
kr-post-url-success="paid.php">
<!-- payment form fields -->
<div class="kr-pan"></div>
<div class="kr-expiry"></div>
<div class="kr-security-code"></div>
<!-- payment form submit button -->
<button class="kr-payment-button"></button>
<!-- error zone -->
<div class="kr-form-error"></div>
</div>
</lyra-form>