post - 成功页面上的 Paypal 返回变量

标签 post paypal return

我想做什么 我只是想显示 Paypal 订阅注册的结果。我发现无法看到 POST 变量的问题是一个常见问题。

我尝试了很多不同的方法来做到这一点,我发现一个常见的解决方案是使用:

<input id="rm" name="rm" type="hidden" value="2">

这行不通。

我尝试给自己发送电子邮件 $_POST 和 $_REQUEST 变量,但它们是空的。

但是,我检测 txn_type $_POST 变量的代码有效,因为我的变量出现在我的数据库中。写入数据库后,它应该显示收据,但没有。

这是按钮代码:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">

<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="paypalemail@gmail.com">

<!-- Specify a Subscribe button. -->
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<!-- Identify the subscription. -->
<input type="hidden" name="item_name" value="Monthly Featured Listings">
<input type="hidden" name="item_number" value="1">

<!-- Set the terms of the regular subscription. -->
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="a3" value="0.01">
<input type="hidden" name="p3" value="1">
<input type="hidden" name="t3" value="M">
<input type="hidden" name="rm" value="2">

<!-- Set recurring payments until canceled. -->
<input type="hidden" name="src" value="1">                          
<input name="notify_url" value="http://www.example.com/user/register/index.php" type="hidden">
 <input name="return" value="http://www.example.com/user/register/index.php" type="hidden">
<input name="cancel_return" value="http://www.example.com/user/register/index.php?payment=cancelled" type="hidden">
<!-- Display the payment button. -->
<input type="image" name="submit" border="0" src="http://www.example.com/images/register-and-pay-now.png" alt="PayPal - The safer, easier way to pay online">
 <img alt="" border="0" width="1" height="1" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif">

由于我的数据库代码有效,我只能猜测 Paypal 正在正确发送信息,但我无法让它显示在网页中。

我的问题 重定向后如何在我的页面中显示成功的 $_POST 变量?

最佳答案

好吧,我的猜测是您接收并存储到数据库的变量正在访问 notify_url

这些变量是 IPN 变量,不应显示在任何网页上。

为了获得有关指定 return URL 的信息,您必须访问 PDT 数据。 阅读更多关于 PDT 的信息 here

关于post - 成功页面上的 Paypal 返回变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22081537/

相关文章:

python - 您如何处理使用Scrapable FormRequest变灰的多个下拉表单

c - 为什么只有代码块给我返回错误(0xc00000FD)?

python - 函数的输入参数是否总是默认返回?

java - 发送 HTTP POST 请求时方法签名无效

javascript - jquery:提交表单并将变量值传递给Python

html - 通过 PayPal 传递选项

paypal - 是否可以通过其他人的网关自动付款?

java - 该方法必须返回int类型的结果

php - 在 PHP 中获取 POST 请求的大小

php - 如何在 zend framework 2 中自动加载 paypal php sdk 的类文件?