Where a contract is frustrated and a party to the contract has paid money to another person (whether or not a party to the contract) as, or as part of, an agreed return for performance of the contract by another party (whether or not that other party is the person to whom the payment was made and whether or not there has been any such performance) that other party shall pay the same amount of money to the party who made the payment.