Instead of using inline code like:
<script>
var stripe = Stripe('pk_test_MYKEY');
function runStripe() {
stripe.redirectToCheckout({
sessionId: dmx.parse('emailPack1form.data.stripe.data.id')
});
}
</script>
Copy the content between the <script> ... </script>
tags (without the script tags) and paste it in a file named runstripe.js
.
Then include the runstripe.js
file on your page … before the closing body tag:
</div>
</main></div>
</div>
</div>
</main>
<script src="path/to/runstripe.js"></script>
<script src="bootstrap/4/js/popper.min.js"></script>
<script src="bootstrap/4/js/bootstrap.min.js"></script>
</body>
</html>