- godavid33Asked on June 04, 2014 at 06:57 PM
So I thought I was going crazy initially, but I'll start from the beginning.
I am trying to use the source code of a form in order to create a form that accepts payment for a product and submits the form asynchronously so the user doesnt have to leave the site.
Easy enough right?
When I submit the form, some terrible yeti seems to come along and cleave everything in two. Two equal parts that is. Said data yeti is also magical. The user is double charged for the product.
Now I have narrowed it down to something in the actual process of ajax submission. To deduce this, I tried submitting the form (as unmodified source code) both ajax and with the normal redirect process. The latter worked correctly, the former was yet again terrorized by Mr. Data Yeti. I also have another form on the page, but I deleted it to make sure it wasn't causing a problem. Lo and behold, it was not. It seems that the problem is not that I initially modified the code or that there was a second form.
Any advice on this? If you could explain a bit about how product data is actually passed from the form to y'alls servers, that could possibly help a lot. The form is not double submitting, it just seems to be getting the actual product information incorrectly.
P.S. I included a link to the page, but it is still under development. If it doesnt take you directly to the registration page, you'll have to just click there from the header menu.
- godavid33Answered on June 04, 2014 at 07:11 PM
And of course, once I ask on the forums I figured out the problem. I was initially using $.ajax
I noticed the header method "GET" was being used, as opposed to "POST", even though I told it to use "POST". At any rate, I changed it to $.post and voila, yeti defeated.
- godavid33Answered on June 04, 2014 at 07:12 PM
Feel free to make this post public (but please remove my website) in case others find themselves in dire need of yeti slaying
- JotForm Supportashwin_dAnswered on June 05, 2014 at 12:07 AM
Thank you for the detailed explanation.
I have made the thread public and also removed your website information.