我在使用 Codeigniter 开发的一个应用程序中使用 ci-marchant。我的环境配置是:
Codeigniter 版本:2.1.4 PHP 版本:5.4.12 cURL 已启用
我写了以下代码:
$this->load->helper('language');
$this->load->library('merchant');
$this->merchant->load('paypal_express');
$settings = $this->merchant->default_settings();
$this->merchant->initialize($settings);
$params = array(
'amount' => 100.00,
'currency' => 'USD',
'return_url' => base_url().'payment',
'cancel_url' => base_url().'payment');
$response = $this->merchant->purchase_return($params);
默认设置为:
'username' => 'a****_api1.*******.com',
'password' => 'Y9V***YSBE4',
'signature' => 'AFcWxV****v3bYYYRCpSSRl31Ar5*****47c*****x0***4XEB',
'test_mode' => TRUE,
'solution_type' => array('type' => 'select', 'default' => 'Sole', 'options' => array(
'Sole' => 'merchant_solution_type_sole',
'Mark' => 'merchant_solution_type_mark')),
'landing_page' => array('type' => 'select', 'default' => 'Billing', 'options' => array(
'Billing' => 'merchant_landing_page_billing',
'Login' => 'merchant_landing_page_login'))
但它给了我以下结果:
protected '_status' => string 'failed' (length=6)
protected '_message' => string 'Security header is not valid' (length=28)
protected '_reference' => null
protected '_data' => null
protected '_redirect_url' => null
protected '_redirect_method' => string 'GET' (length=3)
protected '_redirect_message' => null
protected '_redirect_data' => null
如何解决安全标头无效问题?
提前致谢。