我在用Codeigniter开发的应用程序中使用ci标记。我的环境配置是:
Codeigniter版本:2.1.4PHP版本: 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如何解决安全标头无效的问题?
提前谢谢。
发布于 2013-10-28 20:16:13
“安全标头无效”意味着您试图在测试模式下使用活动PayPal帐户,或者在活动模式下尝试使用测试PayPal帐户。
在您的例子中,由于您有test_mode => TRUE,我敢打赌您使用的是实时PayPal凭据,而不是从http://developer.paypal.com/获得的凭据
https://stackoverflow.com/questions/19633197
复制相似问题