Php 当我使用沙盒时,PayPal支付状态总是挂起

Php 当我使用沙盒时,PayPal支付状态总是挂起,php,paypal,paypal-sandbox,paypal-ipn,Php,Paypal,Paypal Sandbox,Paypal Ipn,我使用的是PayPal IPN功能,但当我使用沙箱进行测试时,我不断得到\u POST[payment\u status]=Pending。因此,我无法测试整个购买过程,以确保整个过程正常运行 这是我的密码: // Set the request paramaeter $req = 'cmd=_notify-validate'; // Run through the posted array foreach ($_POST as $key => $value) { // If m

我使用的是
PayPal IPN
功能,但当我使用沙箱进行测试时,我不断得到
\u POST[payment\u status]=Pending
。因此,我无法测试整个购买过程,以确保整个过程正常运行

这是我的密码:

// Set the request paramaeter
$req = 'cmd=_notify-validate';

// Run through the posted array
foreach ($_POST as $key => $value)
{
    // If magic quotes is enabled strip slashes
    if (get_magic_quotes_gpc())
    {
        $_POST[$key] = stripslashes($value);
        $value = stripslashes($value);
    }
    $value = urlencode($value);
    // Add the value to the request parameter
    $req .= "&$key=$value";
}

$ch = curl_init();    // Starts the curl handler
curl_setopt($ch, CURLOPT_URL,$paypal[$testing]); // Sets the paypal address for curl
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // Returns result to a variable instead of echoing
curl_setopt($ch, CURLOPT_TIMEOUT, 3); // Sets a time limit for curl in seconds (do not set too low)
curl_setopt($ch, CURLOPT_POST, 1); // Set curl to send data using post
curl_setopt($ch, CURLOPT_POSTFIELDS, $req); // Add the request parameters to the post
$result = curl_exec($ch); // run the curl process (and return the result to $result
curl_close($ch);

if (strcmp ($result, "VERIFIED") == 0) // It may seem strange but this function returns 0 if the result matches the string So you MUST check it is 0 and not just do strcmp ($result, "VERIFIED") (the if will fail as it will equate the result as false)
{
// It worked
// do my stuff
}else{

    foreach($_POST as $key=>$value){
        $post_str .="_POST[$key] = $value<br>";
    }

    $sub = "Paypal error";
    $mes = "$post_str";
    mailer($sub, $mes, $from, $to);

}
这个错误真的快把我逼疯了。
大家知道,我已经将付款审核设置为“关闭”

确保您的帐户有一个已确认的电子邮件地址。这通常发生在您向没有确认电子邮件地址的帐户发送付款时。因此,请检查卖家帐户,并确保电子邮件地址已确认您已向其发送了付款。

确保您的帐户具有已确认的电子邮件地址。这通常发生在您向没有确认电子邮件地址的帐户发送付款时。因此,请检查卖家帐户,并确保电子邮件地址已确认您已向其发送了付款。

登录您的企业沙箱帐户,查看您是否有任何“无人认领”的付款。这可能是因为它们的货币与您的主帐户货币不同。

登录您的业务沙箱帐户,查看您是否有任何“无人认领”的付款。这可能是因为它们使用的货币与您的主帐户的货币不同。

我遇到了这个问题-我在向PayPal发送我的“live”payer_电子邮件时,在它工作的沙箱中将其更改为业务电子邮件。与我的实时电子邮件相同****-facilitator@yoursite.com

我遇到了这个问题-我在向PayPal发送我的“实时”付款人电子邮件时,在它工作的沙箱中将其更改为业务电子邮件。与我的实时电子邮件相同****-facilitator@yoursite.com如果您使用的是沙盒,请打开developer.paypal.com->Dashboard->Accounts->facilitator@yourhost.com->配置文件->设置。如果您使用的是沙盒,请打开developer.paypal.com->Dashboard->Accounts->facilitator@yourhost.com->配置文件->设置。将“付款审核”设置为“关闭”

嘿,伙计们,我在过去的两天里一直在做这件事。我尝试了这里的每一点建议,以及我能找到的每一个地方……我尝试过的唯一一件事,因为我似乎找不到的是“付款审查”……这就是我在开发人员上看到的。贝宝沙箱页面:嘿,伙计们,我在过去的两天里一直在做这件事。我在这里尝试了所有的建议,在其他任何地方我都能找到……我唯一尝试过的,因为我似乎找不到的是“付款审核”……这就是我在开发者上看到的。贝宝沙盒页面:谢谢。你刚刚帮我省了很多麻烦。你帮我省了很多麻烦
_POST[mc_gross] = 120.00
_POST[protection_eligibility] = Ineligible
_POST[address_status] = confirmed
_POST[payer_id] = QDZDYY4JWGFVG
_POST[tax] = 0.00
_POST[address_street] = 1 Maire-Victorin
_POST[payment_date] = 12:25:03 Apr 11, 2013 PDT
_POST[payment_status] = Pending
_POST[charset] = windows-1252
_POST[address_zip] = M5A 1E1
_POST[first_name] = gppl
_POST[address_country_code] = CA
_POST[address_name] = gppl Simard's Test Store
_POST[notify_version] = 3.7
_POST[custom] = 
_POST[payer_status] = verified
_POST[address_country] = Canada
_POST[address_city] = Toronto
_POST[quantity] = 1
_POST[verify_sign] = An5ns1Kso7MWUdW4ErQKJJJ4qi4-AjAXF3KMNcb6G83Jslw18dw.Ti32
_POST[payer_email] = 78h23d8712h3d@x.com
_POST[txn_id] = 2KU491796R824634N
_POST[payment_type] = instant
_POST[payer_business_name] = gppl x's Test Store
_POST[last_name] = Simard
_POST[address_state] = Ontario
_POST[receiver_email] = x@x.x
_POST[pending_reason] = unilateral
_POST[txn_type] = web_accept
_POST[item_name] = 926537
_POST[mc_currency] = CAD
_POST[item_number] = 
_POST[residence_country] = CA
_POST[test_ipn] = 1
_POST[handling_amount] = 0.00
_POST[transaction_subject] = 926537
_POST[payment_gross] = 
_POST[shipping] = 0.00
_POST[ipn_track_id] = c7dcef0b1c333