目前,我正在使用此处的代码访问我的sanbox环境:https://github.com/paypal/ipn-code-samples/blob/master/paypal_ipn.php
Evertyhing运行顺畅,清晰,我在IPN历史网站上检索邮件,我已将所有内容保存在我的日志文件中。
问题在于:
if (strcmp ($res, "VERIFIED") == 0) {
// check whether the payment_status is Completed
// check that txn_id has not been previously processed
// check that receiver_email is your PayPal email
// check that payment_amount/payment_currency are correct
// process payment and mark item as paid.
// assign posted variables to local variables
//$item_name = $_POST['item_name'];
//$item_number = $_POST['item_number'];
//$payment_status = $_POST['payment_status'];
//$payment_amount = $_POST['mc_gross'];
//$payment_currency = $_POST['mc_currency'];
//$txn_id = $_POST['txn_id'];
//$receiver_email = $_POST['receiver_email'];
$payer_email = $_POST['payer_email'];
if(DEBUG == true) {
error_log(date('[Y-m-d H:i e] '). "Verified IPN: $req ". PHP_EOL, 3, LOG_FILE);
}
}
如果我想要回显$payer_email
变量,则没有任何反应。如果我想将这些变量存储在我的数据库中 - 没有任何反应。
似乎这些变量是空的,如果它们确实存在,我如何获取这些变量并根据我的需要处理它们。