Ordering process consists of the several steps

  1. Pre-order validation - Validation checks if the order has and performs initial validation of customer's data entered in the form
  2. case of validation passed, regardless of the payment type the order is registered along with the order details. For Paypal it does include only order details with empty customer info.
  3. After order registration in database -
    1. For Invoice just mark order as successful, compose and sends notification to customer/webmaster
    2. For Paypal the script awaits data block from paypal about order completion, then mark order as successful, compose and sends notification to customer/webmaster
    3. For Credit Card payment the script awaits data block from credit card about order completion, then mark order as successful, compose and sends notification to customer/webmaster