我使用此API通过Steam在PHP中发送交易优惠:https://github.com/halipso/php-steam-tradeoffers
但是当我尝试执行发送交易要约的功能时,我收到此错误:
错误:SSL证书问题:无法获取本地颁发者证书
我下载cacert.pem,把它放在我的localhost文件夹中,然后我编辑php.ini,没有,错误仍然出现。我使用WampServer。
我使用的代码:
require_once 'classes/steam.class.php';
function SendTradeOffer()
{
$steam = new SteamTrade();
$steam->setup
(
'MTA3MTU3Mxxxxxx', // session id value here
'sessionid=MTA3MTU3Mxxxxxx; steamLoginSecure=765611983077xxxxx%7c%7c23106D08073F26A02FE0B7EDC63F31xxxxxxxx' // cookieID
);
$invent = array
(
'contextId' => 2,
'appId' => 570,
'tradableOnl' => true
);
$item = [];
$itemThem = [['contextId' => 2,
'appId' => 730,
'amount' => 1,
'assetid' => "6576025395"]];
$trade = [
'partnerSteamId' => "76561xxxxxxxx",
'itemsFromMe' => $item,
'itemsFromThem' => $itemThem,
'message' => 'gimme'];
}