0

我正在使用 BigCommerce PHP API,当它尝试连接到我的商店或 webdav 商店时收到此错误:

设置密码列表失败

从同一台服务器,我通过命令行使用 cURL 连接到两个站点。我安装了启用 SSL 的 cURL php 模块。任何想法将不胜感激。

4

3 回答 3

0

我们使用基于以下内容的对象

<?php
// provision for laziness
if( 
    (array_key_exists('store_url', (array)$settings)) &&
    (array_key_exists('username', $settings)) && 
    (array_key_exists('api_key', $settings)) 
) {
    // Config Basic
    BC::configure(
        array(
            'store_url' => $settings['store_url'],
            'username'  => $settings['username'],
            'api_key'   => $settings['api_key']
        )
    );

    // Set Cipher if needed
    if(array_key_exists('cipher',$settings)) {
        BC::setCipher('RC4-SHA');
    } else {
        BC::verifyPeer(false);
    }

    // Set Proxy if needed
    if(array_key_exists('proxy',$settings)) {
        BC::useProxy($settings['proxy']['url'], $settings['proxy']['port']);
    }
}
// Run your code here...
于 2013-09-11T20:49:17.877 回答
0

我正在使用 wamp 并测试了这个。

为了解决这个问题,我更新了连接 api 文件

curl_setopt($this->curl, CURLOPT_SSL_VERIFYPEER, 1); curl_setopt($this->curl, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($this->curl, CURLOPT_CAINFO, 'C:\xampp\htdocs\big\Bigcommerce\Certs\cacert.pem');

和文件来自

http://curl.haxx.se/docs/caextract.html

于 2013-02-01T21:18:36.960 回答
0

我认为您必须启用“rsa_rc4_128_sha”密码。默认情况下它可能未启用。你能试一下吗

Connection::setCipher() 

在提出请求之前?默认情况下,这会将密码设置为默认密码。

在 BC github repos 中有一些关于此的历史 -

https://github.com/bigcommerce/bigcommerce-api-php/pull/10

https://github.com/bigcommerce/bigcommerce-api-php/pull/11

希望这可以帮助。

于 2013-01-24T22:46:13.620 回答