Paypal没有返回“金额”.变量到PHP脚本


Paypal doesn't return the "amount" variable to my PHP script

这太奇怪了。我知道我的"金额"变量工作,因为在我的形式,它带你到paypal和金额是正确的。但是由于某种原因,当我把这个文件写入我的服务器时,'amount'字段是空白的。

<?php
$data='';
$data=$_POST["item_name"].'|';
$data=$data.$_POST["amount"].'|';
$data=$data.$_POST["business"].'|';
$data=$data.$_POST["custom"];
$imp_file='c:''demo''sent.txt';
file_put_contents($imp_file, $data);
?>

,下面是$imp_file输出的

testitem | | softworksinc@gmail.com |用户名| itemid |

关于"amount"的唯一不同之处在于,它将是一个浮动值,但这不应该影响使用$_POST获取它,应该吗?

尝试对文件进行完整的$_POST转储,以查看实际接收到的内容:

<?php
  $data = "";
  foreach($_POST as $item => $item_data)
      $data .= $item . "|";
  $imp_file='c:''demo''sent.txt';
  file_put_contents($imp_file, $data);
?>