2015-11-01 61 views
-2

我有貝寶形式,將有ipn通知網址。我已經安裝通知我的PayPal ipn設置中的網址。但它不會返回到我的網站。分析超過2天后。我發現我的控制器構造自己我檢查當前用戶會話是否存在?我應該刪除會話檢查構造不檢查會話。請告知這一點。 這是我的代碼。我正在使用codeigniter應用程序。如何處理我們網站上的paypal通知網址?

function __construct() { 
    parent::__construct(); 


    $this->load->model('user_model'); 
    // if (!isEmployee()) { 
//   redirect('information'); 
//   
//  } 
} 

function paypal_ipn(){ 


    $txn_id = $_POST['txn_id']; 
    $data = array("paypal_transaction_id"=>$txn_id); 
    $this->db->insert("payments",$data); 

    } 

我註釋掉現在

回答

0

通知網址是貝寶的即時付款通知(IPN)機制的一部分。該網址由PayPal調用以通知付款。它根本不是用戶會話的一部分,所以不要檢查它。

我建議你從這裏閱讀文檔並獲得例如: documentation IPN

相關問題