1

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

Parth Vora
  • 4,073
  • 7
  • 36
  • 59
  • Is there any specific need for you to put Stripe ` – Zico Jul 25 '17 at 11:40
  • No, Thats not my requirement but its Stripe requirement: https://stripe.com/docs/checkout. By the way I figure out that Vue.js is causing the issue with checkout.js. If you build app.js without Vue then it works fine – Parth Vora Jul 25 '17 at 11:45

0 Answers0