3
부모 페이지가 PayPal
버튼이 있습니다. 버튼을 누르면 사용자가 로그인하고 결제 할 수있는 미니 브라우저가 실행됩니다.PayPal Express Checkout 후 부모 페이지 리디렉션
다음 코드는 사용자가 결제를 완료 한 후 PayPal 미니 브라우저를 닫습니다.
// 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(
"<script>\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</script>");
미니 브라우저는 성공적으로 닫히지 만 응용 프로그램의 상위 페이지는 동일하게 유지됩니다. 상위 페이지를 지불 상태로 업데이트하려면 어떻게합니까?