Under a bank guarantee a bank undertakes in writing to pay to the person specified in the guarantee a certain sum of money in compliance with the conditions provided therein.