title: Retrieve original Customer object from sales_order_invoice_pay event
body: <p>I'm building a small module for my Magento 1.7 installation.</p>
  
  <p>My function is called when the sales_order_payment_pay event is triggered.</p>
  
  <p>Basically, it looks into the customer's order to check for the presence of a specific magic product.</p>
  
  <pre><code> // Retrieve the order
      $order = $observer-&gt;getPayment()-&gt;getOrder();
      // Look for product ID 999, whatever that is
  
      try {
          $magic_product = $order-&gt;getItemById(999);
  
  
          if ($magic_product){
              // The order contains our magic product; let's find our customer object and do something with it.
              //**$customer = $order-&gt;getCustomer();**
              $customer-&gt;setData( "foo", "bar" );
              $customer-&gt;save();
          }
      }  catch ( Exception $e ) {
          // Fail silently, I don't care...
      }
  </code></pre>
  
  <p>I'm trying here to find a way to go up the object hierarchy to retrieve the customer (if any!) who made the order.</p>
  
  <p>With getCustomerName() I could get it's name, but I can't find any way to find the object itself without resorting to some kind of hack. And I don't like hacks. Anyone can help me?</p>