From 98a7153b7eeb3e13a47ea5449c170200631a7812 Mon Sep 17 00:00:00 2001 From: Ricardo Fiori Date: Wed, 9 Sep 2015 23:21:11 -0300 Subject: [PATCH] Implement Receive payment in wallet. --- BitcoinLib/BRL/Util_BRL.cs | 2 +- BitcoinLib/BitcoinLib.csproj | 1 + BitcoinLib/BlockchainAPI/Receive.cs | 27 +++++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 BitcoinLib/BlockchainAPI/Receive.cs diff --git a/BitcoinLib/BRL/Util_BRL.cs b/BitcoinLib/BRL/Util_BRL.cs index e371057..cf5a5f6 100644 --- a/BitcoinLib/BRL/Util_BRL.cs +++ b/BitcoinLib/BRL/Util_BRL.cs @@ -13,7 +13,7 @@ public static class Util_BRL const string currencySymbolBRL = "BRL"; /// - /// Pega o ticker da Blockchain com o valor em BRL. + /// Retorna o ticker da Blockchain com o valor em BRL. /// /// Código da API. /// Retorna Buy, Last, Price15m, Sell, Symbol diff --git a/BitcoinLib/BitcoinLib.csproj b/BitcoinLib/BitcoinLib.csproj index bde5e3f..b6837b0 100644 --- a/BitcoinLib/BitcoinLib.csproj +++ b/BitcoinLib/BitcoinLib.csproj @@ -51,6 +51,7 @@ + diff --git a/BitcoinLib/BlockchainAPI/Receive.cs b/BitcoinLib/BlockchainAPI/Receive.cs new file mode 100644 index 0000000..a39bfd8 --- /dev/null +++ b/BitcoinLib/BlockchainAPI/Receive.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Info.Blockchain.API.Receive; + +namespace BitcoinLib.BlockchainAPI +{ + /// + /// https://blockchain.info/api/api_receive + /// + public class Receive + { + /// + /// This method creates a unique address which should be presented to the customer. Any payments sent to this address will be forwarded to your own bitcoin address. Each time a payment is forwarded the callback URL will be called. + /// + /// Your Receiving Bitcoin Address. + /// The callback URL to be notified when a payment is received. Remember to URL. + /// API Code. + /// + public static ReceiveResponse ReceivePayments(string ReceiveAddress, string CallBackURL, string apiCode = null) + { + return Info.Blockchain.API.Receive.Receive.ReceiveFunds(ReceiveAddress, CallBackURL, apiCode); + } + } +}