public IPortal PayWithBitcoin(Action <BitcoinInvoice> paymentCallback) { Thread.Sleep(_sleepInterval); Console.WriteLine($"pay with bitcoin"); var invoice = new BitcoinInvoice { BitcoinAddress = Guid.NewGuid().ToString(), BtcPrice = 1, FiatPrice = 700 }; paymentCallback(invoice); return(this); }
public IPortal PayWithBitcoin(Action <BitcoinInvoice> paymentCallback) { driver.FindElement(By.CssSelector("img.pay-with-btc")).Click(); driver.FindElement(By.Id("copy-tab")).Click(); var elem = driver.FindElement(By.CssSelector("div.manual-box__address__wrapper__value")); var bitcoinAddress = elem.Text; var btcPrice = driver.FindElement(By.CssSelector("div.single-item-order__right__btc-price")).Text; var fiatPrice = driver.FindElement(By.CssSelector("div.single-item-order__right__fiat-price")).Text; var invoice = new BitcoinInvoice { BitcoinAddress = bitcoinAddress, BtcPrice = Convert.ToDecimal(btcPrice), FiatPrice = Convert.ToDecimal(fiatPrice) }; paymentCallback(invoice); return(this); }