function receiveApproval(address _sender, uint256 _value, address _token, bytes _extraData) 
        external
        whenNotPaused 
    {
        require(msg.sender == address(ttcToken));
        require(_extraData.length == 21);
        (address toAddr, uint256 lotteryCount) = _getExtraParam(_extraData);
        require(ttcToken.transferFrom(_sender, address(this), _value));
        if (lotteryCount == 1) {
            _lottery(_value, toAddr, _sender);
        } else if(lotteryCount == 5) {
            _lottery5(_value, toAddr, _sender);
        } else {
            require(false, "Invalid lottery count");
        }
    }