Does anyone have sample code showing an example of integrating the dwolla-card.js library into a Vue 3 app?
Specifically i’m getting a bit tripped up with the correct way to include the dwolla-card.js lib when i’m using Vue Single File Components which don’t allow in the page HTML code(the block, where the UI code lives).
Here’s my attempted code:
//UI code goes here
<script lang="ts">
export default defineComponent({
mounted() {
let recaptchaScript = document.createElement("script");
recaptchaScript.setAttribute(
"src",
"https://cdn-b.dwolla.com/1/dwolla-cards.js"
);
document.head.appendChild(recaptchaScript);
//ERROR: dwolla not recognized
dwolla.configure("sandbox");
},
});
</script>
I’m not importing the dwolla lib correctly because I can’t make calls to the dwolla client for .configure()