ok so i recently have been trying to use the stripe API / cashier with laravel 5.4, i wanted to use the simple method with the popup, however every time i would put the code for the popup in my view and click the button it did not show the form just submitted, well after many many hours and many many google searches that turned up nothing, i figured this out!
the JS in the layouts/app view is the problem!!
<script src="{{ asset('js/app.js') }}"></script>
as soon as this is commented out the popup that is JS from stripe worked as intended, not sure if anyone else has had this issue but im putting it here for that and to also hopefully let someone of importance know so they can look into this and see if there is a permanent fix for laravel
that must be the difference im using the simple method which is just loading the script with data tags, i dont know JS enough to do it the custom way, though i plan on checking out vue eventually, that script is not very important anyhow but i figured i would bring it up somewhere so others would be able to see.
Just remove the declaration of that script and its all good, if you use your own master blade file and not the default then that script will not be there.
I noticed if you just comment out the vue registration in app.js it will work. You can leave it to load everything in bootstrap.js. I am sure there is a simple fix but I am not sure what it is.
I am having the same issue and I have also spent a lot of hours on this issue. FInally, I know that the default app.js is making the issue with Stripe's checkout.js. But what is the solution here? I do want to use that default app.js. So any other solution except removing that js?
Im getting the same issue. Spent hours trying to figure out what was causing stripes subscription error "This customer has no attached payment source". Then figured out that it was Vue spitting out this error:
[Vue warn]: Error compiling template:
- Templates should only be responsible for mapping the state to the UI. Avoid placing tags with side-effects in your templates, such as <script>, as they will not be parsed.
I think i need to make a specific vue component for stripe but yet to figure it out for subscriptions but there is this one for vue payments: