HTML Paddle Buttons do not work on Bubble (via JavaScript Libraries)

Hi! A newbie here who has learned tons and tons from this forum. However, I am facing an issue regarding importing JS libraries and adding HTML buttons that I cannot find the answers to anywhere.

I am building a virtual mailbox management tool (https://postbox.bubbleapps.io) for which I am using Paddle to enable payments and subscriptions (Stripe would be my first choice, but it isn’t available in my country).

First, to import the Padde JavaScript library, I am adding an HTML element to the Header of my site with the code below:

<script src="https://cdn.paddle.com/paddle/paddle.js"></script>
<script type="text/javascript">
Paddle.Setup({ vendor: 1***** });
</script>

Then, as instructed by Paddle, I am trying to add checkout buttons to the site as HTML elements that contain this code:

<a href="#!" class="paddle_button" data-product="599904" >Get Bronze Yearly!</a>

However, it is not working as it is supposed to. When doing the same thing in Carrd (a static no-code website builder), it works like a breeze as seen below:

Meanwhile, on Bubble (https://postbox.bubbleapps.io/billing), the purchase button from Paddle does not appear as a button but only as text and nothing happens when it is clicked:

I have also tried using the Tools Plugin to add JS through The Loaderr but to no avail. I would greatly appreciate any help and/or guidance!

Well, the paddle.js script is loaded. (I assume you did that with LOADERR? As it looks like your app is on free level right now, correct? In fact, it’s loaded in the page twice, as LOADERR can show you.)

What’s probably happening is that your Paddle.Setup script isn’t running.

I’m talking about this:

What you can do is install Toolbox in your project and then use the Run JavaScript action to execute that JavaScript.

Make a workflow that fires When Page is Loaded. In the Run JavaScript’s script field, just enter that one line (not the script tags that surround it):

That should prolly do it.

1 Like

Thanks a ton, @keith! Works flawlessly now. :smile:

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.