[英]BigCommerce PHP API not connecting
我需要在与Bigcommerce的PHP代码连接中获得深入的了解,在此代码中,它的输出为“ startupmiddlemiddle1”,但无法输出产品。.非常感谢您的帮助..谢谢!
<?php
echo "start";
require 'bigcommerce-api-php-master/bigcommerce.php';
use Bigcommerce\Api\Client as Bigcommerce;
echo "up";
Bigcommerce::configure(array(
'store_url' => 'https://store-h9a8oj.mybigcommerce.com/',
'username' => 'admin',
'api_key' => 'xxxxxxxxxxxxxxxxxxxxxxx'
));
echo "middle";
Bigcommerce::setCipher('RC4-SHA');
Bigcommerce::verifyPeer(false);
echo "middle1";
$products = Bigcommerce::getProducts();
foreach($products as $product) {
echo $product->name;
echo $product->price;
}
echo "end";
?>
一切设置正确。 确保满足所有要求(php 5.3+,启用cUrl扩展),然后重试。 还要确保将所有文件从github复制到您的bigcommerce-api-php-master /目录中,而不仅仅是“ bigcommerce.php”文件中。
更改密码,可以使用rsa_rc4_128_sha代替RC4-SHA 。
// Bigcommerce::setCipher('RC4-SHA');
Bigcommerce::setCipher('rsa_rc4_128_sha');
希望它能工作:)
谢谢并恭祝安康,
阿尔帕W
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.