我需要一个用于 codeigniter 的 paypal 库(无需重定向到 paypal 站点),我使用了 angell eye paypal 库,但它有一些问题。
如果您对我应该使用哪个库有任何建议,但我不想重定向到 Paypal 网站。我有用户名、密码和签名。
这是我的代码
$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;
谢谢
最佳答案
尝试 CI-Merchant支付API
因为你需要使用 PayPal Website Payments Pro
编辑:
$this->load->library('merchant');
$this->merchant->load('paypal_pro');
快速结帐会将您带到 Paypal 网站进行付款。 Paypal pro 将在您的服务器中处理付款。
** 确保您在测试/生产服务器(可公开访问)但不是本地机器
中运行代码关于codeigniter - 用于 codeigniter 的 Paypal API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19514884/