【问题标题】:get tradeofferId from one steam account but not from another steam account从一个 Steam 帐户而不是从另一个 Steam 帐户获取 tradeofferId
【发布时间】:2017-01-09 04:46:08
【问题描述】:

当我发送交易请求时,我在两个 Steam 帐户中都收到了“tradeofferid”的回复。 但是当我在 getoffers 列表请求中检查“tradeofferId”时,我只得到一个蒸汽帐户的“tradeofferid”。

我不明白这两个帐户有什么不同。两个帐户具有相同的设置,并且都是活动帐户。但是一个帐户的余额为零。

【问题讨论】:

    标签: php steam-web-api steamworks-api steam-condenser


    【解决方案1】:

    您需要根据要查看的优惠来修改查询。特别是IEconService/GetTradeOffers方法有以下两个参数:

    • get_sent_offers:设置为1以获取该帐户已发送的优惠
    • get_received_offers:设置为1 以获取帐户已收到的优惠。

    【讨论】:

    • 感谢您的回答。但我在这里说.. 我有一个网站帐户和两个用户帐户。我通过将资产发送到我的网站帐户来创建游戏,并通过第二个用户帐户加入游戏以将资产发送到我的网站帐户。然后通过 getoffers 请求获取报价列表,但是从第一个帐户生成的报价 ID 在列表中找不到...我已经设置了 get_sent_offers 并且 get_received_offers 为 1。
    • 您可能应该使用一些代码和 API 回复来更新您的问题。根据您的问题描述,没有多少人可以提供帮助。
    【解决方案2】:

    <?php 
    $url = 'https://steamcommunity.com/tradeoffer/new/send';
    	$data = array(
    		'sessionid' => $sessionId,
    		'serverid' => '1',
    		'partner' => '76561198316682086',
    		'tradeoffermessage' => 'test',
    		'trade_offer_create_params' => '{"trade_offer_access_token": "5xsvx0BF"}', 	
    		'json_tradeoffer' => '{"newversion":true,"version":2,"them":{"assets":[],"currency":[],"ready":false},"them":{"assets":[{"appid":730,"contextid":"2","amount":1,"assetid":"8606185394"},{"appid":730,"contextid":"2","amount":1,"assetid":"8606185369"}],"currency":[],"ready":false}}'
    	);
    	$c = curl_init();
    	curl_setopt($c, CURLOPT_HEADER, false);
    	curl_setopt($c, CURLOPT_NOBODY, false);
    	curl_setopt($c, CURLOPT_URL, $url);
    	curl_setopt($c, CURLOPT_SSL_VERIFYHOST, 0);
    	curl_setopt($c, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)");
    	curl_setopt($c, CURLOPT_COOKIE, $cookies);
    	curl_setopt($c,enter code here CURLOPT_POST, 1);
    	curl_setopt($c, CURLOPT_POSTFIELDS, http_build_query($data));
    	curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
    	curl_setopt($c, CURLOPT_HTTPHEADER, array('Referer: https://steamcommunity.com/tradeoffer/new/?partner=356416358&token=5xsvx0BF'));
    	curl_setopt($c, CURLOPT_SSL_VERIFYPEER, 0);
    	curl_setopt($c, CURLOPT_FOLLOWLOCATION, 1);
    	curl_setopt($c, CURLOPT_CUSTOMREQUEST, strtoupper('POST'));
    	$response = curl_exec($c);
    	curl_close($c);
    	echo $response;
    
    //get offerid in response.  {"tradeofferid":12345..}
    //but not found that offerid in getoffers
    $getOffers = array(
    		"get_received_offers"=>'1',
    		"get_sent_offers"=>'1',
    		//"active_only"=>'1',
    	);
    	$getoffersData = array();
    	$getoffersData = $steam->getOffers($getOffers);
    	echo "<pre>";print_r($getoffersData);	
    
    ?>

    【讨论】:

      猜你喜欢
      • 2016-09-29
      • 2011-09-01
      • 1970-01-01
      • 1970-01-01
      • 2022-11-25
      • 2019-06-09
      • 2016-03-26
      • 1970-01-01
      • 2022-11-15
      相关资源
      最近更新 更多