2013-10-22 23 views
1

我需要一個paypal的codeigniter庫(無需重定向到paypal網站),我使用了angell eye paypal庫,但它有一些問題。用於codeigniter的PayPal API

如果您有任何建議,我應該使用哪個庫,但我不想重定向到貝寶網站。我有用戶名,密碼和簽名。

這是我的代碼

$params = array(
'amount' => 100.00, 
'currency' => 'USD', 
'return_url' => 'https://www.example.com/checkout/payment_return/123', 
'cancel_url' => 'https://www.example.com/checkout'); 



$this->load->library('merchant'); 
$this->merchant->load('paypal_pro'); 
$this->load->helper('language'); 

$settings = array(
'username' => 'sandbo_1215254764_biz_api1.angelleye.com', 
'password' => '1215254774', 
'signature' => 'AiKZhEEPLJjSIccz.2M.tbyW5YFwAb6E3l6my.pY9br1z2qxKx96W18v', 
'test_mode' => true); 

$this->merchant->initialize($settings); 

$response = $this->merchant->purchase_return($params); 
print"<pre>"; 
print_r($response);die; 

謝謝

+0

如果您的問題得到解決。嘗試添加/接受答案。 – mrsrinivas

回答

1

嘗試CI-Merchant支付API

在你需要使用PayPal網站付款專業

編輯:

$this->load->library('merchant'); 
$this->merchant->load('paypal_pro'); 

快速退房將帶你到貝寶網站付款。 Paypal專業版將處理您的服務器中的付款。

**請確保您正在運行的代碼測試/生產服務器(公衆開放),但不本地機器

+0

在服務器中測試你的代碼。你不能在你的本地主機上做到這一點。 – mrsrinivas

+0

我在生產服務器上測試過它。 – user2870021