public function getConfirmationTradeOfferId(Confirmation $confirmation)
    {
        $url = 'https://steamcommunity.com/mobileconf/details/' . $confirmation->getConfirmationId() . '?' . $this->generateConfirmationQueryParams('details');
        $response = '';
        try {
            $response = $this->mobileAuth->steamCommunity()->cURL($url);
        } catch (\Exception $ex) {

        }
        if (!empty($response)) {
            $json = json_decode($response, true);
            if (isset($json['success']) && $json['success']) {
                $html = $json['html'];
                if (preg_match('/<div class="tradeoffer" id="tradeofferid_(\d+)" >/', $html, $matches)) {
                    return $matches[1];
                }
            }
        }
        return '0';
    }
public function getConfirmationTradeOfferId(Confirmation $confirmation)
    {
        $url = 'https://steamcommunity.com/mobileconf/details/' . $confirmation->getConfirmationId() . '?' . $this->generateConfirmationQueryParams('details');
        $response = '';
        try {
            $response = $this->mobileAuth->steamCommunity()->cURL($url);
        } catch (\Exception $ex) {

        }
        if (!empty($response)) {
            $json = json_decode($response, true);
            if (isset($json['success']) && $json['success']) {
                $html = $json['html'];
                if (preg_match('/<div class="tradeoffer" id="tradeofferid_(\d+)" >/', $html, $matches)) {
                    return $matches[1];
                }
            }
        }
        return '0';
    }
public function getConfirmationTradeOfferId ( Confirmation $ confirmation ) { $ url = 'https://steamcommunity.com/mobileconf/details/' . $ confirmation -> getConfirmationId ( ) . '?' . $ this -> generateConfirmationQueryParams ( 'details' ) ; $ response = '' ; try { $ response = $ this -> mobileAuth -> steamCommunity ( ) -> cURL ( $ url ) ; } catch ( \ Exception $ ex ) { } if ( ! empty ( $ response ) ) { $ json = json_decode ( $ response , true ) ; if ( isset ( $ json [ 'success' ] ) && $ json [ 'success' ] ) { $ html = $ json [ 'html' ] ; if ( preg_match ( '/<div class="tradeoffer" id="tradeofferid_(\d+)" >/' , $ html , $ matches ) ) { return $ matches [ 1 ] ; } } } return '0' ; }
Get the trade offer ID of a confirmation. May need to retry more than once due to Steam occasionally failing to load the trade page.
@param Confirmation $confirmation
@return string
Get the trade offer ID of a confirmation . May need to retry more than once due to Steam occasionally failing to load the trade page .