Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the stripe API gets called even when a non "submit" button into the form is pressed #11

Open
xech3l0nx opened this issue Mar 16, 2016 · 0 comments

Comments

@xech3l0nx
Copy link

I have a form with various steps, the last one is the "review order" one with the confirm button, that charges the user.
this section is accessible only if the user has already a stripe single-use token generated for him in the previous step, where the form gets submitted and the response is handled.
By the way, even if the button in the final step isn't a submit button, the form gets submitted again, the stripe's api gets called with i don't know what values and the api respondes with a 400(Bad Request) status code.

EDIT(workaround)
changing the button to an a fixes the problem and the form doesn't get submitted again.

previous:

<button class="btn btn-primary" ng-click="charge()">Confirm</button>

edited:

<a class="btn btn-primary" ng-click="charge()">Confirm</a>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant