Is it relatively easy to integrate Vaadin with external services without an addon, particularly services that use Javascript, forms with set field names/IDs, etc.?
My apps use stripe.com for payment processing. Here is the documentation on Stripe Checkout:
https://stripe.com/docs/checkout
I whip up a signup form, then plunk a label below my signup fields with the JS from Stripe in it. Here is my Scaladin code; hopefully it is easy enough to follow for those unfamiliar with Scala:
val stripe = Label.html(
<script
src="https://checkout.stripe.com/v2/checkout.js" class="stripe-button"
data-key="key"
data-amount="2000"
data-name="Demo Site"
data-description="2 widgets ($20.00)"
data-image="/128x128.png">
</script>
)
The credit card fields don’t appear in my form. I check Firebug and it’s there. The docs state that the tag must appear in a , and I didn’t see one corresponding to my Form instance, just a bunch of styled divs.
There is another Stripe API, but it seems to require static field names/IDs. It isn’t immediately obvious to me whether or not I can make forms adopt static names/IDs.
I’d also like to do Google Maps integration using its Javascript API. I know there’s an addon, but it looks outdated, and I’m not sure if it provides the navigation functionality I need.
Is it generally possible to plunk labels with script tags down in my UI to use external APIs? Or do I need an addon?