Codeigniter 没有输出

Codeigniter 没有输出,codeigniter,paypal,ci-merchant,Codeigniter,Paypal,Ci Merchant,我正在尝试使用CI Merchant library作为codeignator 这是我的密码: $this->load->library('merchant'); $this->merchant->load('paypal_express'); $settings = array( 'username' => 'api.sandbox.paypal.com', 'password' => 'AQHaXxDW3dl

我正在尝试使用CI Merchant library作为codeignator 这是我的密码:

$this->load->library('merchant');
    $this->merchant->load('paypal_express');
    $settings = array(
        'username' => 'api.sandbox.paypal.com',
        'password' => 'AQHaXxDW3dlKDRDJ7lDtGr4w8-reNNfvPFUKmEr9npMzYjZ2WIbfqqI3VL2C',
        'signature' => 'EMbUfhBCqBZw8hhH6q8VZT_53-xwoOs6_lotS68I7qrY5iyHPLgDitrsAZj5',
        'test_mode' => true);
    $this->merchant->initialize($settings);
    $params = array(
        'amount' => 100.00,
        'currency' => 'USD',
        'return_url' => 'https://www.example.com/checkout/payment_return/123',
        'cancel_url' => 'https://www.example.com/checkout');
    $response = $this->merchant->purchase($params);
    echo '<pre>';
    print_r($response);
    echo '</pre>';
当我在服务器上运行时,会得到一个空白页
那么我做错了什么呢?

看起来您的代码设置为使用证书而不是签名方法,但是您的服务器没有安装SSL证书并配置为与PayPal一起工作,这确实是一种很难处理的问题。我建议你改用签名法,这样你就不必再搞砸了

我不熟悉你正在使用的库,但一定有办法设置它。你也可以看看我自己的,很受欢迎的

实际上,我已经停止了对特定于CI的库的维护,因为我现在已经为PHP5.3+更新了我的general,并与Composer/Packagist一起工作,这允许您在CodeIgniter或任何其他框架中使用它

到今天为止,特定于CI的库并不落后,但我不再更新它了。我现在只维护通用版本,因为它可以在任何地方使用


无论如何,它使每个PayPal API调用对您来说都非常简单。

您为什么要在新项目中使用CI Merchant?很早以前它就被Omnipay取代了,自述文件甚至说:)谢谢你回答我,我会尝试这个库并反馈给你
    Merchant_response Object
(
[_status:protected] => failed
[_message:protected] => error setting certificate verify locations:
CAfile: C:\xampp\htdocs\egyptianornaments\application\config/cacert.pem
CApath: none
[_reference:protected] => 
[_data:protected] => 
[_redirect_url:protected] => 
[_redirect_method:protected] => GET
[_redirect_message:protected] => 
[_redirect_data:protected] => 
)