我已經將貝寶與我的網站集成,但它確實需要付款,但它不會發送任何IPN到我的PHP文件,它應該更新我的數據庫.... 有代碼我一直使用: 調用paypal IPN不發送任何通知
session_start();
if($mode=='live')
{
$url=" https://www.paypal.com/cgi-bin/webscr";
$email="[email protected]";
$_SESSION['url']=$url;
$_SESSION['email']=$email;
$_SESSION['subtotal']=$subtotal;
}
else if($mode=='sandbox')
{
$url= "https://www.sandbox.paypal.com/cgi-bin/webscr";
$email="[email protected]";
$_SESSION['url']=$url;
$_SESSION['email']=$email;
$_SESSION['subtotal']=$subtotal;
}
?>
<form action="<?php echo $url; ?>" method="post">
<input type="hidden" name="cmd" value="_xclick"/>
<input type="hidden" name="business" value="<?php echo $email; ?>"/>
<input type="hidden" name="item_name" value="shopping cart"/>
<input type="hidden" name="currency_code" value="GBP"/>
<input type="hidden" name="amount" value="<?php echo $subtotal;?>"/>
<input type="hidden" name="return" value="<?php echo SITE_URL; ?>"/>
<input type="hidden" name="cancel_return" value="<?php echo SITE_URL."/shoppingCart.php" ?>"/>
<input type="hidden" name="notify_url" value="php url" />
<input type="hidden" name="rm" value="2"/>
<input type="hidden" name="custom" value="<?php echo $customer_ID;?>"/>
<input type="image" src="http://www.paypal.com/en_US/i/btn/x-click-but01.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"/>
</form>
和PHP代碼
從PHP IPN示例代碼.....
www.paypal.com>歷史> IPN歷史>這是什麼意思? (注意:如果您看不到「IPN歷史記錄」,請先通過配置文件>我的銷售工具>即時付款通知首選項啓用IPN。) – Robert 2012-02-20 14:23:33