title: Promise - TypeError: Cannot read property 'then' of undefined
body: <p>I think I just need another pair of eyes on this, because I can't get what I'm missing here. </p>
  
  <pre><code>   $scope.checkout = function (form) {
          //some code here
  
          function checkoutErrorHandler(error) {
            //some code here
          }
  
          function displaySuccessMessage() {
              $scope.success = true;
              cartService.emptyCart();    
          }
  
          checkoutService.makePayment($scope.payment).then(function (i) {
  
              //some code here
              checkoutService.buyProducts($scope.payment, products, i).then(function () {
                      displaySuccessMessage().then(function(){
                          $scope.payment = {}; // clear checkout form
                          $scope.form.reset();
                      });
                      return displaySuccessMessage;
                  },
                  checkoutErrorHandler
              );
          }, checkoutErrorHandler);
      };
  </code></pre>
  
  <p>I get "Cannot read property 'then' of undefined" when I call displaySuccessMessage. I've tried refactoring several different ways but cannot get it to work. Does anyone see my mistake?</p>