Exemple #1
0
        private async Task <(string AckUrl, Guid Otc, string Password)> Pay(Pocket p, int amount, string pocketAckUrl, SimpleFilter filter = null)
        {
            int beforeCount = p.VoucherCount;

            (var otcPay, var pwd) = await _pos.RequestPayment(amount, pocketAckUrl, "https://example.org", filter, false);

            var ret = await p.PayWithRandomVouchers(otcPay, pwd);

            Assert.AreEqual(beforeCount - amount, p.VoucherCount);
            return(ret, otcPay, pwd);
        }
Exemple #2
0
        public async Task CreateSimplePayment()
        {
            var response = await _pos.RequestPayment(1, "https://example.org");

            Console.WriteLine("Payment {0} pwd {1}", response.OtcPay, response.Password);
        }