Last Updated: 19 September 2024 | Change Log

Vue.js integration


Integrate the Access Checkout Web SDK in a Vue.js v2 application.

Integration

You must add the SDK checkout.js script via JavaScript in the mounted() function of a Vue.js component. You must then add a listener for the load event where you initialize the SDK.

Full integration example

<template>
    <section class="container" id="container">
        <section class="card">
            <section class="checkout" id="card-form" >
                <div class="label">Card number <span class="type"></span></div>
                <section id="card-pan" class="field"></section>
                <section class="columns">
                    <section class="column">
                        <div class="label">Expiry date</div>
                        <section id="card-expiry" class="field"></section>
                    </section>
                    <section class="column">
                        <div class="label">CVV</div>
                        <section id="card-cvv" class="field"></section>
                    </section>
                </section>
                <section class="buttons">
                    <button class="submit" id="submit" type="button">Generate Session</button>
                    <button class="clear" id="clear" type="button">Clear</button>
                </section>
            </section>
        </section>
    </section>
</template>

<script>
    //Add JavaScript code in here
</script>

<style scoped>
    /*Add CSS code in here*/
</style>