PayPal 支付完成后没有返回返回 URL 可能是什么问题?这仅适用于信用卡付款,一切都适用于直接 PP 付款。
我使用 iFrame 并收到已完成的付款消息“感谢您的付款”,但该消息位于 iFrame 中,我想在付款后刷新整个页面。所以在验证函数之后:
$verified = $ipn->verifyIPN();
我正在使用以下方法重定向到另一个页面:
header ();
但它不适用于信用卡支付。
错误:
Invalid 'X-Frame-Options' header encountered when loading 'https://www.paypal.com/hostedpaymentnodeweb/payWithCC': 'ALLOW' is not a recognized directive. The header will be ignored.
我还在 PHP 脚本的末尾尝试了这个:
echo '<script type="text/javascript">window.top.location.href = "https://www.test.com";</script>';
最佳答案
仅当使用 PayPal 帐户付款时,PayPal 才会自动将您的买家重定向到您在按钮代码中指定的 URL。
正如他们网站上提到的 https://www.paypal-knowledge.com/infocenter/index?page=content&id=FAQ2056&pmv=print&impressions=false&viewlocale=en_US , 此功能仅适用于成功完成后的 PayPal 支付。
如果您使用的是网站支付标准,也称为 PayPal 支付标准,我建议您传递变量名称“cbt”来自定义出现在重定向链接上的文本,以便那些使用信用卡/借记卡的买家付款)了解此链接。
您可以引用此链接以获取可以附加到按钮代码中的自定义变量列表:https://developer.paypal.com/webapps/developer/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/
关于php - PayPal 不再重定向到返回 URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43020950/