diff --git a/BitPay.sln b/BitPay.sln
index addd829..d1d8f31 100644
--- a/BitPay.sln
+++ b/BitPay.sln
@@ -20,6 +20,7 @@ Global
{D88A49C3-0280-4320-B120-AE519B2DB219}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D88A49C3-0280-4320-B120-AE519B2DB219}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D88A49C3-0280-4320-B120-AE519B2DB219}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D88A49C3-0280-4320-B120-AE519B2DB219}.Release|Any CPU.Build.0 = Release|Any CPU
{2FCA393C-BD09-4740-ADB5-C4293C9F823D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2FCA393C-BD09-4740-ADB5-C4293C9F823D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2FCA393C-BD09-4740-ADB5-C4293C9F823D}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -29,7 +30,6 @@ Global
{70047B2C-381E-458B-B76C-940120AE0E08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{70047B2C-381E-458B-B76C-940120AE0E08}.Debug|Any CPU.Build.0 = Debug|Any CPU
{70047B2C-381E-458B-B76C-940120AE0E08}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {70047B2C-381E-458B-B76C-940120AE0E08}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/BitPay/BitPay.cs b/BitPay/BitPay.cs
index 4ebb4fa..d7f12d3 100644
--- a/BitPay/BitPay.cs
+++ b/BitPay/BitPay.cs
@@ -21,8 +21,8 @@
/**
* @author Antonio Buedo
- * @date 20.03.2020
- * @version 3.3.2003
+ * @date 19.04.2021
+ * @version 4.0.2104
*
* See bitpay.com/api for more information.
*/
diff --git a/BitPay/BitPay.csproj b/BitPay/BitPay.csproj
index 77de023..7127aff 100644
--- a/BitPay/BitPay.csproj
+++ b/BitPay/BitPay.csproj
@@ -5,10 +5,10 @@
net452;net46;net461;net462;net47;net471;net472;netstandard2.0;netcoreapp2.0;netcoreapp2.1;netcoreapp2.2
latest
- 3.3.2003.0
- 3.3.2003
- 3.3.2003
- 3.3.2003
+ 4.0.2104.0
+ 4.0.2104
+ 4.0.2104
+ 4.0.2104
Antonio Buedo
BitPay Inc.
BitPay, Inc.
@@ -48,8 +48,8 @@
-
-
+
+
diff --git a/BitPay/Env.cs b/BitPay/Env.cs
index 80f9728..ee8e28b 100644
--- a/BitPay/Env.cs
+++ b/BitPay/Env.cs
@@ -7,9 +7,9 @@ public class Env
public const string TestUrl = "https://test.bitpay.com/";
public const string ProdUrl = "https://bitpay.com/";
public const string BitpayApiVersion = "2.0.0";
- public const string BitpayPluginInfo = "BitPay_DotNet_Client_v3.3.2003";
+ public const string BitpayPluginInfo = "BitPay_DotNet_Client_v4.0.2104";
public const string BitpayApiFrame = "custom";
- public const string BitpayApiFrameVersion = "1.0.0";
+ public const string BitpayApiFrameVersion = "2.0.0";
public class Tokens
{
public string Merchant { get; set; }
diff --git a/BitPay/Models/Invoice/Invoice.cs b/BitPay/Models/Invoice/Invoice.cs
index d5fb25d..90d04b8 100644
--- a/BitPay/Models/Invoice/Invoice.cs
+++ b/BitPay/Models/Invoice/Invoice.cs
@@ -144,51 +144,6 @@ public dynamic RefundAddresses
public RefundInfo RefundInfo { get; set; }
- private PaymentCodes _paymentCodes = null; //TODO remove on version 4.0
-
- [Obsolete("PaymentCodes will be deprecated on version 4.0", false)]
- public PaymentCodes PaymentCodes
- {
- get => _paymentCodes;
- set => _paymentCodes = null;
- }
-
- private PaymentTotal _paymentSubtotals = null; //TODO remove on version 4.0
-
- [Obsolete("PaymentSubtotals will be deprecated on version 4.0", false)]
- public PaymentTotal PaymentSubtotals
- {
- get => _paymentSubtotals;
- set => _paymentSubtotals = null;
- }
-
- private PaymentTotal _paymentTotals = null; //TODO remove on version 4.0
-
- [Obsolete("PaymentTotals will be deprecated on version 4.0", false)]
- public PaymentTotal PaymentTotals
- {
- get => _paymentTotals;
- set => _paymentTotals = null;
- }
-
- private PaymentTotal _paymentDisplayTotals = null; //TODO remove on version 4.0
-
- [Obsolete("PaymentDisplayTotals will be deprecated on version 4.0", false)]
- public PaymentTotal PaymentDisplayTotals
- {
- get => _paymentDisplayTotals;
- set => _paymentDisplayTotals = null;
- }
-
- private PaymentTotal _paymentDisplaySubTotals = null; //TODO remove on version 4.0
-
- [Obsolete("PaymentDisplaySubTotals will be deprecated on version 4.0", false)]
- public PaymentTotal PaymentDisplaySubTotals
- {
- get => _paymentDisplaySubTotals;
- set => _paymentDisplaySubTotals = null;
- }
-
public double AmountPaid { get; set; }
public dynamic ExchangeRates
diff --git a/BitPay/Models/Invoice/PaymentCode.cs b/BitPay/Models/Invoice/PaymentCode.cs
deleted file mode 100644
index 9d56db2..0000000
--- a/BitPay/Models/Invoice/PaymentCode.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using System;
-
-namespace BitPaySDK.Models.Invoice
-{
- [Obsolete("PaymentCode will be deprecated on version 4.0", false)] //TODO remove on version 4.0
- public class PaymentCode
- {
- public string Bip72b { get; set; }
- public string Bip73 { get; set; }
- public string Eip681 { get; set; }
- public string Eip681b { get; set; }
- }
-}
\ No newline at end of file
diff --git a/BitPay/Models/Invoice/PaymentCodes.cs b/BitPay/Models/Invoice/PaymentCodes.cs
deleted file mode 100644
index 0682de8..0000000
--- a/BitPay/Models/Invoice/PaymentCodes.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System;
-
-namespace BitPaySDK.Models.Invoice
-{
- [Obsolete("PaymentCodes will be deprecated on version 4.0", false)] //TODO remove on version 4.0
- public class PaymentCodes
- {
- public PaymentCode Btc { get; set; }
- public PaymentCode Bch { get; set; }
- public PaymentCode Eth { get; set; }
- public PaymentCode Usdc { get; set; }
- public PaymentCode Gusd { get; set; }
- public PaymentCode Pax { get; set; }
- }
-}
\ No newline at end of file
diff --git a/BitPay/Models/Invoice/PaymentTotal.cs b/BitPay/Models/Invoice/PaymentTotal.cs
deleted file mode 100644
index 7783ba0..0000000
--- a/BitPay/Models/Invoice/PaymentTotal.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System;
-
-namespace BitPaySDK.Models.Invoice
-{
- [Obsolete("PaymentTotal will be deprecated on version 4.0", false)] //TODO remove on version 4.0
- public class PaymentTotal
- {
- public double Btc { get; set; }
- public double Bch { get; set; }
- public double Eth { get; set; }
- public double Usdc { get; set; }
- public double Gusd { get; set; }
- public double Pax { get; set; }
- }
-}
\ No newline at end of file
diff --git a/BitPaySetup/BitPaySetup.csproj b/BitPaySetup/BitPaySetup.csproj
index 553e3cd..36dbcf4 100644
--- a/BitPaySetup/BitPaySetup.csproj
+++ b/BitPaySetup/BitPaySetup.csproj
@@ -40,44 +40,49 @@
-
- ..\packages\BitPay.3.0.1907\lib\net462\BitPay.dll
+
+ ..\packages\BitPay.4.0.2104\lib\net472\BitPay.dll
True
..\packages\BouncyCastle.1.8.5\lib\BouncyCastle.Crypto.dll
True
-
- ..\packages\Microsoft.Extensions.Configuration.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll
+
+ ..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll
True
-
- ..\packages\Microsoft.Extensions.Configuration.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll
+
+
+ ..\packages\Microsoft.Extensions.Configuration.5.0.0\lib\net461\Microsoft.Extensions.Configuration.dll
True
-
- ..\packages\Microsoft.Extensions.Configuration.FileExtensions.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.FileExtensions.dll
+
+ ..\packages\Microsoft.Extensions.Configuration.Abstractions.5.0.0\lib\net461\Microsoft.Extensions.Configuration.Abstractions.dll
True
-
- ..\packages\Microsoft.Extensions.Configuration.Json.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Json.dll
+
+ ..\packages\Microsoft.Extensions.Configuration.FileExtensions.5.0.0\lib\net461\Microsoft.Extensions.Configuration.FileExtensions.dll
True
-
- ..\packages\Microsoft.Extensions.FileProviders.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.Extensions.FileProviders.Abstractions.dll
+
+ ..\packages\Microsoft.Extensions.Configuration.Json.5.0.0\lib\net461\Microsoft.Extensions.Configuration.Json.dll
True
-
- ..\packages\Microsoft.Extensions.FileProviders.Physical.2.2.0\lib\netstandard2.0\Microsoft.Extensions.FileProviders.Physical.dll
+
+ ..\packages\Microsoft.Extensions.FileProviders.Abstractions.5.0.0\lib\net461\Microsoft.Extensions.FileProviders.Abstractions.dll
True
-
- ..\packages\Microsoft.Extensions.FileSystemGlobbing.2.2.0\lib\netstandard2.0\Microsoft.Extensions.FileSystemGlobbing.dll
+
+ ..\packages\Microsoft.Extensions.FileProviders.Physical.5.0.0\lib\net461\Microsoft.Extensions.FileProviders.Physical.dll
True
-
- ..\packages\Microsoft.Extensions.Primitives.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll
+
+ ..\packages\Microsoft.Extensions.FileSystemGlobbing.5.0.0\lib\net461\Microsoft.Extensions.FileSystemGlobbing.dll
+ True
+
+
+ ..\packages\Microsoft.Extensions.Primitives.5.0.0\lib\net461\Microsoft.Extensions.Primitives.dll
True
@@ -86,23 +91,48 @@
True
-
- ..\packages\System.Buffers.4.4.0\lib\netstandard2.0\System.Buffers.dll
+
+ ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll
True
+
-
- ..\packages\System.Memory.4.5.1\lib\netstandard2.0\System.Memory.dll
+
+ ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll
True
-
- ..\packages\System.Numerics.Vectors.4.4.0\lib\net46\System.Numerics.Vectors.dll
+
+ ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll
+ True
+
+
+ ..\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll
+ True
+
+
+ ..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll
+ True
+
+
+ ..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net463\System.Security.Cryptography.Algorithms.dll
+ True
+
+
+ ..\packages\System.Text.Encodings.Web.5.0.0\lib\net461\System.Text.Encodings.Web.dll
+ True
+
+
+ ..\packages\System.Text.Json.5.0.0\lib\net461\System.Text.Json.dll
+ True
+
+
+ ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll
True
-
- ..\packages\System.Runtime.CompilerServices.Unsafe.4.5.1\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll
+
+ ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll
True
diff --git a/BitPaySetup/packages.config b/BitPaySetup/packages.config
index 03356cb..4f53073 100644
--- a/BitPaySetup/packages.config
+++ b/BitPaySetup/packages.config
@@ -1,25 +1,31 @@
-
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/BitPayUnitTest/BitPayTest.cs b/BitPayUnitTest/BitPayTest.cs
index aa0d765..ba18dd5 100644
--- a/BitPayUnitTest/BitPayTest.cs
+++ b/BitPayUnitTest/BitPayTest.cs
@@ -263,8 +263,8 @@ public async Task TestShouldSubmitPayoutBatch() {
var effectiveDate = threeDaysFromNow;
var currency = Currency.USD;
var instructions = new List() {
- new PayoutInstruction(100.0, "mtHDtQtkEkRRB5mgeWpLhALsSbga3iZV6u"),
- new PayoutInstruction(200.0, "mvR4Xj7MYT7GJcL93xAQbSZ2p4eHJV5F7A")
+ new PayoutInstruction(100.0, RecipientReferenceMethod.EMAIL, "sandbox+recipient1@bitpay.com"),
+ new PayoutInstruction(100.0, RecipientReferenceMethod.EMAIL, "sandbox+recipient1@bitpay.com")
};
var batch = new PayoutBatch(currency, effectiveDate, instructions);
@@ -283,8 +283,8 @@ public async Task TestShouldSubmitGetAndDeletePayoutBatch() {
var effectiveDate = threeDaysFromNow;
var currency = Currency.USD;
var instructions = new List() {
- new PayoutInstruction(100.0, "mtHDtQtkEkRRB5mgeWpLhALsSbga3iZV6u"),
- new PayoutInstruction(200.0, "mvR4Xj7MYT7GJcL93xAQbSZ2p4eHJV5F7A")
+ new PayoutInstruction(100.0, RecipientReferenceMethod.EMAIL, "sandbox+recipient1@bitpay.com"),
+ new PayoutInstruction(100.0, RecipientReferenceMethod.EMAIL, "sandbox+recipient1@bitpay.com")
};
var batch0 = new PayoutBatch(currency, effectiveDate, instructions);
diff --git a/BitPayUnitTest/BitPayUnitTest.csproj b/BitPayUnitTest/BitPayUnitTest.csproj
index 5a55c6a..746816c 100644
--- a/BitPayUnitTest/BitPayUnitTest.csproj
+++ b/BitPayUnitTest/BitPayUnitTest.csproj
@@ -1,6 +1,6 @@
-
+
Debug
AnyCPU
@@ -43,46 +43,51 @@
..\packages\BouncyCastle.1.8.3.1\lib\BouncyCastle.Crypto.dll
- ..\packages\Castle.Core.4.3.1\lib\net45\Castle.Core.dll
+ ..\packages\Castle.Core.4.4.0\lib\net45\Castle.Core.dll
True
-
- ..\packages\log4net.2.0.8\lib\net45-full\log4net.dll
+
+ ..\packages\log4net.2.0.12\lib\net45\log4net.dll
+ True
+
+
+ ..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll
+ True
-
- ..\packages\Microsoft.Extensions.Configuration.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll
+
+ ..\packages\Microsoft.Extensions.Configuration.5.0.0\lib\net461\Microsoft.Extensions.Configuration.dll
True
-
- ..\packages\Microsoft.Extensions.Configuration.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll
+
+ ..\packages\Microsoft.Extensions.Configuration.Abstractions.5.0.0\lib\net461\Microsoft.Extensions.Configuration.Abstractions.dll
True
-
- ..\packages\Microsoft.Extensions.Configuration.FileExtensions.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.FileExtensions.dll
+
+ ..\packages\Microsoft.Extensions.Configuration.FileExtensions.5.0.0\lib\net461\Microsoft.Extensions.Configuration.FileExtensions.dll
True
-
- ..\packages\Microsoft.Extensions.Configuration.Json.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Json.dll
+
+ ..\packages\Microsoft.Extensions.Configuration.Json.5.0.0\lib\net461\Microsoft.Extensions.Configuration.Json.dll
True
-
- ..\packages\Microsoft.Extensions.FileProviders.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.Extensions.FileProviders.Abstractions.dll
+
+ ..\packages\Microsoft.Extensions.FileProviders.Abstractions.5.0.0\lib\net461\Microsoft.Extensions.FileProviders.Abstractions.dll
True
-
- ..\packages\Microsoft.Extensions.FileProviders.Physical.2.2.0\lib\netstandard2.0\Microsoft.Extensions.FileProviders.Physical.dll
+
+ ..\packages\Microsoft.Extensions.FileProviders.Physical.5.0.0\lib\net461\Microsoft.Extensions.FileProviders.Physical.dll
True
-
- ..\packages\Microsoft.Extensions.FileSystemGlobbing.2.2.0\lib\netstandard2.0\Microsoft.Extensions.FileSystemGlobbing.dll
+
+ ..\packages\Microsoft.Extensions.FileSystemGlobbing.5.0.0\lib\net461\Microsoft.Extensions.FileSystemGlobbing.dll
True
-
- ..\packages\Microsoft.Extensions.Primitives.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll
+
+ ..\packages\Microsoft.Extensions.Primitives.5.0.1\lib\net461\Microsoft.Extensions.Primitives.dll
True
-
- ..\packages\Moq.4.10.1\lib\net45\Moq.dll
+
+ ..\packages\Moq.4.16.1\lib\net45\Moq.dll
True
@@ -90,19 +95,20 @@
..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll
-
- ..\packages\System.Buffers.4.4.0\lib\netstandard2.0\System.Buffers.dll
+
+ ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll
True
+
..\packages\System.IO.4.3.0\lib\net462\System.IO.dll
True
True
-
- ..\packages\System.Memory.4.5.1\lib\netstandard2.0\System.Memory.dll
+
+ ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll
True
@@ -111,17 +117,16 @@
True
-
- ..\packages\System.Numerics.Vectors.4.4.0\lib\net46\System.Numerics.Vectors.dll
+
+ ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll
True
-
- ..\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll
- True
+
+ ..\packages\System.Runtime.4.3.1\lib\net462\System.Runtime.dll
True
-
- ..\packages\System.Runtime.CompilerServices.Unsafe.4.5.1\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll
+
+ ..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll
True
@@ -144,10 +149,23 @@
True
True
-
- ..\packages\System.Threading.Tasks.Extensions.4.5.1\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll
+
+ ..\packages\System.Text.Encodings.Web.5.0.1\lib\net461\System.Text.Encodings.Web.dll
+ True
+
+
+ ..\packages\System.Text.Json.5.0.2\lib\net461\System.Text.Json.dll
+ True
+
+
+ ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll
+ True
+
+
+ ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll
True
+
@@ -201,9 +219,9 @@
- This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
+ This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}.
-
+