contract PPTL_PrivateCrowdsale is  FinalizableCrowdsale, CappedCrowdsale, WhitelistedCrowdsale, AllowanceCrowdsale{
    using SafeMath for uint256;
    
    uint256 public bonusPercent;
    uint256 public minWeiAmount;
    
    /*
    function PPTokenCrowdsale(uint256 _openingTime, uint256 _closingTime, uint256 _rate, address _wallet, uint256 _cap, PPToken _token, uint256 _goal
    , address _bountyWallet, uint256 _bountyPercent, address _teamWallet, uint256 _teamPercent) public
        Crowdsale(_rate, _wallet, _token)
        CappedCrowdsale(_cap)
        TimedCrowdsale(_openingTime, _closingTime)
        RefundableCrowdsale(_goal)
      {
        //As goal needs to be met for a successful crowdsale
        //the value needs to less or equal than a cap which is limit for accepted funds
        require(_goal <= _cap);
        bountyWallet = _bountyWallet;
        bountyPercent = _bountyPercent;
        teamWallet = _teamWallet;
        teamPercent = _teamPercent;
        pptoken = _token;
      }
    */
    function PPTL_PrivateCrowdsale( PPToken _token) public
        Crowdsale(500, msg.sender, _token)//(_rate, _wallet, _token)
        CappedCrowdsale((4000 ether))
        TimedCrowdsale(1523836800, 1525564800)//(16 Apr 2018, 06 May 2018)
        AllowanceCrowdsale(msg.sender)
      {
        bonusPercent = 30;
        minWeiAmount = 100 ether;
      }
      
      function finalization() internal
      {
          wallet.transfer(this.balance);
          super.finalization();
      }
      //@dev override for get eth only after finalization
      function _forwardFunds() internal {
            
      }
      function _getTokenAmount(uint256 _weiAmount) internal returns (uint256) {
        uint256 tokens = super._getTokenAmount(_weiAmount);
        uint256 bonus = tokens.mul(bonusPercent).div(100);
        
        tokens = tokens.add(bonus);
        return tokens;
    }
    
    function _preValidatePurchase(address _beneficiary, uint256 _weiAmount) internal {
        super._preValidatePurchase(_beneficiary, _weiAmount);
        require(_weiAmount >= minWeiAmount);
    }
      
    
}
function _forwardFunds() internal {
            
}

//@dev override for get eth only after finalization