public string MakePurchase(double Dollars, double LtcPurchaseAmount /*,ClientLtcWalletAddress*/) { // Create a OctagonWallet Object OctagonWallet wallet = new OctagonWallet(); // Get Litecoin Balance in the wallet var LtcWalletBalance = wallet.GetLtcAvailable(); // Withdraw money from the bank equal to the purchase BankWithdrawal Withdrawal = new BankWithdrawal(Dollars.ToString()); // Make purchase BuyLTC purchase = new BuyLTC(LtcPurchaseAmount); // While LTC's are not available in wallet, keep cheking until it's available in order to make a transfer while (Double.Parse(LtcWalletBalance) < LtcPurchaseAmount) { LtcWalletBalance = wallet.GetLtcAvailable(); } // Make transfer to user's wallet from octagon's wallet // Create a EtherTransfer Object LitecoinTransfer signature = new LitecoinTransfer(LtcPurchaseAmount /*, ClientEthWalletAddress */); // View Result. ID if Successful, Error if not return(purchase.getResponseString()); }
public string MakePurchase() { // Create a BuyLTC Object BuyLTC purchase = new BuyLTC(); // View Result. ID if Successful, Error if not return(purchase.getResponseString()); }