title: Redirect Parent Page after PayPal Express Checkout
body: <p>I have a parent page which has <code>PayPal</code> button on it. Pressing the button will trigger a mini-browser where user is able to login and make payment.</p>
  
  <p>The following code closes PayPal mini browser after user made payment successfully.</p>
  
  <pre><code>// Add javascript to close Digital Goods frame. You may want to
                  // add more javascript code to
                  // display some info message indicating status of purchase in
                  // the parent window
                  response.setContentType("text/html");
                  response.getWriter()
                          .println(
                                  "&lt;script&gt;\n alert(\"Payment Successful\");\n// add relevant message above or remove the line if not required \n window.onload = function(){\nif(window.opener){\nwindow.close();\n}\nelse{\nif(top.dg.isOpen() == true){\ntop.dg.closeFlow();\nreturn true;\n}\n}\n};\n&lt;/script&gt;");
  </code></pre>
  
  <p>The mini browser is closed successfully, however the parent page on my application remains the same. How do I update the parent page with the payment status ?</p>