Пример #1
0
        public void getpayment(payment pay, user u)
        {
            int        i    = pay.geti();
            BigInteger temp = pay.getci();

            vtb.AppendText("Received payment of " + i + "$ from user: "******" !\n");
            for (int j = i; j > 0; j--)
            {
                temp = hashf.hash(temp.ToString());
            }
            if (temp == lastpay.getci())
            {
                i      += lastpay.geti();
                lastpay = new payment(pay.getci(), i);
                vtb.AppendText("\tPayment approved, message sent !\n");
                u.payconfirm(true, this, 0);
            }
            else
            {
                vtb.AppendText("\tPayment failed, message sent !\n");
                u.payconfirm(false, this, i);
            }
        }