When you click the “Place Order” button in the final section of the “one page checkout”, Magento tries to take the money from the customer via the payment method selected. Depending on whether the payment is successful or not the either error message is displayed or the order is placed and the order number is displayed respectively. Welcome to the internals of this flow.
Download eBookLink updated in 2017 Maybe you will be redirected to source's website