PayPal で ci-merchant を使用しようとしています。
ここに私のテストコントローラーがあります
class Test extends CI_Controller {
function paypal_express(){
$this->load->library('merchant');
$this->merchant->load('paypal_express');
$settings = array(
'username' => '***',
'password' => '***',
'signature' => '***',
'test_mode' => true);
$this->merchant->initialize($settings);
$params = array(
'amount' => 100.00,
'currency' => 'TRY',
'return_url' => site_url('test/paypal_express'),
'cancel_url' => site_url('test/paypal_express'));
$response = $this->merchant->purchase_return($params);
if ($response->success()){
echo 'ok';
}else{
$message = $response->message();
echo('Error processing payment: ' . $message);
exit;
}
}
}
site.dev/test/paypal_express を実行すると、
致命的なエラー: 192 行目の /var/www/ci/application/libraries/merchant.php の非オブジェクトに対するメンバー関数 set_params() の呼び出し
PHP バージョン: PHP 5.5.9-1ubuntu4.3 ci バージョン: 2.2