lundi 24 juillet 2017

Laravel's default app.js makes issue with Stripe's checkout.js

I'm trying to integrate Stripe check out. For that I'm following this documentation:

http://ift.tt/2tVsvBW

So I pasted that tag inside my form, like:

<form action="/create_subscription.php" method="POST">
  <script
    src="http://ift.tt/1doUtf9" 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:

http://ift.tt/2tFE9FO



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire