我正在尝试将用户重定向到 Paypal 以进行付款,但我编写了此代码的常用 html 表单(我需要该表单将数据提交到我的网站,然后我重定向到 Paypal)
($sandbox) ? $url = "https://www.sandbox.paypal.com/cgi-bin/webscr" : $url = "https://www.paypal.com/cgi-bin/webscr";
($sandbox) ? $button = "XXXXX" : $button = "YYYYY";
$notify_url = urlencode($site_url . "index.php?act=member-pn&mid=" . $ld['member_id']);
$return_url = urlencode($site_url . "index.php?act=member-ps");
$cancel_url = urlencode($site_url . "index.php?act=member-pc&mid=" . $ld['member_id']);
$url .= "/?notify_url=$notify_url&return=$return_url&cancel_return=$cancel_url&cmd=_s-xclick&hosted_button_id=$button";
header("Location: $url");
为什么只有取消 URL 有效?返回和通知似乎不起作用。