Both of the above answers are correct. However, PayPal technical support provided a more detailed set of instructions, which I provided below. Hope they help someone else.
SetExpressCheckout, RETURNURL CANCELURL , ( ).
script, - PayPal. script "302 " ( ) , , . ( PHP "header" - , header("Location: https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=$token");.) script HTML/JavaScript ( "TOKEN" , PayPal). , PayPal. , , , . , , , /, , onClick.
<script type="text/javascript">
window.open("https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=TOKEN","_blank","width=1024,height=768,location=1,resizable=1,scrollbars=1,status=1",true);
</script>
, ( - PHP, , ). iframe. RETURNURL SetExpressCheckout . "paypalreturn.php" script, , PayPal.
<html>
<body>
<script type="text/javascript">
window.opener.location="http://www.regattacentral.com/paypalreturn.php?token=<? echo $_REQUEST["token"]; ?>&PayerID=<? echo $_REQUEST["PayerID"]; ?>";
window.close();
</script>
</body>
</html>
, CANCELURL.
• iframe, .