1

我需要一个用于 codeigniter 的贝宝库(无需重定向到贝宝网站),我使用了 angell eye 贝宝库,但它有一些问题。

如果您有任何建议我应该使用哪个库,但我不想重定向到贝宝网站。我有用户名、密码和签名。

这是我的代码

$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;

谢谢你

4

1 回答 1

1

试用CI-Merchant Payment API

因为您需要使用 PayPal Website Payments Pro

编辑:

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

快速结帐会将您带到 Paypal 网站进行付款。Paypal pro 将在您的服务器中处理付款。

** 确保您在测试/生产服务器(公共可访问)而不是本地机器上运行代码

于 2013-10-22T10:14:55.563 回答