function validateAndGetPurchaseTokens(address _owner, address _address, uint256 _moneyAmount) public view returns (uint256) {
        uint256 _tokens = _moneyAmount * store.getSetting("multiplier") / store.getSetting("tokenPrice");
        uint256 _purchaseTimeout = store.getSetting("purchaseTimeout");
        uint256 _purchaseCap = store.getSetting("purchaseCap");

        require((_purchaseTimeout <= 0) || (block.timestamp - datesOfPurchase[_address] > _purchaseTimeout));
        require(_tokens > 0);
        require(store.getBalance(_owner) >= _tokens);
        require((_purchaseCap <= 0) || (_tokens <= _purchaseCap));

        return _tokens;
    }