title: Embedding Paypal Digital Goods with Express checkout in Flash not working
body: <p>I am attempting to integrate the Paypal digital goods with express checkout into my flash application. I am using this documentation: <a href="https://developer.paypal.com/webapps/developer/docs/classic/express-checkout/digital-goods/IntegratingDigitalGoodsInFlash/" rel="nofollow">https://developer.paypal.com/webapps/developer/docs/classic/express-checkout/digital-goods/IntegratingDigitalGoodsInFlash/</a></p>
  
  <p>First I am just trying to call the function manually to see if it triggers the pop-up. It does not work - all I get is the following error:</p>
  
  <p><strong>Uncaught TypeError: Cannot read property 'appendChild' of null (dg.js:13)</strong></p>
  
  <p>My very basic code is as follows (generated by PayPal Digital Goods - PHP Library for PayPal Digital Goods with Express Checkout) by Leonard's Ego Pty. Ltd:</p>
  
  <pre><code>&lt;script src ="https://www.paypalobjects.com/js/external/dg.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script&gt;
      var dg = new PAYPAL.apps.DGFlow();
      dg.startFlow('https://www.sandbox.paypal.com/incontext?token=EC-9TR342235S986371E');
  &lt;/script&gt;
  </code></pre>
  
  <p>That's all that is on the html page. I was expecting the paypal div to pop up. </p>
  
  <p>Does anyone know the proper code required for this to work? The flash example on the paypal site doesn't say much.</p>
  
  <p>I could answer my own question if there was some reference or documentation for this dg.js javascript class. But after some thorough google searching, I've found nothing. Does anyone have a link to some documentation for this? <a href="https://www.paypalobjects.com/js/external/dg.js" rel="nofollow">https://www.paypalobjects.com/js/external/dg.js</a> </p>
  
  <p>Thanks so much!</p>
  
  <p><strong>Update:</strong> The Javascript documentation is in fact missing. This link <a href="https://developer.paypal.com/webapps/developer/docs/classic/express-checkout/digital-goods/IntroducingExpressCheckoutDG/#id10A5B0I0SHS" rel="nofollow">JavaScript Functions For Digital Goods Payments</a> redirects to nothing on the documentation page. Anyone from PayPal scours this forum? Anyone know who I should contact regarding this omission?</p>