Your form action needs to be changed - it should point to a route in your app. That route will need to take the payload returned from Stripe, which will include a token, and you use that token to actually charge the given card.
Dec 22, 2018
2
Level 6
Stripe Checkout.js (popup) MethodNotAllowedHttpException
As I am currently trying to accept payments, following the great episodes, I am facing an issue right at the beginning. As I try to implement the simple Checkout.js popup, I throws an error of
MethodNotAllowedHttpException
No message
after pushing the button.
If I comment out /app.js in my layout file, the popup works.
<div id="app">
<div class="container-fluid">
@yield('content')
</div>
</div>
// <script src="{{ asset('js/app.js') }}"></script>
As I am dependent on that file, for my vue-components, what could be the solution here?
<form action="your-server-side-code" method="POST">
{{csrf_field()}}
<script
src="https://checkout.stripe.com/checkout.js" class="stripe-button"
data-key="***"
data-amount="999"
data-name="Demo Site"
data-description="Widget"
data-image="https://stripe.com/img/documentation/checkout/marketplace.png"
data-locale="auto"
data-zip-code="true"
data-currency="eur">
</script>
</form>
Please or to participate in this conversation.