I'm trying to integrate Stripe check out. For that I'm following this documentation:
https://stripe.com/docs/recipes/subscription-signup#creating-the-signup-form-using-checkout
So I pasted that tag inside my form, like:
<form action="/create_subscription.php" method="POST">
<script
src="https://checkout.stripe.com/checkout.js" class="stripe-button"
data-key="pk_test_lrpNHu3jIKBoBo2ZLZ8dzzBh"
data-image="images/marketplace.png"
data-name="Emma's Farm CSA"
data-description="Subscription for 1 weekly box"
data-amount="2000"
data-label="Sign Me Up!">
</script>
</form>
The document says that when the user clicks on the Signup button it should open a pop up asking card details, but instead of that it directly submits the form.
I pretty sure that Stripe key has nothing to do with that, but still I have used the correct key. Also, there is no any Javascript error on the console.
After a lot of troubleshooting, I found that the issue is with the Laravel's default app.js. If I remove that, Stripe works perfectly. But I do want to use that js.
I have already seen this, but it doesn't give a good solution:
https://laracasts.com/discuss/channels/laravel/issue-with-stripe-api-js-and-laravel-js?page=1