I'm trying to connect to Braintree payment system and get the client token ID with the following code:
<script src="https://js.braintreegateway.com/js/braintree-2.29.0.min.js"></script>
<script>
clientToken = <?php echo(Braintree_ClientToken::generate()); ?>;
alert(clientToken);
braintree.setup(clientToken, "dropin", {
container: "payment-form"
});
</script>
But the code fails to fetch the client token. Please help me to solve this issue.