I have a form that accept payment and insert data to database.
My question is when user clicks on submit button does it insert the data to database first then authorize the payment or it validate the payment first then insert?