public static BigInteger[] getPayAmounts(byte[][] payIds, BigInteger lastPayResolveDeadline)
        {
            BasicMethods.assert(BasicMethods._isByte32s(payIds), "payIds invalid");
            BasicMethods.assert(lastPayResolveDeadline >= 0, "lastPayResolveDeadline less than zero");

            BigInteger[] amounts = new BigInteger[payIds.Length];
            BigInteger   now     = Blockchain.GetHeight();

            for (var i = 0; i < payIds.Length; i++)
            {
                byte[]  payInfoBs = Storage.Get(Storage.CurrentContext, PayInfoPrefix.Concat(payIds[i]));
                PayInfo payInfo   = new PayInfo();
                if (payInfoBs.Length > 0)
                {
                    payInfo = Helper.Deserialize(payInfoBs) as PayInfo;
                }
                if (payInfo.resolveDeadline == 0)
                {
                    BasicMethods.assert(now > lastPayResolveDeadline, "payment is not finalized");
                }
                else
                {
                    BasicMethods.assert(now > payInfo.resolveDeadline, "payment is not finalized");
                }
                amounts[i] = payInfo.amount;
            }
            return(amounts);
        }