diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..49de0d3
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,123 @@
+# To learn more about .editorconfig see https://aka.ms/editorconfigdocs
+###############################
+# Core EditorConfig Options #
+###############################
+# All files
+[*]
+indent_style = space
+# Code files
+[*.{cs,csx,vb,vbx}]
+indent_size = 4
+insert_final_newline = true
+charset = utf-8-bom
+###############################
+# .NET Coding Conventions #
+###############################
+[*.{cs,vb}]
+# Organize usings
+dotnet_sort_system_directives_first = true
+# this. preferences
+dotnet_style_qualification_for_field = false:silent
+dotnet_style_qualification_for_property = false:silent
+dotnet_style_qualification_for_method = false:silent
+dotnet_style_qualification_for_event = false:silent
+# Language keywords vs BCL types preferences
+dotnet_style_predefined_type_for_locals_parameters_members = true:silent
+dotnet_style_predefined_type_for_member_access = true:silent
+# Parentheses preferences
+dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
+dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
+dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
+dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
+# Modifier preferences
+dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
+dotnet_style_readonly_field = true:suggestion
+# Expression-level preferences
+dotnet_style_object_initializer = true:suggestion
+dotnet_style_collection_initializer = true:suggestion
+dotnet_style_explicit_tuple_names = true:suggestion
+dotnet_style_null_propagation = true:suggestion
+dotnet_style_coalesce_expression = true:suggestion
+dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent
+dotnet_style_prefer_inferred_tuple_names = true:suggestion
+dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
+dotnet_style_prefer_auto_properties = true:silent
+dotnet_style_prefer_conditional_expression_over_assignment = true:silent
+dotnet_style_prefer_conditional_expression_over_return = true:silent
+###############################
+# Naming Conventions #
+###############################
+# Style Definitions
+dotnet_naming_style.pascal_case_style.capitalization = pascal_case
+# Use PascalCase for constant fields
+dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
+dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
+dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
+dotnet_naming_symbols.constant_fields.applicable_kinds = field
+dotnet_naming_symbols.constant_fields.applicable_accessibilities = *
+dotnet_naming_symbols.constant_fields.required_modifiers = const
+###############################
+# C# Coding Conventions #
+###############################
+[*.cs]
+# var preferences
+csharp_style_var_for_built_in_types = true:silent
+csharp_style_var_when_type_is_apparent = true:silent
+csharp_style_var_elsewhere = true:silent
+# Expression-bodied members
+csharp_style_expression_bodied_methods = false:silent
+csharp_style_expression_bodied_constructors = false:silent
+csharp_style_expression_bodied_operators = false:silent
+csharp_style_expression_bodied_properties = true:silent
+csharp_style_expression_bodied_indexers = true:silent
+csharp_style_expression_bodied_accessors = true:silent
+# Pattern matching preferences
+csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
+csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
+# Null-checking preferences
+csharp_style_throw_expression = true:suggestion
+csharp_style_conditional_delegate_call = true:suggestion
+# Modifier preferences
+csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
+# Expression-level preferences
+csharp_prefer_braces = true:silent
+csharp_style_deconstructed_variable_declaration = true:suggestion
+csharp_prefer_simple_default_expression = true:suggestion
+csharp_style_pattern_local_over_anonymous_function = true:suggestion
+csharp_style_inlined_variable_declaration = true:suggestion
+###############################
+# C# Formatting Rules #
+###############################
+# New line preferences
+csharp_new_line_before_open_brace = all
+csharp_new_line_before_else = true
+csharp_new_line_before_catch = true
+csharp_new_line_before_finally = true
+csharp_new_line_before_members_in_object_initializers = true
+csharp_new_line_before_members_in_anonymous_types = true
+csharp_new_line_between_query_expression_clauses = true
+# Indentation preferences
+csharp_indent_case_contents = true
+csharp_indent_switch_labels = true
+csharp_indent_labels = flush_left
+# Space preferences
+csharp_space_after_cast = false
+csharp_space_after_keywords_in_control_flow_statements = true
+csharp_space_between_method_call_parameter_list_parentheses = false
+csharp_space_between_method_declaration_parameter_list_parentheses = false
+csharp_space_between_parentheses = false
+csharp_space_before_colon_in_inheritance_clause = true
+csharp_space_after_colon_in_inheritance_clause = true
+csharp_space_around_binary_operators = before_and_after
+csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
+csharp_space_between_method_call_name_and_opening_parenthesis = false
+csharp_space_between_method_call_empty_parameter_list_parentheses = false
+# Wrapping preferences
+csharp_preserve_single_line_statements = true
+csharp_preserve_single_line_blocks = true
+###############################
+# VB Coding Conventions #
+###############################
+[*.vb]
+# Modifier preferences
+visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:suggestion
diff --git a/.gitignore b/.gitignore
index bba970e..8e2b700 100644
--- a/.gitignore
+++ b/.gitignore
@@ -344,4 +344,6 @@ ASALocalRun/
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
-MigrationBackup/
\ No newline at end of file
+MigrationBackup/
+
+.vs/**
diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json
index 6b61141..a1c4a7b 100644
--- a/.vs/VSWorkspaceState.json
+++ b/.vs/VSWorkspaceState.json
@@ -2,5 +2,6 @@
"ExpandedNodes": [
""
],
+ "SelectedNode": "\\BuckarooSdk.sln",
"PreviewInSolutionExplorer": false
}
\ No newline at end of file
diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite
index ae0676c..82b32f6 100644
Binary files a/.vs/slnx.sqlite and b/.vs/slnx.sqlite differ
diff --git a/BuckarooSdk.Tests/App.config b/BuckarooSdk.Tests/App.config
index 3911efe..e7c016a 100644
--- a/BuckarooSdk.Tests/App.config
+++ b/BuckarooSdk.Tests/App.config
@@ -8,7 +8,7 @@
-
+
diff --git a/BuckarooSdk.Tests/BuckarooSdk.Tests.csproj b/BuckarooSdk.Tests/BuckarooSdk.Tests.csproj
index 04a2220..8ad3f26 100644
--- a/BuckarooSdk.Tests/BuckarooSdk.Tests.csproj
+++ b/BuckarooSdk.Tests/BuckarooSdk.Tests.csproj
@@ -10,7 +10,7 @@
Properties
BuckarooSdk.Tests
BuckarooSdk.Tests
- v4.7.1
+ v4.8
512
{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
10.0
@@ -66,10 +66,6 @@
..\packages\Fare.2.1.2\lib\net35\Fare.dll
True
-
- ..\packages\Handlebars.Net.1.9.5\lib\net452\Handlebars.dll
- True
-
..\packages\Microsoft.AspNetCore.2.1.2\lib\netstandard2.0\Microsoft.AspNetCore.dll
True
@@ -258,10 +254,6 @@
..\packages\Microsoft.Net.Http.Headers.2.1.1\lib\netstandard2.0\Microsoft.Net.Http.Headers.dll
True
-
- ..\packages\MimeKitLite.2.0.7\lib\net45\MimeKitLite.dll
- True
-
..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll
True
@@ -273,19 +265,11 @@
..\packages\RandomDataGenerator.Net.1.0.7\lib\net45\RandomDataGenerator.dll
True
-
- ..\packages\RestEase.1.4.7\lib\net45\RestEase.dll
- True
-
..\packages\System.Collections.Immutable.1.5.0\lib\netstandard2.0\System.Collections.Immutable.dll
True
-
- ..\packages\System.ComponentModel.Annotations.4.7.0\lib\net461\System.ComponentModel.Annotations.dll
- True
-
..\packages\System.Diagnostics.DiagnosticSource.4.5.0\lib\net46\System.Diagnostics.DiagnosticSource.dll
@@ -295,10 +279,6 @@
..\packages\System.IO.Pipelines.4.5.0\lib\netstandard2.0\System.IO.Pipelines.dll
True
-
- ..\packages\System.Linq.Dynamic.Core.1.0.9\lib\net46\System.Linq.Dynamic.Core.dll
- True
-
..\packages\System.Memory.4.5.1\lib\netstandard2.0\System.Memory.dll
True
@@ -329,18 +309,6 @@
True
-
- ..\packages\WireMock.Net.1.0.7\lib\net461\WireMock.Net.dll
- True
-
-
- ..\packages\XPath2.1.0.6.1\lib\net40\XPath2.dll
- True
-
-
- ..\packages\XPath2.Extensions.1.0.6.1\lib\net40\XPath2.Extensions.dll
- True
-
@@ -360,6 +328,7 @@
+
@@ -399,7 +368,6 @@
-
@@ -418,6 +386,9 @@
BuckarooSdk
+
+
+
diff --git a/BuckarooSdk.Tests/General/GeneralTransactionTests.cs b/BuckarooSdk.Tests/General/GeneralTransactionTests.cs
index 814bc19..fd0cab4 100644
--- a/BuckarooSdk.Tests/General/GeneralTransactionTests.cs
+++ b/BuckarooSdk.Tests/General/GeneralTransactionTests.cs
@@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
-using BuckarooSdk;
using BuckarooSdk.DataTypes;
using BuckarooSdk.DataTypes.RequestBases;
using BuckarooSdk.Tests.Constants;
@@ -10,209 +9,220 @@
namespace BuckarooSdk.Tests.General
{
- [TestClass]
- public class GeneralTransactionTests
- {
- private SdkClient SdkClient { get;set; }
-
- public GeneralTransactionTests()
- {
- this.SdkClient = new SdkClient(TestSettings.Logger);
- }
-
- [TestMethod]
- public void TransactionSpecificationTest()
- {
- var request = this.SdkClient.CreateRequest()
- .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionSpecificationRequest()
- .SpecificServiceSpecification("ideal", 2);
-
- var response = request.GetMultipleSpecificiations();
- }
-
- [TestMethod]
- public void MultipleSpecificationTest()
- {
- var request = this.SdkClient.CreateRequest()
- .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionSpecificationRequest()
- .MultipleServiceSpecifications(new TransactionSpecificationBase()
- .AddService("ideal", 2)
- .AddService("transfer")
- .AddService("paypal")
- );
-
- var response = request.GetMultipleSpecificiations();
-
- Assert.AreEqual(3, response.Services.Count);
- }
-
- [TestMethod]
- public void NoServiceTransactionTest()
- {
- var request = this.SdkClient.CreateRequest()
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest()
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- AmountDebit = 0.02m,
- Invoice = $"SDK_TEST_{DateTime.Now.Ticks}",
- Description = "IDEAL_PAY_SDK_UNITTEST",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- })
- .NoServiceSelected()
- .Pay();
-
- var response = request.ExecuteAsync();
-
- }
-
- [TestMethod]
- public void NoServiceTransactionTest2()
- {
- var request = this.SdkClient.CreateRequest();
- var authRequest = request.Authenticate(
- TestSettings.WebsiteKey, TestSettings.SecretKey,
- TestSettings.Test, CultureInfo.GetCultureInfo("nl-NL"),
- ChannelEnum.Web);
- var transactionRequest = authRequest.TransactionRequest();
- TransactionBase data = new TransactionBase();
- data.AmountDebit = 0.02m;
- data.Currency = "EUR";
- data.Description = "IDEAL_PAY_SDK_UNITTEST";
- data.Invoice = $"SDK_TEST_{DateTime.Now.Ticks}";
- data.PushUrl = TestSettings.PushUri;
- data.ReturnUrl = TestSettings.ReturnUrl;
- data.ReturnUrlCancel = TestSettings.ReturnUrlCancel;
- data.ReturnUrlError = TestSettings.ReturnUrlError;
- data.ReturnUrlReject = TestSettings.ReturnUrlReject;
- data.StartRecurrent = false;// redundant
-
- var t = transactionRequest.SetBasicFields(data);
- var gt = t.NoServiceSelected();
- var st = gt.Pay();
- var response = st.Execute();
-
- }
-
- [TestMethod]
- public void CancelTransactionTest()
- {
- IEnumerable transactionsToBeCanceled = new List()
- {
- "94436C07DE6F44EBACBF26CB561F17B3",
- };
- var request = this.SdkClient.CreateRequest()
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .CancelTransactionRequest()
- .CancelMultiple(new CancelTransactionBase(transactionsToBeCanceled));
-
- var response = request.Execute();
-
- }
-
- [TestMethod]
- public void TransactionStatusTest()
- {
- const string key = "12890D0FFE9F4840A69126DA2A93F1B6";
-
- var request = this.SdkClient.CreateRequest()
- .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionStatusRequest()
- .Status(key);
-
- var requestResponse = request.GetSingleStatus();
-
- if (requestResponse.Status.Code.Code == BuckarooSdk.Constants.Status.WaitingForConsumer)
- {
- Process.Start("");
-
- }
- if (requestResponse.Status.Code.Code == BuckarooSdk.Constants.Status.Success)
- {
-
- }
-
- //var logging = this.SdkClient.LoggerFactory.GetFullLog();
- //Console.WriteLine(logging);
-
- }
-
- [TestMethod]
- public void InvoiceInfoTest()
- {
-
- const string transactionKey = "244BD8425FB941B7B93E70F5AED31F3A";
-
- var request = this.SdkClient.CreateRequest()
- .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionInvoiceInfoRequest()
- .SpecificInvoiceInfo(transactionKey);
-
- var response = request.GetSingleInvoiceInfoRequest();
-
- }
-
- [TestMethod]
- public void InvoicesInfoTest()
- {
- var request = this.SdkClient.CreateRequest()
- .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionInvoiceInfoRequest()
- .MultipleInvoicesInfo(new TransactionInvoiceInfoBase()
- {
- InvoiceCollection = new List()
- {
- new InvoiceInfoRequestInvoice()
- {
- Key = "",
- CustomerId = "",
- Number = ""
- }
- }
- });
-
- var response = request.GetMultipleInvoiceInfoRequest();
- }
-
- [TestMethod]
- public void RefundInfoTest()
- {
- const string transactionKey = "8CC823FB3A9545B99608541DF4BC4DFF";
-
- var request = this.SdkClient.CreateRequest()
- .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRefundInfoRequest()
- .SpecificConfiguredTransactionRefundInfo(transactionKey);
-
-
- var response = request.GetSingleRefundInfo();
-
-
- Console.WriteLine();
- }
-
- [TestMethod]
- public void RefundsInfoTest()
- {
- var transactionKeyList = new List()
- {
- "fasdfasdhgffgdhfasdwer",
- "asdfasdffhgdtrwerasfda",
- "fdaswerqrgtdgfsasdffwe",
- };
-
- var request = this.SdkClient.CreateRequest()
- .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRefundInfoRequest()
- .MultipleConfiguredTransactionRefundInfo(new TransactionRefundInfoBase(transactionKeyList));
-
- var response = request.GetMultipleRefundsInfo();
- }
- }
+ [TestClass]
+ public class GeneralTransactionTests
+ {
+ private readonly SdkClient _buckarooClient;
+
+ public GeneralTransactionTests()
+ {
+ _buckarooClient = new SdkClient(TestSettings.Logger);
+ }
+
+ [TestMethod]
+ public void TransactionSpecificationTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest()
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionSpecificationRequest()
+ .SpecificServiceSpecification("ideal", 2);
+
+ var response = request.GetMultipleSpecificiations();
+ }
+
+ [TestMethod]
+ public void MultipleSpecificationTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest()
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionSpecificationRequest()
+ .MultipleServiceSpecifications(new TransactionSpecificationBase()
+ .AddService("ideal", 2)
+ .AddService("transfer")
+ .AddService("paypal")
+ );
+
+ var response = request.GetMultipleSpecificiations();
+
+ Assert.AreEqual(3, response.Services.Count);
+ }
+
+ [TestMethod]
+ public void NoServiceTransactionTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest()
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest()
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ AmountDebit = 0.02m,
+ Invoice = $"SDK_TEST_{DateTime.Now.Ticks}",
+ Description = "IDEAL_PAY_SDK_UNITTEST",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ })
+ .NoServiceSelected()
+ .Pay();
+
+ var response = request.ExecuteAsync();
+ }
+
+ [TestMethod]
+ public void NoServiceTransactionTest2()
+ {
+ var request = _buckarooClient.CreateRequest();
+ var authRequest = request.Authenticate(
+ TestSettings.WebsiteKey, TestSettings.SecretKey,
+ TestSettings.Test, CultureInfo.GetCultureInfo("nl-NL"),
+ ChannelEnum.Web);
+ var transactionRequest = authRequest.TransactionRequest();
+ TransactionBase data = new TransactionBase
+ {
+ AmountDebit = 0.02m,
+ Currency = "EUR",
+ Description = "IDEAL_PAY_SDK_UNITTEST",
+ Invoice = $"SDK_TEST_{DateTime.Now.Ticks}",
+ PushUrl = TestSettings.PushUri,
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ StartRecurrent = false// redundant
+ };
+ var t = transactionRequest.SetBasicFields(data);
+ var gt = t.NoServiceSelected();
+ var st = gt.Pay();
+ var response = st.Execute();
+
+ }
+
+ [TestMethod]
+ public void CancelTransactionTest()
+ {
+ IEnumerable transactionsToBeCanceled = new List()
+ {
+ "94436C07DE6F44EBACBF26CB561F17B3",
+ };
+
+ var request = _buckarooClient
+ .CreateRequest()
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .CancelTransactionRequest()
+ .CancelMultiple(new CancelTransactionBase(transactionsToBeCanceled));
+
+ var response = request.Execute();
+
+ }
+
+ [TestMethod]
+ public void TransactionStatusTest()
+ {
+ const string key = "12890D0FFE9F4840A69126DA2A93F1B6";
+
+ var request = _buckarooClient
+ .CreateRequest()
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionStatusRequest()
+ .Status(key);
+
+ var requestResponse = request.GetSingleStatus();
+
+ if (requestResponse.Status.Code.Code == BuckarooSdk.Constants.Status.WaitingForConsumer)
+ {
+ Process.Start("");
+ }
+
+ //var logging = this.SdkClient.LoggerFactory.GetFullLog();
+ //Console.WriteLine(logging);
+ }
+
+ [TestMethod]
+ public void InvoiceInfoTest()
+ {
+ const string transactionKey = "244BD8425FB941B7B93E70F5AED31F3A";
+
+ var request = _buckarooClient
+ .CreateRequest()
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionInvoiceInfoRequest()
+ .SpecificInvoiceInfo(transactionKey);
+
+ var response = request.GetSingleInvoiceInfoRequest();
+ }
+
+ [TestMethod]
+ public void InvoicesInfoTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest()
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionInvoiceInfoRequest()
+ .MultipleInvoicesInfo(new TransactionInvoiceInfoBase()
+ {
+ InvoiceCollection = new List()
+ {
+ new InvoiceInfoRequestInvoice()
+ {
+ Key = "",
+ CustomerId = "",
+ Number = ""
+ }
+ }
+ });
+
+ var response = request.GetMultipleInvoiceInfoRequest();
+ }
+
+ [TestMethod]
+ public void RefundInfoTest()
+ {
+ const string transactionKey = "8CC823FB3A9545B99608541DF4BC4DFF";
+
+ var request = _buckarooClient
+ .CreateRequest()
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRefundInfoRequest()
+ .SpecificConfiguredTransactionRefundInfo(transactionKey);
+
+ var response = request.GetSingleRefundInfo();
+
+ Console.WriteLine();
+ }
+
+ [TestMethod]
+ [Obsolete]
+ public void RefundsInfoTest_Obsolete()
+ {
+ var transactionKeyList = new List()
+ {
+ "fasdfasdhgffgdhfasdwer",
+ "asdfasdffhgdtrwerasfda",
+ "fdaswerqrgtdgfsasdffwe",
+ };
+
+ var request = _buckarooClient.CreateRequest()
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRefundInfoRequest()
+ .MultipleConfiguredTransactionRefundInfo(new TransactionRefundInfoBase(transactionKeyList));
+
+ var response = request.GetMultipleRefundsInfo();
+ }
+
+ [TestMethod]
+ public void RefundsInfoTest()
+ {
+ var request = _buckarooClient.CreateRequest()
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRefundInfoRequest()
+ .MultipleConfiguredTransactionRefundInfo();
+
+ var response = request.GetMultipleRefundsInfo();
+ }
+ }
}
diff --git a/BuckarooSdk.Tests/GlobalSuppressions.cs b/BuckarooSdk.Tests/GlobalSuppressions.cs
new file mode 100644
index 0000000..ac1bfe3
--- /dev/null
+++ b/BuckarooSdk.Tests/GlobalSuppressions.cs
@@ -0,0 +1,217 @@
+// This file is used by Code Analysis to maintain SuppressMessage
+// attributes that are applied to this project.
+// Project-level suppressions either have no target or are given
+// a specific target and scoped to a namespace, type, member, etc.
+
+using System.Diagnostics.CodeAnalysis;
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.General.GeneralTransactionTests.NoServiceTransactionTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.General.GeneralTransactionTests.RefundInfoTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.General.GeneralTransactionTests.TransactionSpecificationTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.General.GeneralTransactionTests.NoServiceTransactionTest2")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.General.GeneralTransactionTests.CancelTransactionTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.General.GeneralTransactionTests.RefundsInfoTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.General.GeneralTransactionTests.RefundsInfoTest_Obsolete")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.General.GeneralTransactionTests.InvoiceInfoTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.General.GeneralTransactionTests.InvoicesInfoTest")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Afterpay.AfterpayTests.CancelAuthorizeTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Afterpay.AfterpayTests.PayTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Afterpay.AfterpayTests.RefundUndefinedTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Afterpay.AfterpayTests.RefundReturnTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Afterpay.AfterpayTests.RefundTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Afterpay.AfterpayTests.CaptureTest")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.AmericanExpress.AmericanExpressTests.AuthorizeEncryptedTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.AmericanExpress.AmericanExpressTests.PayRemainderTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.AmericanExpress.AmericanExpressTests.CaptureTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.AmericanExpress.AmericanExpressTests.PayRecurrentTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.AmericanExpress.AmericanExpressTests.RefundTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.AmericanExpress.AmericanExpressTests.AuthorizeTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.AmericanExpress.AmericanExpressTests.PayEncryptedTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.AmericanExpress.AmericanExpressTests.PayTest")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Bancontact.BancontactTests.PayTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Bancontact.BancontactTests.RefundTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Bancontact.BancontactTests.PayRemainderTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Bancontact.BancontactTests.PayEncryptedTest")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.BuckarooVoucher.BuckarooVoucherTests.PayTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.BuckarooVoucher.BuckarooVoucherTests.RefundTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.BuckarooVoucher.BuckarooVoucherTests.GetBalanceTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.BuckarooVoucher.BuckarooVoucherTests.CreateApplicationTest")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.BuckarooWallet.BuckarooWalletTests.PayTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.BuckarooWallet.BuckarooWalletTests.RefundTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.BuckarooWallet.BuckarooWalletTests.GetBalanceTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.BuckarooWallet.BuckarooWalletTests.CreateApplicationTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.BuckarooWallet.BuckarooWalletTests.DepositTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.BuckarooWallet.BuckarooWalletTests.UpdateTest")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Capayable.CapayableTests.PayTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Capayable.CapayableTests.RefundTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Capayable.CapayableTests.PayInInstallmentsTest")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.CarteBancaire.CarteBancaireTests.PayTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.CarteBancaire.CarteBancaireTests.RefundTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.CarteBancaire.CarteBancaireTests.AuthorizeTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.CarteBancaire.CarteBancaireTests.CaptureTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.CarteBancaire.CarteBancaireTests.PayRecurrentTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.CarteBancaire.CarteBancaireTests.PayRemainderTest")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.CarteBleueVisa.CarteBleueVisaTests.PayTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.CarteBleueVisa.CarteBleueVisaTests.RefundTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.CarteBleueVisa.CarteBleueVisaTests.AuthorizeTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.CarteBleueVisa.CarteBleueVisaTests.CaptureTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.CarteBleueVisa.CarteBleueVisaTests.PayRecurrentTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.CarteBleueVisa.CarteBleueVisaTests.PayRemainderTest")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.CreditManagement.CreditManagementTests.CreateInvoice")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.CustomGiftcard.CustomGiftcardTests.PayTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.CustomGiftcard.CustomGiftcardTests.RefundTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.CustomGiftcard.CustomGiftcardTests.PayRemainderTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.CustomGiftcard.CustomGiftcardTests.CardInfoTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.CustomGiftcard.CustomGiftcardTests.PayTest2")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.CustomGiftcard.CustomGiftcardTests.RefundTest2")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.CustomGiftcard.CustomGiftcardTests.PayRemainderTest2")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.CustomGiftcard.CustomGiftcardTests.CardInfoTest2")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.CustomGiftcard.CustomGiftcardTests.PayTest3")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.CustomGiftcard.CustomGiftcardTests.RefundTest3")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.CustomGiftcard.CustomGiftcardTests.PayRemainderTest3")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.CustomGiftcard.CustomGiftcardTests.CardInfoTest3")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Dankort.DankortTests.PayTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Dankort.DankortTests.RefundTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Dankort.DankortTests.AuthorizeTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Dankort.DankortTests.CaptureTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Dankort.DankortTests.PayRecurrentTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Dankort.DankortTests.PayRemainderTest")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.EMandate.EMandateTests.CreateMandateTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.EMandate.EMandateTests.GetIssuerListTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.EMandate.EMandateTests.GetStatusTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.EMandate.EMandateTests.ModifyMandateTest")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.EPS.EPSTests.PayTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.EPS.EPSTests.RefundTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.EPS.EPSTests.PayRemainderTest")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Giftcard.HuisTuinGiftcardTests.PayTest")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Giropay.GiropayTests.PayTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Giropay.GiropayTests.RefundTest")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Ideal.IdealTests.PayRemainderTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Ideal.IdealTests.PayWithCreditManagementTest")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.IdealQr.IdealQrTests.GenerateTest")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.INGHomePay.INGHomePayTests.PayTest")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Ippies.IppiesTests.PayTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Ippies.IppiesTests.RefundTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Ippies.IppiesTests.PayRemainderTest")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.KbcPaymentButton.KbcPaymentButtonTests.PayTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.KbcPaymentButton.KbcPaymentButtonTests.RefundTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.KbcPaymentButton.KbcPaymentButtonTests.PayRemainderTest")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Maestro.MaestroTests.PayTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Maestro.MaestroTests.RefundTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Maestro.MaestroTests.AuthorizeTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Maestro.MaestroTests.CaptureTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Maestro.MaestroTests.PayRecurrent")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Maestro.MaestroTests.PayRemainder")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.MasterCard.MasterCardTests.PayTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.MasterCard.MasterCardTests.RefundTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.MasterCard.MasterCardTests.AuthorizeTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.MasterCard.MasterCardTests.CaptureTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.MasterCard.MasterCardTests.PayRecurrentTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.MasterCard.MasterCardTests.PayRemainderTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.MasterCard.MasterCardTests.CancelAuthorizeTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.MasterCard.MasterCardTests.PayEncryptedTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.MasterCard.MasterCardTests.AuthorizeEncryptedTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.MasterCard.MasterCardTests.RefundTestCreditCard")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.MasterCard.MasterCardTests.AuthorizeTestCreditCard")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.MasterCard.MasterCardTests.CaptureTestCreditCard")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.MasterCard.MasterCardTests.PayTestCreditCard")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.MasterCard.MasterCardTests.CancelAuthorizeTestCreditCard")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.MasterCard.MasterCardTests.PayRecurrentTestCreditCard")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.MasterCard.MasterCardTests.PayRemainderTestCreditCard")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.MasterCard.MasterCardTests.PayEncryptedTestCreditCard")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.MasterCard.MasterCardTests.AuthorizeEncryptedTestCreditCard")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Nexi.NexiTests.PayTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Nexi.NexiTests.PayRemainderTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Nexi.NexiTests.CaptureTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Nexi.NexiTests.PayRecurrentTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Nexi.NexiTests.RefundTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Nexi.NexiTests.AuthorizeTest")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Notification.NotificationTests.ExtraInfoTest")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.OnlineGiroLite.OnlineGiroLiteTests.PaymentInvitationTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.OnlineGiro.OnlineGiroTests.PaymentInvitationTest")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.P24.P24Tests.PayTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.P24.P24Tests.RefundTest")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.PayPal.PayPalTests.RefundTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.PayPal.PayPalTests.RefundTest_Obsolete")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.PayPal.PayPalTests.PayRemainderTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.PayPal.PayPalTests.ExtraInfoTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.PayPal.PayPalTests.PayRecurrentTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.PayPal.PayPalTests.PayTest")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.PayPerEmail.PayPerEmailTests.PaymentInvitationTest")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.PaysafeCard.PaysafeCardTests.PayTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.PaysafeCard.PaysafeCardTests.PayRemainderTest")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.SimpleSepaDirectDebit.SimpleSepaDirectDebitTests.RefundTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.SimpleSepaDirectDebit.SimpleSepaDirectDebitTests.PayTest")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Sofort.SofortTests.PayTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Sofort.SofortTests.RefundTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Sofort.SofortTests.PayRemainderTest")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Transfer.TransferTests.PayTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Transfer.TransferTests.RefundTest")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.VisaElectron.VisaElectronTests.PayTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.VisaElectron.VisaElectronTests.RefundTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.VisaElectron.VisaElectronTests.AuthorizeTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.VisaElectron.VisaElectronTests.CaptureTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.VisaElectron.VisaElectronTests.PayRecurrentTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.VisaElectron.VisaElectronTests.PayRemainderTest")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Visa.VisaTests.PayTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Visa.VisaTests.RefundTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Visa.VisaTests.AuthorizeTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Visa.VisaTests.CaptureTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Visa.VisaTests.PayRecurrentTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Visa.VisaTests.PayRemainderTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Visa.VisaTests.CancelAuthorizeTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Visa.VisaTests.PayEncryptedTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Visa.VisaTests.AuthorizeEncryptedTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Visa.VisaTests.PayTestCreditCard")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Visa.VisaTests.RefundTestCreditCard")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Visa.VisaTests.AuthorizeTestCreditCard")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Visa.VisaTests.CaptureTestCreditCard")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Visa.VisaTests.CancelAuthorizeTestCreditCard")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Visa.VisaTests.PayRecurrentTestCreditCard")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Visa.VisaTests.PayRemainderTestCreditCard")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Visa.VisaTests.PayEncryptedTestCreditCard")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.Visa.VisaTests.AuthorizeEncryptedTestCreditCard")]
+
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.VPay.VPayTests.PayTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.VPay.VPayTests.RefundTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.VPay.VPayTests.AuthorizeTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.VPay.VPayTests.CaptureTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.VPay.VPayTests.CancelAuthorizeTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.VPay.VPayTests.PayRecurrentTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.VPay.VPayTests.PayRemainderTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.VPay.VPayTests.PayEncryptedTest")]
+[assembly: SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "Manual testing variables, see issue #48.", Scope = "member", Target = "~M:BuckarooSdk.Tests.Services.VPay.VPayTests.AuthorizeEncryptedTest")]
diff --git a/BuckarooSdk.Tests/Mocks/Afterpay.cs b/BuckarooSdk.Tests/Mocks/Afterpay.cs
index cf445c6..fcd5509 100644
--- a/BuckarooSdk.Tests/Mocks/Afterpay.cs
+++ b/BuckarooSdk.Tests/Mocks/Afterpay.cs
@@ -4,169 +4,169 @@
namespace BuckarooSdk.Tests.Mocks
{
- internal class Afterpay
- {
- internal static AfterpayAuthorizeRequest AfterpayAuthorizeMock => new AfterpayAuthorizeRequest()
- {
- MerchantImageUrl = "https://www.buckaroo.nl/img/logo_menu.png",
- SummaryImageUrl = "https://www.buckaroo.nl/img/logo_menu.png",
- BankAccount = "NL13TEST0123456789",
- BankCode = "TESTNL2A",
+ internal class Afterpay
+ {
+ internal static AfterpayAuthorizeRequest AfterpayAuthorizeMock => new AfterpayAuthorizeRequest()
+ {
+ MerchantImageUrl = "https://www.buckaroo.nl/img/logo_menu.png",
+ SummaryImageUrl = "https://www.buckaroo.nl/img/logo_menu.png",
+ BankAccount = "NL13TEST0123456789",
+ BankCode = "TESTNL2A",
- BillingCustomer = new BillingCustomer()
- {
- Category = "Person",
- Salutation = "Mr",
- FirstName = "J.",
- LastName = "de Tester",
- BirthDate = new DateTime(1992, 6, 3),
- Street = "Zonnebaan",
- StreetNumber = "9",
- StreetNumberAdditional = "",
- PostalCode = "3542 EA",
- City = "UTRECHT",
- Country = "NL",
- MobilePhone = "0612345678",
- Phone = "0713613412",
- Email = "s.roos@buckaroo.nl",
- CareOf = "",
- ConversationLanguage = "",
- IdentificationNumber = "",
- CustomerNumber = "John Smith",
- },
- //ShippingCustomer = new ShippingCustomer()
- //{
- // Category = "",
- // Salutation = "",
- // FirstName = "",
- // LastName = "",
- // BirthDate = new DateTime(1992, 6, 3),
- // Street = "",
- // StreetNumber = "",
- // StreetNumberAdditional = "",
- // PostalCode = "",
- // City = "",
- // Country = "",
- // MobilePhone = "",
- // Phone = "",
- // Email = "",
- // CareOf = "",
- // ConversationLanguage = "",
- // IdentificationNumber = "",
- // CustomerNumber = "",
- //},
- Articles = new BuckarooSdk.Services.ParameterGroupCollection("Article")
- {
- new Article()
- {
- Description = "Blue Toy Car",
- GrossUnitPrice = "2.00",
- VatPercentage = "21",
- Quantity = 1,
- Identifier = "Articlenumber12345",
- ImageUrl = "https://www.buckaroo.nl/img/logo_menu.png",
- Url = "https://www.buckaroo.nl/",
- Type = "PhysicalArticle",
- }
- }
+ BillingCustomer = new BillingCustomer()
+ {
+ Category = "Person",
+ Salutation = "Mr",
+ FirstName = "J.",
+ LastName = "de Tester",
+ BirthDate = new DateTime(1992, 6, 3),
+ Street = "Zonnebaan",
+ StreetNumber = "9",
+ StreetNumberAdditional = "",
+ PostalCode = "3542 EA",
+ City = "UTRECHT",
+ Country = "NL",
+ MobilePhone = "0612345678",
+ Phone = "0713613412",
+ Email = "s.roos@buckaroo.nl",
+ CareOf = "",
+ ConversationLanguage = "",
+ IdentificationNumber = "",
+ CustomerNumber = "John Smith",
+ },
+ //ShippingCustomer = new ShippingCustomer()
+ //{
+ // Category = "",
+ // Salutation = "",
+ // FirstName = "",
+ // LastName = "",
+ // BirthDate = new DateTime(1992, 6, 3),
+ // Street = "",
+ // StreetNumber = "",
+ // StreetNumberAdditional = "",
+ // PostalCode = "",
+ // City = "",
+ // Country = "",
+ // MobilePhone = "",
+ // Phone = "",
+ // Email = "",
+ // CareOf = "",
+ // ConversationLanguage = "",
+ // IdentificationNumber = "",
+ // CustomerNumber = "",
+ //},
+ Articles = new BuckarooSdk.Services.ParameterGroupCollection("Article")
+ {
+ new Article()
+ {
+ Description = "Blue Toy Car",
+ GrossUnitPrice = "2.00",
+ VatPercentage = "21",
+ Quantity = 1,
+ Identifier = "Articlenumber12345",
+ ImageUrl = "https://www.buckaroo.nl/img/logo_menu.png",
+ Url = "https://www.buckaroo.nl/",
+ Type = "PhysicalArticle",
+ }
+ }
- };
+ };
- internal static AfterpayCancelAuthorizeRequest AfterpayCancelAuthorizeMock => new AfterpayCancelAuthorizeRequest()
- {
- //no actionparameters
- };
+ internal static AfterpayCancelAuthorizeRequest AfterpayCancelAuthorizeMock => new AfterpayCancelAuthorizeRequest()
+ {
+ //no actionparameters
+ };
- internal static AfterpayCaptureRequest AfterpayCaptureMock => new AfterpayCaptureRequest()
- {
-
+ internal static AfterpayCaptureRequest AfterpayCaptureMock => new AfterpayCaptureRequest()
+ {
+
- };
+ };
- internal static AfterpayPayRequest AfterpayPayMock => new AfterpayPayRequest()
- {
- MerchantImageUrl = "https://www.buckaroo.nl/img/logo_menu.png",
- SummaryImageUrl = "https://www.buckaroo.nl/img/logo_menu.png",
- BankAccount = "NL13TEST0123456789",
- BankCode = "TESTNL2A",
+ internal static AfterpayPayRequest AfterpayPayMock => new AfterpayPayRequest()
+ {
+ MerchantImageUrl = "https://www.buckaroo.nl/img/logo_menu.png",
+ SummaryImageUrl = "https://www.buckaroo.nl/img/logo_menu.png",
+ BankAccount = "NL13TEST0123456789",
+ BankCode = "TESTNL2A",
- BillingCustomer = new BillingCustomer()
- {
- Category = "Person",
- Salutation = "Mr",
- FirstName = "J.",
- LastName = "de Tester",
- BirthDate = new DateTime(1992, 6, 3),
- Street = "Zonnebaan",
- StreetNumber = "9",
- StreetNumberAdditional = "",
- PostalCode = "3542 EA",
- City = "UTRECHT",
- Country = "NL",
- MobilePhone = "0612345678",
- Phone = "0713613412",
- Email = "s.roos@buckaroo.nl",
- CareOf = "",
- ConversationLanguage = "",
- IdentificationNumber = "",
- CustomerNumber = "John Smith",
- },
- //ShippingCustomer = new ShippingCustomer()
- //{
- // Category = "",
- // Salutation = "",
- // FirstName = "",
- // LastName = "",
- // BirthDate = new DateTime(1992, 6, 3),
- // Street = "",
- // StreetNumber = "",
- // StreetNumberAdditional = "",
- // PostalCode = "",
- // City = "",
- // Country = "",
- // MobilePhone = "",
- // Phone = "",
- // Email = "",
- // CareOf = "",
- // ConversationLanguage = "",
- // IdentificationNumber = "",
- // CustomerNumber = "",
- //},
- Articles = new BuckarooSdk.Services.ParameterGroupCollection("Article")
- {
- new Article()
- {
- Description = "Blue Toy Car",
- GrossUnitPrice = "2.00",
- VatPercentage = "21",
- Quantity = 1,
- Identifier = "Articlenumber12345",
- ImageUrl = "https://www.buckaroo.nl/img/logo_menu.png",
- Url = "https://www.buckaroo.nl/",
- Type = "PhysicalArticle",
- }
- }
+ BillingCustomer = new BillingCustomer()
+ {
+ Category = "Person",
+ Salutation = "Mr",
+ FirstName = "J.",
+ LastName = "de Tester",
+ BirthDate = new DateTime(1992, 6, 3),
+ Street = "Zonnebaan",
+ StreetNumber = "9",
+ StreetNumberAdditional = "",
+ PostalCode = "3542 EA",
+ City = "UTRECHT",
+ Country = "NL",
+ MobilePhone = "0612345678",
+ Phone = "0713613412",
+ Email = "s.roos@buckaroo.nl",
+ CareOf = "",
+ ConversationLanguage = "",
+ IdentificationNumber = "",
+ CustomerNumber = "John Smith",
+ },
+ //ShippingCustomer = new ShippingCustomer()
+ //{
+ // Category = "",
+ // Salutation = "",
+ // FirstName = "",
+ // LastName = "",
+ // BirthDate = new DateTime(1992, 6, 3),
+ // Street = "",
+ // StreetNumber = "",
+ // StreetNumberAdditional = "",
+ // PostalCode = "",
+ // City = "",
+ // Country = "",
+ // MobilePhone = "",
+ // Phone = "",
+ // Email = "",
+ // CareOf = "",
+ // ConversationLanguage = "",
+ // IdentificationNumber = "",
+ // CustomerNumber = "",
+ //},
+ Articles = new BuckarooSdk.Services.ParameterGroupCollection("Article")
+ {
+ new Article()
+ {
+ Description = "Blue Toy Car",
+ GrossUnitPrice = "2.00",
+ VatPercentage = "21",
+ Quantity = 1,
+ Identifier = "Articlenumber12345",
+ ImageUrl = "https://www.buckaroo.nl/img/logo_menu.png",
+ Url = "https://www.buckaroo.nl/",
+ Type = "PhysicalArticle",
+ }
+ }
- };
+ };
- internal static AfterpayRefundRequest AfterpayRefundMock(string refundType) => new AfterpayRefundRequest()
- {
+ internal static AfterpayRefundRequest AfterpayRefundMock(string refundType) => new AfterpayRefundRequest()
+ {
Articles = new BuckarooSdk.Services.ParameterGroupCollection("Article")
- {
- new Article()
- {
- RefundType = refundType,
- Description = "Blue Toy Car",
- GrossUnitPrice = "10.00",
- VatPercentage = "21",
- Quantity = 1,
- Identifier = "Articlenumber12345",
- ImageUrl = "https://www.buckaroo.nl/img/logo_menu.png",
- Url = "https://www.buckaroo.nl/",
- Type = "Physical",
- }
- }
- };
- }
+ {
+ new Article()
+ {
+ RefundType = refundType,
+ Description = "Blue Toy Car",
+ GrossUnitPrice = "10.00",
+ VatPercentage = "21",
+ Quantity = 1,
+ Identifier = "Articlenumber12345",
+ ImageUrl = "https://www.buckaroo.nl/img/logo_menu.png",
+ Url = "https://www.buckaroo.nl/",
+ Type = "Physical",
+ }
+ }
+ };
+ }
}
diff --git a/BuckarooSdk.Tests/Services/Afterpay/AfterpayTests.cs b/BuckarooSdk.Tests/Services/Afterpay/AfterpayTests.cs
index acbea6a..628fb21 100644
--- a/BuckarooSdk.Tests/Services/Afterpay/AfterpayTests.cs
+++ b/BuckarooSdk.Tests/Services/Afterpay/AfterpayTests.cs
@@ -1,4 +1,4 @@
-using BuckarooSdk.DataTypes.RequestBases;
+using BuckarooSdk.DataTypes.RequestBases;
using BuckarooSdk.Logging;
using BuckarooSdk.Services.Afterpay;
using Microsoft.VisualStudio.TestTools.UnitTesting;
@@ -8,107 +8,108 @@
namespace BuckarooSdk.Tests.Services.Afterpay
{
- [TestClass]
- public class AfterpayTests
- {
- private SdkClient _buckarooClient;
- private string TestName => "Afterpay";//nameof(AfterpayTests).ToUpper();
-
- [TestInitialize]
- public void Setup()
- {
- this._buckarooClient = new SdkClient(TestSettings.Logger);
- }
-
- [TestMethod]
- public void CancelAuthorizeTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- OriginalTransactionKey = "",
- AmountCredit = 2,
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .Afterpay() // Choose the paymentmethod you want to use
- .CancelAuthorize(new AfterpayCancelAuthorizeRequest // choose the action you want to use and provide the payment method specific info.
- {
-
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestMethod]
- public void PayTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"TEST_17",
- Order = $"SDK_{ TestName }_16",
- ClientIp = TestSettings.IpAddress,
- })
- .Afterpay() // Choose the paymentmethod you want to use
- .Pay(Mocks.Afterpay.AfterpayPayMock); // choose the action you want to use and provide the payment method specific info.
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestMethod]
- public void RefundUndefinedTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- OriginalTransactionKey = "",
- AmountCredit = 2,
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .Afterpay() // Choose the paymentmethod you want to use
- .Refund(Mocks.Afterpay.AfterpayRefundMock("Undefined")); // choose the action you want to use and provide the payment method specific info.
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
+ [TestClass]
+ public class AfterpayTests
+ {
+ private SdkClient _buckarooClient;
+
+ private string TestName => "Afterpay";//nameof(AfterpayTests).ToUpper();
+
+ [TestInitialize]
+ public void Setup()
+ {
+ _buckarooClient = new SdkClient(TestSettings.Logger);
+ }
+
+ [TestMethod]
+ public void CancelAuthorizeTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ OriginalTransactionKey = "",
+ AmountCredit = 2,
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .Afterpay() // Choose the paymentmethod you want to use
+ .CancelAuthorize(new AfterpayCancelAuthorizeRequest // choose the action you want to use and provide the payment method specific info.
+ {
+
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void PayTest()
+ {
+ var request =
+ this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"TEST_17",
+ Order = $"SDK_{ TestName }_16",
+ ClientIp = TestSettings.IpAddress,
+ })
+ .Afterpay() // Choose the paymentmethod you want to use
+ .Pay(Mocks.Afterpay.AfterpayPayMock); // choose the action you want to use and provide the payment method specific info.
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void RefundUndefinedTest()
+ {
+ var request =
+ this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ OriginalTransactionKey = "",
+ AmountCredit = 2,
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .Afterpay() // Choose the paymentmethod you want to use
+ .Refund(Mocks.Afterpay.AfterpayRefundMock("Undefined")); // choose the action you want to use and provide the payment method specific info.
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
[TestMethod]
public void RefundReturnTest()
@@ -168,69 +169,69 @@ public void RefundTest()
// Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
}
- [TestMethod]
- public void AuthorizeTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"TEST_12",
- Order = $"SDK_{ TestName }_12",
- ClientIp = TestSettings.IpAddress,
- })
- .Afterpay() // Choose the paymentmethod you want to use
- .Authorize(Mocks.Afterpay.AfterpayAuthorizeMock); // choose the action you want to use and provide the payment method specific info.
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
- [TestMethod]
- public void CaptureTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- OriginalTransactionKey = "",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .Afterpay() // Choose the paymentmethod you want to use
- .Capture(Mocks.Afterpay.AfterpayCaptureMock); // choose the action you want to use and provide the payment method specific info.
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestCleanup]
- public void TearDown()
- {
- this._buckarooClient = null;
- }
- }
+ [TestMethod]
+ public void AuthorizeTest()
+ {
+ var request =
+ this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"TEST_12",
+ Order = $"SDK_{ TestName }_12",
+ ClientIp = TestSettings.IpAddress,
+ })
+ .Afterpay() // Choose the paymentmethod you want to use
+ .Authorize(Mocks.Afterpay.AfterpayAuthorizeMock); // choose the action you want to use and provide the payment method specific info.
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+ [TestMethod]
+ public void CaptureTest()
+ {
+ var request =
+ this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ OriginalTransactionKey = "",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .Afterpay() // Choose the paymentmethod you want to use
+ .Capture(Mocks.Afterpay.AfterpayCaptureMock); // choose the action you want to use and provide the payment method specific info.
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestCleanup]
+ public void TearDown()
+ {
+ this._buckarooClient = null;
+ }
+ }
}
diff --git a/BuckarooSdk.Tests/Services/AmericanExpress/AmericanExpressTests.cs b/BuckarooSdk.Tests/Services/AmericanExpress/AmericanExpressTests.cs
index c6cbd6c..ee2a32a 100644
--- a/BuckarooSdk.Tests/Services/AmericanExpress/AmericanExpressTests.cs
+++ b/BuckarooSdk.Tests/Services/AmericanExpress/AmericanExpressTests.cs
@@ -1,359 +1,352 @@
using System;
-using System.Diagnostics;
using System.Globalization;
using BuckarooSdk.DataTypes.RequestBases;
-using BuckarooSdk.Services.CreditCards.AmericanExpress.Constants;
-using BuckarooSdk.DataTypes.RequestBases;
using BuckarooSdk.Logging;
using BuckarooSdk.Services.CreditCards.AmericanExpress.Request;
using BuckarooSdk.Tests.Constants;
using Microsoft.VisualStudio.TestTools.UnitTesting;
-using System;
-using System.Globalization;
namespace BuckarooSdk.Tests.Services.AmericanExpress
{
- [TestClass]
- public class AmericanExpressTests
-
- {
- private SdkClient _buckarooClient;
- private string TestName => nameof(AmericanExpressTests).ToUpper();
-
- [TestInitialize]
- public void Setup()
- {
- this._buckarooClient = new SdkClient(Constants.TestSettings.Logger);
- }
-
- [TestMethod]
- public void PayTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .AmericanExpress() // Choose the paymentmethod you want to use
- .Pay(new AmericanExpressPayRequest // choose the action you want to use and provide the payment method specific info.
- {
- RecurringInterval = 0,
- ShippingMethodCode = string.Empty,
- Recurring = string.Empty,
- CustomerIPAddress = string.Empty,
- VerifyAddress = false,
- CustomerHTTPBrowserType = string.Empty,
- CustomerHostServerName = string.Empty,
- RecurringTimeType = string.Empty,
- CustomerCardName = string.Empty,
- AmexCreditcardNumber = string.Empty,
- CVV4 = string.Empty,
- ShippingFirstName = string.Empty,
- ShippingLastName = string.Empty,
- ShippingStreet = string.Empty,
- CardExpirationDate = DateTime.MinValue,
- ShippingHouseNumber = string.Empty,
- ShippingHouseNumberSuffix = string.Empty,
- ShippingPostalCode = string.Empty,
- ShippingCountryCode = string.Empty,
- ShippingPhoneNumber = string.Empty,
- CustomerEmail = string.Empty,
- BillingFirstName = string.Empty,
- BillingLastName = string.Empty,
- BillingStreet = string.Empty,
- BillingHouseNumber = string.Empty,
- BillingHouseNumberSuffix = string.Empty,
- BillingPostalCode = string.Empty,
- BillingPhoneNumber = string.Empty,
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestMethod]
- public void RefundTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- OriginalTransactionKey = string.Empty,
- AmountCredit = 2,
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .AmericanExpress() // Choose the paymentmethod you want to use
- .Refund(new AmericanExpressRefundRequest // choose the action you want to use and provide the payment method specific info.
- {
-
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestMethod]
- public void AuthorizeTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .AmericanExpress() // Choose the paymentmethod you want to use
- .Authorize(new AmericanExpressAuthorizeRequest // choose the action you want to use and provide the payment method specific info.
- {
- RecurringInterval = 0,
- ShippingMethodCode = string.Empty,
- Recurring = string.Empty,
- CustomerIPAddress = string.Empty,
- VerifyAddress = false,
- CustomerHTTPBrowserType = string.Empty,
- CustomerHostServerName = string.Empty,
- RecurringTimeType = string.Empty,
- ShippingFirstName = string.Empty,
- ShippingLastName = string.Empty,
- ShippingStreet = string.Empty,
- ShippingHouseNumber = string.Empty,
- ShippingHouseNumberSuffix = string.Empty,
- ShippingPostalCode = string.Empty,
- ShippingCountryCode = string.Empty,
- ShippingPhoneNumber = string.Empty,
- CustomerEmail = string.Empty,
- BillingFirstName = string.Empty,
- BillingLastName = string.Empty,
- BillingStreet = string.Empty,
- BillingHouseNumber = string.Empty,
- BillingHouseNumberSuffix = string.Empty,
- BillingPostalCode = string.Empty,
- BillingPhoneNumber = string.Empty,
-
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestMethod]
- public void CaptureTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- OriginalTransactionKey = "",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .AmericanExpress() // Choose the paymentmethod you want to use
- .Capture(new AmericanExpressCaptureRequest // choose the action you want to use and provide the payment method specific info.
- {
-
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestMethod]
- public void PayRecurrentTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- OriginalTransactionKey = "",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .AmericanExpress() // Choose the paymentmethod you want to use
- .PayRecurrent(new AmericanExpressPayRecurrentRequest // choose the action you want to use and provide the payment method specific info.
- {
-
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestMethod]
- public void PayEncryptedTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .AmericanExpress() // Choose the paymentmethod you want to use
- .PayEncrypted(new AmericanExpressPayEncryptedRequest // choose the action you want to use and provide the payment method specific info.
- {
- EncryptedCardData = string.Empty,
-
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestMethod]
- public void AuthorizeEncryptedTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .AmericanExpress() // Choose the paymentmethod you want to use
- .AuthorizeEncrypted(new AmericanExpressAuthorizeEncryptedRequest // choose the action you want to use and provide the payment method specific info.
- {
- EncryptedCardData = string.Empty,
-
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestMethod]
- public void PayRemainderTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- OriginalTransactionKey = "",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .AmericanExpress() // Choose the paymentmethod you want to use
- .PayRemainder(new AmericanExpressPayRemainderRequest // choose the action you want to use and provide the payment method specific info.
- {
- RecurringInterval = 0,
- ShippingMethodCode = string.Empty,
- Recurring = string.Empty,
- CustomerIPAddress = string.Empty,
- VerifyAddress = false,
- CustomerHTTPBrowserType = string.Empty,
- CustomerHostServerName = string.Empty,
- RecurringTimeType = string.Empty,
- ShippingFirstName = string.Empty,
- ShippingLastName = string.Empty,
- ShippingStreet = string.Empty,
- ShippingHouseNumber = string.Empty,
- ShippingHouseNumberSuffix = string.Empty,
- ShippingPostalCode = string.Empty,
- ShippingCountryCode = string.Empty,
- ShippingPhoneNumber = string.Empty,
- CustomerEmail = string.Empty,
- BillingFirstName = string.Empty,
- BillingLastName = string.Empty,
- BillingStreet = string.Empty,
- BillingHouseNumber = string.Empty,
- BillingHouseNumberSuffix = string.Empty,
- BillingPostalCode = string.Empty,
- BillingPhoneNumber = string.Empty,
-
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- }
+ [TestClass]
+ public class AmericanExpressTests
+
+ {
+ private SdkClient _buckarooClient;
+
+ private string TestName => nameof(AmericanExpressTests).ToUpper();
+
+ [TestInitialize]
+ public void Setup()
+ {
+ _buckarooClient = new SdkClient(TestSettings.Logger);
+ }
+
+ [TestMethod]
+ public void PayTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .AmericanExpress() // Choose the paymentmethod you want to use
+ .Pay(new AmericanExpressPayRequest // choose the action you want to use and provide the payment method specific info.
+ {
+ RecurringInterval = 0,
+ ShippingMethodCode = string.Empty,
+ Recurring = string.Empty,
+ CustomerIPAddress = string.Empty,
+ VerifyAddress = false,
+ CustomerHTTPBrowserType = string.Empty,
+ CustomerHostServerName = string.Empty,
+ RecurringTimeType = string.Empty,
+ CustomerCardName = string.Empty,
+ AmexCreditcardNumber = string.Empty,
+ CVV4 = string.Empty,
+ ShippingFirstName = string.Empty,
+ ShippingLastName = string.Empty,
+ ShippingStreet = string.Empty,
+ CardExpirationDate = DateTime.MinValue,
+ ShippingHouseNumber = string.Empty,
+ ShippingHouseNumberSuffix = string.Empty,
+ ShippingPostalCode = string.Empty,
+ ShippingCountryCode = string.Empty,
+ ShippingPhoneNumber = string.Empty,
+ CustomerEmail = string.Empty,
+ BillingFirstName = string.Empty,
+ BillingLastName = string.Empty,
+ BillingStreet = string.Empty,
+ BillingHouseNumber = string.Empty,
+ BillingHouseNumberSuffix = string.Empty,
+ BillingPostalCode = string.Empty,
+ BillingPhoneNumber = string.Empty,
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void RefundTest()
+ {
+ var request = _buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ OriginalTransactionKey = string.Empty,
+ AmountCredit = 2,
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .AmericanExpress() // Choose the paymentmethod you want to use
+ .Refund(new AmericanExpressRefundRequest // choose the action you want to use and provide the payment method specific info.
+ {
+
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void AuthorizeTest()
+ {
+ var request = _buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .AmericanExpress() // Choose the paymentmethod you want to use
+ .Authorize(new AmericanExpressAuthorizeRequest // choose the action you want to use and provide the payment method specific info.
+ {
+ RecurringInterval = 0,
+ ShippingMethodCode = string.Empty,
+ Recurring = string.Empty,
+ CustomerIPAddress = string.Empty,
+ VerifyAddress = false,
+ CustomerHTTPBrowserType = string.Empty,
+ CustomerHostServerName = string.Empty,
+ RecurringTimeType = string.Empty,
+ ShippingFirstName = string.Empty,
+ ShippingLastName = string.Empty,
+ ShippingStreet = string.Empty,
+ ShippingHouseNumber = string.Empty,
+ ShippingHouseNumberSuffix = string.Empty,
+ ShippingPostalCode = string.Empty,
+ ShippingCountryCode = string.Empty,
+ ShippingPhoneNumber = string.Empty,
+ CustomerEmail = string.Empty,
+ BillingFirstName = string.Empty,
+ BillingLastName = string.Empty,
+ BillingStreet = string.Empty,
+ BillingHouseNumber = string.Empty,
+ BillingHouseNumberSuffix = string.Empty,
+ BillingPostalCode = string.Empty,
+ BillingPhoneNumber = string.Empty,
+
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void CaptureTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ OriginalTransactionKey = "",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .AmericanExpress() // Choose the paymentmethod you want to use
+ .Capture(new AmericanExpressCaptureRequest // choose the action you want to use and provide the payment method specific info.
+ {
+
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void PayRecurrentTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ OriginalTransactionKey = "",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .AmericanExpress() // Choose the paymentmethod you want to use
+ .PayRecurrent(new AmericanExpressPayRecurrentRequest // choose the action you want to use and provide the payment method specific info.
+ {
+
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void PayEncryptedTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .AmericanExpress() // Choose the paymentmethod you want to use
+ .PayEncrypted(new AmericanExpressPayEncryptedRequest // choose the action you want to use and provide the payment method specific info.
+ {
+ EncryptedCardData = string.Empty,
+
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void AuthorizeEncryptedTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .AmericanExpress() // Choose the paymentmethod you want to use
+ .AuthorizeEncrypted(new AmericanExpressAuthorizeEncryptedRequest // choose the action you want to use and provide the payment method specific info.
+ {
+ EncryptedCardData = string.Empty,
+
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void PayRemainderTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ OriginalTransactionKey = "",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .AmericanExpress() // Choose the paymentmethod you want to use
+ .PayRemainder(new AmericanExpressPayRemainderRequest // choose the action you want to use and provide the payment method specific info.
+ {
+ RecurringInterval = 0,
+ ShippingMethodCode = string.Empty,
+ Recurring = string.Empty,
+ CustomerIPAddress = string.Empty,
+ VerifyAddress = false,
+ CustomerHTTPBrowserType = string.Empty,
+ CustomerHostServerName = string.Empty,
+ RecurringTimeType = string.Empty,
+ ShippingFirstName = string.Empty,
+ ShippingLastName = string.Empty,
+ ShippingStreet = string.Empty,
+ ShippingHouseNumber = string.Empty,
+ ShippingHouseNumberSuffix = string.Empty,
+ ShippingPostalCode = string.Empty,
+ ShippingCountryCode = string.Empty,
+ ShippingPhoneNumber = string.Empty,
+ CustomerEmail = string.Empty,
+ BillingFirstName = string.Empty,
+ BillingLastName = string.Empty,
+ BillingStreet = string.Empty,
+ BillingHouseNumber = string.Empty,
+ BillingHouseNumberSuffix = string.Empty,
+ BillingPostalCode = string.Empty,
+ BillingPhoneNumber = string.Empty,
+
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+ }
}
diff --git a/BuckarooSdk.Tests/Services/Capayable/CapayableTests.cs b/BuckarooSdk.Tests/Services/Capayable/CapayableTests.cs
index 0fd6d9e..a8f6fac 100644
--- a/BuckarooSdk.Tests/Services/Capayable/CapayableTests.cs
+++ b/BuckarooSdk.Tests/Services/Capayable/CapayableTests.cs
@@ -1,230 +1,230 @@
+using System;
+using System.Globalization;
+using BuckarooSdk.DataTypes.ParameterGroups.Capayable;
using BuckarooSdk.DataTypes.RequestBases;
using BuckarooSdk.Logging;
+using BuckarooSdk.Services.Capayable;
using BuckarooSdk.Tests.Constants;
using Microsoft.VisualStudio.TestTools.UnitTesting;
-using System;
-using System.Diagnostics;
-using System.Globalization;
-using BuckarooSdk.DataTypes.ParameterGroups.Capayable;
-using BuckarooSdk.Services.Capayable;
namespace BuckarooSdk.Tests.Services.Capayable
{
- [TestClass]
- public class CapayableTests
- {
- private SdkClient _buckarooClient;
- private string TestName => nameof(CapayableTests).ToUpper();
-
- [TestInitialize]
- public void Setup()
- {
- this._buckarooClient = new SdkClient(TestSettings.Logger);
- }
-
- [TestMethod]
- public void PayTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- ClientIp = new DataTypes.IpAddress()
- {
- Type = DataTypes.InternetProtocolVersion.IPv4,
- Address = "127.0.0.1"
- },
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .Capayable() // Choose the paymentmethod you want to use
- .Pay(new CapayablePayRequest // choose the action you want to use and provide the payment method specific info.
- {
- CustomerType = "Debtor", // Mandatory
- InvoiceDate = DateTime.MinValue, // Mandatory
- Person = new Person
- {
- LastName = "de Tester",// Mandatory
- Initials = "JdT",// Mandatory
- Gender = 1,// Mandatory
- Culture = "nl-NL",// Mandatory
- BirthDate = DateTime.MinValue,// Mandatory
- },
- Address = new Address
- {
- Street = "Straatje",// Mandatory
- HouseNumber = 1,// Mandatory
- HouseNumberSuffix = string.Empty,
- ZipCode = "1234AB",// Mandatory
- City = "Stadje",// Mandatory
- Country = "NL",// Mandatory
- },
- Phone = new CustomerPhone
- {
- Phone = "11187654321",// Mandatory
- Fax = string.Empty,
- },
- Email = new EmailAddress
- {
- Email = "jan@jdt.nl",// Mandatory
- },
- Company = new Company
- {
- Name = string.Empty,
- ChamberOfCommerce = string.Empty,
- },
- ProductLine = new ProductLine
- {
- Code = "1234",// Mandatory
- Name = "ProductNaam",// Mandatory
- Quantity = 1,// Mandatory
- Price = 12,// Mandatory
- },
- SubTotalLine = new SubTotalLine
- {
- Name = string.Empty,
- Value = string.Empty,
- },
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestMethod]
- public void RefundTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- ClientIp = new DataTypes.IpAddress()
- {
- Type = DataTypes.InternetProtocolVersion.IPv4,
- Address = "127.0.0.1"
- },
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- OriginalTransactionKey = "",
- AmountCredit = 2,
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .Capayable() // Choose the paymentmethod you want to use
- .Refund(new CapayableRefundRequest // choose the action you want to use and provide the payment method specific info.
- {
-
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestMethod]
- public void PayInInstallmentsTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- ClientIp = new DataTypes.IpAddress()
- {
- Type = DataTypes.InternetProtocolVersion.IPv4,
- Address = "127.0.0.1"
- },
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .Capayable() // Choose the paymentmethod you want to use
- .PayInInstallments(new CapayablePayInInstallmentsRequest // choose the action you want to use and provide the payment method specific info.
- {
- IsInThreeGuarantee = string.Empty,
- CustomerType = "Debtor", // Mandatory
- InvoiceDate = DateTime.MinValue, // Mandatory
- Person = new Person
- {
- LastName = "de Tester",// Mandatory
- Initials = "JdT",// Mandatory
- Gender = 1,// Mandatory
- Culture = "nl-NL",// Mandatory
- BirthDate = DateTime.MinValue,// Mandatory
- },
- Address = new Address
- {
- Street = "Straatje",// Mandatory
- HouseNumber = 1,// Mandatory
- HouseNumberSuffix = string.Empty,
- ZipCode = "1234AB",// Mandatory
- City = "Stadje",// Mandatory
- Country = "NL",// Mandatory
- },
- Phone = new CustomerPhone
- {
- Phone = "11187654321",// Mandatory
- Fax = string.Empty,
- },
- Email = new EmailAddress
- {
- Email = "jan@jdt.nl",// Mandatory
- },
- Company = new Company
- {
- Name = string.Empty,
- ChamberOfCommerce = string.Empty,
- },
- ProductLine = new ProductLine
- {
- Code = "1234",// Mandatory
- Name = "ProductNaam",// Mandatory
- Quantity = 1,// Mandatory
- Price = 12,// Mandatory
- },
- SubTotalLine = new SubTotalLine
- {
- Name = string.Empty,
- Value = string.Empty,
- },
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestCleanup]
- public void TearDown()
- {
- this._buckarooClient = null;
- }
- }
+ [TestClass]
+ public class CapayableTests
+ {
+ private SdkClient _buckarooClient;
+
+ private string TestName => nameof(CapayableTests).ToUpper();
+
+ [TestInitialize]
+ public void Setup()
+ {
+ _buckarooClient = new SdkClient(TestSettings.Logger);
+ }
+
+ [TestMethod]
+ public void PayTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ ClientIp = new DataTypes.IpAddress()
+ {
+ Type = DataTypes.InternetProtocolVersion.IPv4,
+ Address = "127.0.0.1"
+ },
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .Capayable() // Choose the paymentmethod you want to use
+ .Pay(new CapayablePayRequest // choose the action you want to use and provide the payment method specific info.
+ {
+ CustomerType = "Debtor", // Mandatory
+ InvoiceDate = DateTime.MinValue, // Mandatory
+ Person = new Person
+ {
+ LastName = "de Tester",// Mandatory
+ Initials = "JdT",// Mandatory
+ Gender = 1,// Mandatory
+ Culture = "nl-NL",// Mandatory
+ BirthDate = DateTime.MinValue,// Mandatory
+ },
+ Address = new Address
+ {
+ Street = "Straatje",// Mandatory
+ HouseNumber = 1,// Mandatory
+ HouseNumberSuffix = string.Empty,
+ ZipCode = "1234AB",// Mandatory
+ City = "Stadje",// Mandatory
+ Country = "NL",// Mandatory
+ },
+ Phone = new CustomerPhone
+ {
+ Phone = "11187654321",// Mandatory
+ Fax = string.Empty,
+ },
+ Email = new EmailAddress
+ {
+ Email = "jan@jdt.nl",// Mandatory
+ },
+ Company = new Company
+ {
+ Name = string.Empty,
+ ChamberOfCommerce = string.Empty,
+ },
+ ProductLine = new ProductLine
+ {
+ Code = "1234",// Mandatory
+ Name = "ProductNaam",// Mandatory
+ Quantity = 1,// Mandatory
+ Price = 12,// Mandatory
+ },
+ SubTotalLine = new SubTotalLine
+ {
+ Name = string.Empty,
+ Value = string.Empty,
+ },
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void RefundTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ ClientIp = new DataTypes.IpAddress()
+ {
+ Type = DataTypes.InternetProtocolVersion.IPv4,
+ Address = "127.0.0.1"
+ },
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ OriginalTransactionKey = "",
+ AmountCredit = 2,
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .Capayable() // Choose the paymentmethod you want to use
+ .Refund(new CapayableRefundRequest // choose the action you want to use and provide the payment method specific info.
+ {
+
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void PayInInstallmentsTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ ClientIp = new DataTypes.IpAddress()
+ {
+ Type = DataTypes.InternetProtocolVersion.IPv4,
+ Address = "127.0.0.1"
+ },
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .Capayable() // Choose the paymentmethod you want to use
+ .PayInInstallments(new CapayablePayInInstallmentsRequest // choose the action you want to use and provide the payment method specific info.
+ {
+ IsInThreeGuarantee = string.Empty,
+ CustomerType = "Debtor", // Mandatory
+ InvoiceDate = DateTime.MinValue, // Mandatory
+ Person = new Person
+ {
+ LastName = "de Tester",// Mandatory
+ Initials = "JdT",// Mandatory
+ Gender = 1,// Mandatory
+ Culture = "nl-NL",// Mandatory
+ BirthDate = DateTime.MinValue,// Mandatory
+ },
+ Address = new Address
+ {
+ Street = "Straatje",// Mandatory
+ HouseNumber = 1,// Mandatory
+ HouseNumberSuffix = string.Empty,
+ ZipCode = "1234AB",// Mandatory
+ City = "Stadje",// Mandatory
+ Country = "NL",// Mandatory
+ },
+ Phone = new CustomerPhone
+ {
+ Phone = "11187654321",// Mandatory
+ Fax = string.Empty,
+ },
+ Email = new EmailAddress
+ {
+ Email = "jan@jdt.nl",// Mandatory
+ },
+ Company = new Company
+ {
+ Name = string.Empty,
+ ChamberOfCommerce = string.Empty,
+ },
+ ProductLine = new ProductLine
+ {
+ Code = "1234",// Mandatory
+ Name = "ProductNaam",// Mandatory
+ Quantity = 1,// Mandatory
+ Price = 12,// Mandatory
+ },
+ SubTotalLine = new SubTotalLine
+ {
+ Name = string.Empty,
+ Value = string.Empty,
+ },
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestCleanup]
+ public void TearDown()
+ {
+ _buckarooClient = null;
+ }
+ }
}
diff --git a/BuckarooSdk.Tests/Services/CreditManagement/CreditManagementTests.cs b/BuckarooSdk.Tests/Services/CreditManagement/CreditManagementTests.cs
index 46372de..58b9784 100644
--- a/BuckarooSdk.Tests/Services/CreditManagement/CreditManagementTests.cs
+++ b/BuckarooSdk.Tests/Services/CreditManagement/CreditManagementTests.cs
@@ -1,81 +1,82 @@
using System;
-using BuckarooSdk.Services.CreditManagement.DataRequest;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Globalization;
using BuckarooSdk.DataTypes.ParameterGroups.CreditManagement3;
using BuckarooSdk.DataTypes.RequestBases;
+using BuckarooSdk.Services.CreditManagement.DataRequest;
using BuckarooSdk.Tests.Constants;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace BuckarooSdk.Tests.Services.CreditManagement
{
- [TestClass]
- public class CreditManagementTests
- {
- private SdkClient _sdkClient;
+ [TestClass]
+ public class CreditManagementTests
+ {
+ private SdkClient _sdkClient;
- [TestInitialize]
- public void Setup()
- {
- this._sdkClient = new SdkClient(TestSettings.Logger);
- }
+ [TestInitialize]
+ public void Setup()
+ {
+ _sdkClient = new SdkClient(TestSettings.Logger);
+ }
- [TestMethod]
- public void CreateInvoice()
- {
- var datarequest = this._sdkClient.CreateRequest()
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, CultureInfo.GetCultureInfo("nl-NL"))
- .DataRequest()
- .SetBasicFields(new DataBase
- {
- Currency = "EUR",
- Invoice = $"SDK_TEST_{DateTime.Now.Ticks}",
- Description = "CM3_CREATEINVOICE_SDK_TEST",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- })
- .CreditManagement()
- .CreateInvoice(new CreditManagementCreateInvoiceRequest
- {
- InvoiceDate = DateTime.Now,
- DueDate = DateTime.Now.AddDays(5),
- SchemeKey = "99wofp",
- InvoiceAmount = 60.00m,
- Debtor = new Debtor
- {
- Code = "20161124",
- },
- Person = new Person
- {
- Initials = "JJA",
- FirstName = "Sjaak",
- LastName = "Roos",
- Gender = BuckarooSdk.Services.CreditManagement.Constants.Gender.Male,
- Culture = "nl-NL",
- },
- Address = new Address
- {
- Street = "Zonnebaan",
- HouseNumber = "9",
- ZipCode = "3542 EA",
- City = "Utrecht",
- Country = "NL",
- },
- Email = new EmailAddress
- {
- Email = "techsup@buckaroo.nl",
- },
- Phone = new Phone
- {
- Mobile = "0600000000",
- },
- });
+ [TestMethod]
+ public void CreateInvoice()
+ {
+ var datarequest = _sdkClient
+ .CreateRequest()
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, CultureInfo.GetCultureInfo("nl-NL"))
+ .DataRequest()
+ .SetBasicFields(new DataBase
+ {
+ Currency = "EUR",
+ Invoice = $"SDK_TEST_{DateTime.Now.Ticks}",
+ Description = "CM3_CREATEINVOICE_SDK_TEST",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ })
+ .CreditManagement()
+ .CreateInvoice(new CreditManagementCreateInvoiceRequest
+ {
+ InvoiceDate = DateTime.Now,
+ DueDate = DateTime.Now.AddDays(5),
+ SchemeKey = "99wofp",
+ InvoiceAmount = 60.00m,
+ Debtor = new Debtor
+ {
+ Code = "20161124",
+ },
+ Person = new Person
+ {
+ Initials = "JJA",
+ FirstName = "Sjaak",
+ LastName = "Roos",
+ Gender = BuckarooSdk.Services.CreditManagement.Constants.Gender.Male,
+ Culture = "nl-NL",
+ },
+ Address = new Address
+ {
+ Street = "Zonnebaan",
+ HouseNumber = "9",
+ ZipCode = "3542 EA",
+ City = "Utrecht",
+ Country = "NL",
+ },
+ Email = new EmailAddress
+ {
+ Email = "techsup@buckaroo.nl",
+ },
+ Phone = new Phone
+ {
+ Mobile = "0600000000",
+ },
+ });
- var requestResponse = datarequest.Execute();
+ var requestResponse = datarequest.Execute();
- //var logging = this._sdkClient.LoggerFactory.GetFullLog();
- //Console.WriteLine(logging);
- }
- }
+ //var logging = this._sdkClient.LoggerFactory.GetFullLog();
+ //Console.WriteLine(logging);
+ }
+ }
}
diff --git a/BuckarooSdk.Tests/Services/Giftcard/VVVGiftcardTests.cs b/BuckarooSdk.Tests/Services/Giftcard/VVVGiftcardTests.cs
index 7415d15..e3632be 100644
--- a/BuckarooSdk.Tests/Services/Giftcard/VVVGiftcardTests.cs
+++ b/BuckarooSdk.Tests/Services/Giftcard/VVVGiftcardTests.cs
@@ -9,74 +9,74 @@
namespace BuckarooSdk.Tests.Services.Giftcard
{
- [TestClass]
- public class VVVGiftcardTests
- {
- public SdkClient BuckarooClient { get; private set; }
+ [TestClass]
+ public class VVVGiftcardTests
+ {
+ public SdkClient BuckarooClient { get; private set; }
- [TestInitialize]
- public void Setup()
- {
- this.BuckarooClient = new SdkClient(TestSettings.Logger);
- }
+ [TestInitialize]
+ public void Setup()
+ {
+ this.BuckarooClient = new SdkClient(TestSettings.Logger);
+ }
- [TestMethod]
- public void PayTest()
- {
- var request =
- this.BuckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- AmountDebit = 3.50m,
- Invoice = $"SDK_TEST_{DateTime.Now.Ticks}",
- Description = "VVV_PAY_SDK_UNITTEST",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- })
- .VVVGiftcard() // Choose the paymentmethod you want to use
- .Pay(new VVVGiftcardPayRequest // choose the action you want to use and provide the payment method specific info.
- {
+ [TestMethod]
+ public void PayTest()
+ {
+ var request =
+ this.BuckarooClient.CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ AmountDebit = 3.50m,
+ Invoice = $"SDK_TEST_{DateTime.Now.Ticks}",
+ Description = "VVV_PAY_SDK_UNITTEST",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ })
+ .VVVGiftcard() // Choose the paymentmethod you want to use
+ .Pay(new VVVGiftcardPayRequest // choose the action you want to use and provide the payment method specific info.
+ {
IntersolveCardnumber = "0000000000000000001",
IntersolvePin = "350"
- });
+ });
- var response = request.Execute();
+ var response = request.Execute();
- if (response.RequiredAction != null)
- {
- //optie 1
- Process.Start(response.RequiredAction.RedirectURL);
+ if (response.RequiredAction != null)
+ {
+ //optie 1
+ Process.Start(response.RequiredAction.RedirectURL);
}
- Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
+ Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
- [TestMethod]
- public void RefundTest()
- {
- var request = this.BuckarooClient.CreateRequest()
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest()
- .SetBasicFields(new TransactionBase
- {
- AmountCredit = 0.02m,
- Currency = "EUR",
- Invoice = "SDK_TEST_636196508460881929", //set before each refund test
- OriginalTransactionKey = "DDE3795437444D2AB1B803EA829C89E5", //set before each refund test
- Description = "VVVGiftcard_REFUND_SDK_UNITTEST",
- })
- .VVVGiftcard()
- .Refund(new VVVGiftcardRefundRequest());
+ [TestMethod]
+ public void RefundTest()
+ {
+ var request = this.BuckarooClient.CreateRequest()
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest()
+ .SetBasicFields(new TransactionBase
+ {
+ AmountCredit = 0.02m,
+ Currency = "EUR",
+ Invoice = "SDK_TEST_636196508460881929", //set before each refund test
+ OriginalTransactionKey = "DDE3795437444D2AB1B803EA829C89E5", //set before each refund test
+ Description = "VVVGiftcard_REFUND_SDK_UNITTEST",
+ })
+ .VVVGiftcard()
+ .Refund(new VVVGiftcardRefundRequest());
- var response = request.Execute();
+ var response = request.Execute();
- var logging = response.BuckarooSdkLogger.GetFullLog();
- Console.WriteLine(logging);
- }
- }
+ var logging = response.BuckarooSdkLogger.GetFullLog();
+ Console.WriteLine(logging);
+ }
+ }
}
diff --git a/BuckarooSdk.Tests/Services/IdealQr/IdealQrTests.cs b/BuckarooSdk.Tests/Services/IdealQr/IdealQrTests.cs
index c81bd69..914b4e5 100644
--- a/BuckarooSdk.Tests/Services/IdealQr/IdealQrTests.cs
+++ b/BuckarooSdk.Tests/Services/IdealQr/IdealQrTests.cs
@@ -8,55 +8,56 @@
namespace BuckarooSdk.Tests.Services.IdealQr
{
- [TestClass]
- public class IdealQrTests
- {
- public SdkClient BuckarooClient { get; private set; }
-
- [TestInitialize]
- public void Setup()
- {
- this.BuckarooClient = new SdkClient(TestSettings.Logger);
- }
-
- [TestMethod]
- public void GenerateTest()
- {
- var request = this.BuckarooClient.CreateRequest()
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .DataRequest()
- .SetBasicFields(new DataBase())
- .IdealQr()
- .Generate(new IdealQrGenerateRequest()
- {
- Amount = 0.02m,
- Description = "Dit is de description.",
- Expiration = DateTime.Now.AddDays(4),
- AmountIsChangeable = true,
- MinAmount = 0.02m,
- MaxAmount = 0.05m,
- ImageSize = 250,
- PurchaseId = "purchaseId",
- IsOneOff = true,
- IsProcessing = false,
- });
-
- var response = request.Execute();
-
- var rawRequest = response.BuckarooSdkLogger.GetRawRequest();
-
- var actionResponse = response.GetActionResponse();
-
- var qrImageUrl = actionResponse.QrImageUrl;
-
- //From this point on a Merchant can do anything he wants with a qr. He can save the link if it is later on used in an email
- //or printed on a sticker or poster. He can also return it and place it in a
tag on a website. In this example I run
- //just the image url to confirm that is returns a legit image of an iDEAL QR image.
-
- if (response.Status.Code.Code == BuckarooSdk.Constants.Status.Success)
- {
- Process.Start(actionResponse.QrImageUrl);
- }
- }
- }
+ [TestClass]
+ public class IdealQrTests
+ {
+ public SdkClient _buckarooClient;
+
+ [TestInitialize]
+ public void Setup()
+ {
+ _buckarooClient = new SdkClient(TestSettings.Logger);
+ }
+
+ [TestMethod]
+ public void GenerateTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest()
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .DataRequest()
+ .SetBasicFields(new DataBase())
+ .IdealQr()
+ .Generate(new IdealQrGenerateRequest()
+ {
+ Amount = 0.02m,
+ Description = "Dit is de description.",
+ Expiration = DateTime.Now.AddDays(4),
+ AmountIsChangeable = true,
+ MinAmount = 0.02m,
+ MaxAmount = 0.05m,
+ ImageSize = 250,
+ PurchaseId = "purchaseId",
+ IsOneOff = true,
+ IsProcessing = false,
+ });
+
+ var response = request.Execute();
+
+ var rawRequest = response.BuckarooSdkLogger.GetRawRequest();
+
+ var actionResponse = response.GetActionResponse();
+
+ var qrImageUrl = actionResponse.QrImageUrl;
+
+ //From this point on a Merchant can do anything he wants with a qr. He can save the link if it is later on used in an email
+ //or printed on a sticker or poster. He can also return it and place it in a
tag on a website. In this example I run
+ //just the image url to confirm that is returns a legit image of an iDEAL QR image.
+
+ if (response.Status.Code.Code == BuckarooSdk.Constants.Status.Success)
+ {
+ Process.Start(actionResponse.QrImageUrl);
+ }
+ }
+ }
}
diff --git a/BuckarooSdk.Tests/Services/MasterCard/MasterCardTests.cs b/BuckarooSdk.Tests/Services/MasterCard/MasterCardTests.cs
index c90ec97..87542f5 100644
--- a/BuckarooSdk.Tests/Services/MasterCard/MasterCardTests.cs
+++ b/BuckarooSdk.Tests/Services/MasterCard/MasterCardTests.cs
@@ -1,546 +1,543 @@
using System;
-using BuckarooSdk.DataTypes.RequestBases;
-using BuckarooSdk.Services.CreditCards.Request;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using System;
using System.Globalization;
using BuckarooSdk.DataTypes.RequestBases;
-using BuckarooSdk.Services.CreditCards.MasterCard;
using BuckarooSdk.Logging;
using BuckarooSdk.Services.CreditCards.MasterCard.Request;
+using BuckarooSdk.Services.CreditCards.Request;
using BuckarooSdk.Tests.Constants;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace BuckarooSdk.Tests.Services.MasterCard
{
- [TestClass]
- public class MasterCardTests
- {
- private SdkClient _buckarooClient;
- private string TestName => nameof(MasterCardTests).ToUpper();
-
- [TestInitialize]
- public void Setup()
- {
- this._buckarooClient = new SdkClient(Constants.TestSettings.Logger);
- }
-
- #region MasterCard
- [TestMethod]
- [Obsolete]
- public void PayTest()
- {
- var request = this._buckarooClient.CreateRequest()
- .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest()
- .SetBasicFields(new TransactionBase
- {
- Currency = "EUR",
- AmountDebit = 0.02m,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- Description = $"{ TestName }_SDK_UNITTEST",
- })
- .MasterCard()
- .Pay(new MasterCardPayRequest()
- {
- //set properties
- });
-
- var response = request.Execute();
- }
-
- [TestMethod]
- [Obsolete]
- public void RefundTest()
- {
- var request = this._buckarooClient.CreateRequest()
- .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest()
- .SetBasicFields(new TransactionBase
- {
- Currency = "EUR",
- AmountCredit = 0.02m,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- OriginalTransactionKey = "59915ADC227149F4A3ACE9E0C8589D3C",
- Description = $"{ TestName }_SDK_UNITTEST",
- })
- .MasterCard()
- .Refund(new MasterCardRefundRequest()
- {
- //set properties
- });
- var response = request.Execute();
- }
-
- [TestMethod]
- [Obsolete]
- public void AuthorizeTest()
- {
- var request = this._buckarooClient.CreateRequest()
- .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest()
- .SetBasicFields(new TransactionBase
- {
- Currency = "EUR",
- AmountDebit = 0.02m,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- Description = $"{ TestName }_SDK_UNITTEST",
-
- })
- .MasterCard()
- .Authorize(new MasterCardAuthorizeRequest()
- {
- //set properties
- });
-
- var response = request.Execute();
- }
-
- [TestMethod]
- [Obsolete]
- public void CaptureTest()
- {
- var request = this._buckarooClient.CreateRequest()
- .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest()
- .SetBasicFields(new TransactionBase
- {
- Currency = "EUR",
- AmountDebit = 0.02m,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .MasterCard()
- .Capture(new MasterCardCaptureRequest()
- {
- //set properties
- });
-
- var response = request.Execute();
- }
-
- [TestMethod]
- [Obsolete]
- public void PayRecurrentTest()
- {
- var request = this._buckarooClient.CreateRequest()
- .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest()
- .SetBasicFields(new TransactionBase
- {
- Currency = "EUR",
- AmountDebit = 0.02m,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .MasterCard()
- .PayRecurrent(new MasterCardPayRecurrentRequest()
- {
- //define properties
- });
- var response = request.Execute();
- }
-
- [TestMethod]
- [Obsolete]
- public void PayRemainderTest()
- {
- var request = this._buckarooClient.CreateRequest()
- .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest()
- .SetBasicFields(new TransactionBase
- {
- Currency = "EUR",
- AmountDebit = 0.02m,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .MasterCard()
- .PayRemainder(new MasterCardPayRemainderRequest()
- {
- //define properties
- });
-
- var response = request.Execute();
- }
-
- [TestMethod]
- public void CancelAuthorizeTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- OriginalTransactionKey = "",
- AmountCredit = 2,
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .MasterCard() // Choose the paymentmethod you want to use
- .CancelAuthorize(new MasterCardCancelAuthorizeRequest // choose the action you want to use and provide the payment method specific info.
- {
-
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestMethod]
- public void PayEncryptedTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .MasterCard() // Choose the paymentmethod you want to use
- .PayEncrypted(new MasterCardPayEncryptedRequest // choose the action you want to use and provide the payment method specific info.
- {
- EncryptedCardData = string.Empty,
-
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestMethod]
- public void AuthorizeEncryptedTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .MasterCard() // Choose the paymentmethod you want to use
- .AuthorizeEncrypted(new MasterCardAuthorizeEncryptedRequest // choose the action you want to use and provide the payment method specific info.
- {
- EncryptedCardData = string.Empty,
-
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
- #endregion
-
- #region CreditCard
- [TestMethod]
- public void PayTestCreditCard()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .MasterCard() // Choose the paymentmethod you want to use
- .Pay(new CreditCardPayRequest // choose the action you want to use and provide the payment method specific info.
- {
- CustomerCode = string.Empty,
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestMethod]
- public void RefundTestCreditCard()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- OriginalTransactionKey = "",
- AmountCredit = 2,
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .MasterCard() // Choose the paymentmethod you want to use
- .Refund(new CreditCardRefundRequest // choose the action you want to use and provide the payment method specific info.
- {
-
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestMethod]
- public void AuthorizeTestCreditCard()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .MasterCard() // Choose the paymentmethod you want to use
- .Authorize(new CreditCardAuthorizeRequest // choose the action you want to use and provide the payment method specific info.
- {
- CustomerCode = string.Empty,
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestMethod]
- public void CaptureTestCreditCard()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- OriginalTransactionKey = "",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .MasterCard() // Choose the paymentmethod you want to use
- .Capture(new CreditCardCaptureRequest // choose the action you want to use and provide the payment method specific info.
- {
-
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestMethod]
- public void CancelAuthorizeTestCreditCard()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- OriginalTransactionKey = "",
- AmountCredit = 2,
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .MasterCard() // Choose the paymentmethod you want to use
- .CancelAuthorize(new CreditCardCancelAuthorizeRequest // choose the action you want to use and provide the payment method specific info.
- {
-
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestMethod]
- public void PayRecurrentTestCreditCard()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- OriginalTransactionKey = "",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .MasterCard() // Choose the paymentmethod you want to use
- .PayRecurrent(new CreditCardPayRecurrentRequest // choose the action you want to use and provide the payment method specific info.
- {
-
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestMethod]
- public void PayRemainderTestCreditCard()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- OriginalTransactionKey = "",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .MasterCard() // Choose the paymentmethod you want to use
- .PayRemainder(new CreditCardPayRemainderRequest // choose the action you want to use and provide the payment method specific info.
- {
- CustomerCode = string.Empty,
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestMethod]
- public void PayEncryptedTestCreditCard()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .MasterCard() // Choose the paymentmethod you want to use
- .PayEncrypted(new CreditCardPayEncryptedRequest // choose the action you want to use and provide the payment method specific info.
- {
- EncryptedCardData = string.Empty,
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestMethod]
- public void AuthorizeEncryptedTestCreditCard()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .MasterCard() // Choose the paymentmethod you want to use
- .AuthorizeEncrypted(new CreditCardAuthorizeEncryptedRequest // choose the action you want to use and provide the payment method specific info.
- {
- EncryptedCardData = string.Empty,
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
- #endregion
- }
+ [TestClass]
+ public class MasterCardTests
+ {
+ private SdkClient _buckarooClient;
+ private string TestName => nameof(MasterCardTests).ToUpper();
+
+ [TestInitialize]
+ public void Setup()
+ {
+ this._buckarooClient = new SdkClient(Constants.TestSettings.Logger);
+ }
+
+ #region MasterCard
+ [TestMethod]
+ [Obsolete]
+ public void PayTest()
+ {
+ var request = this._buckarooClient.CreateRequest()
+ .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest()
+ .SetBasicFields(new TransactionBase
+ {
+ Currency = "EUR",
+ AmountDebit = 0.02m,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ Description = $"{ TestName }_SDK_UNITTEST",
+ })
+ .MasterCard()
+ .Pay(new MasterCardPayRequest()
+ {
+ //set properties
+ });
+
+ var response = request.Execute();
+ }
+
+ [TestMethod]
+ [Obsolete]
+ public void RefundTest()
+ {
+ var request = this._buckarooClient.CreateRequest()
+ .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest()
+ .SetBasicFields(new TransactionBase
+ {
+ Currency = "EUR",
+ AmountCredit = 0.02m,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ OriginalTransactionKey = "59915ADC227149F4A3ACE9E0C8589D3C",
+ Description = $"{ TestName }_SDK_UNITTEST",
+ })
+ .MasterCard()
+ .Refund(new MasterCardRefundRequest()
+ {
+ //set properties
+ });
+ var response = request.Execute();
+ }
+
+ [TestMethod]
+ [Obsolete]
+ public void AuthorizeTest()
+ {
+ var request = this._buckarooClient.CreateRequest()
+ .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest()
+ .SetBasicFields(new TransactionBase
+ {
+ Currency = "EUR",
+ AmountDebit = 0.02m,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ Description = $"{ TestName }_SDK_UNITTEST",
+
+ })
+ .MasterCard()
+ .Authorize(new MasterCardAuthorizeRequest()
+ {
+ //set properties
+ });
+
+ var response = request.Execute();
+ }
+
+ [TestMethod]
+ [Obsolete]
+ public void CaptureTest()
+ {
+ var request = this._buckarooClient.CreateRequest()
+ .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest()
+ .SetBasicFields(new TransactionBase
+ {
+ Currency = "EUR",
+ AmountDebit = 0.02m,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .MasterCard()
+ .Capture(new MasterCardCaptureRequest()
+ {
+ //set properties
+ });
+
+ var response = request.Execute();
+ }
+
+ [TestMethod]
+ [Obsolete]
+ public void PayRecurrentTest()
+ {
+ var request = this._buckarooClient.CreateRequest()
+ .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest()
+ .SetBasicFields(new TransactionBase
+ {
+ Currency = "EUR",
+ AmountDebit = 0.02m,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .MasterCard()
+ .PayRecurrent(new MasterCardPayRecurrentRequest()
+ {
+ //define properties
+ });
+ var response = request.Execute();
+ }
+
+ [TestMethod]
+ [Obsolete]
+ public void PayRemainderTest()
+ {
+ var request = this._buckarooClient.CreateRequest()
+ .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest()
+ .SetBasicFields(new TransactionBase
+ {
+ Currency = "EUR",
+ AmountDebit = 0.02m,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .MasterCard()
+ .PayRemainder(new MasterCardPayRemainderRequest()
+ {
+ //define properties
+ });
+
+ var response = request.Execute();
+ }
+
+ [TestMethod]
+ public void CancelAuthorizeTest()
+ {
+ var request =
+ this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ OriginalTransactionKey = "",
+ AmountCredit = 2,
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .MasterCard() // Choose the paymentmethod you want to use
+ .CancelAuthorize(new MasterCardCancelAuthorizeRequest // choose the action you want to use and provide the payment method specific info.
+ {
+
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void PayEncryptedTest()
+ {
+ var request =
+ this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .MasterCard() // Choose the paymentmethod you want to use
+ .PayEncrypted(new MasterCardPayEncryptedRequest // choose the action you want to use and provide the payment method specific info.
+ {
+ EncryptedCardData = string.Empty,
+
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void AuthorizeEncryptedTest()
+ {
+ var request =
+ this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .MasterCard() // Choose the paymentmethod you want to use
+ .AuthorizeEncrypted(new MasterCardAuthorizeEncryptedRequest // choose the action you want to use and provide the payment method specific info.
+ {
+ EncryptedCardData = string.Empty,
+
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+ #endregion
+
+ #region CreditCard
+ [TestMethod]
+ public void PayTestCreditCard()
+ {
+ var request =
+ this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .MasterCard() // Choose the paymentmethod you want to use
+ .Pay(new CreditCardPayRequest // choose the action you want to use and provide the payment method specific info.
+ {
+ CustomerCode = string.Empty,
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void RefundTestCreditCard()
+ {
+ var request =
+ this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ OriginalTransactionKey = "",
+ AmountCredit = 2,
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .MasterCard() // Choose the paymentmethod you want to use
+ .Refund(new CreditCardRefundRequest // choose the action you want to use and provide the payment method specific info.
+ {
+
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void AuthorizeTestCreditCard()
+ {
+ var request =
+ this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .MasterCard() // Choose the paymentmethod you want to use
+ .Authorize(new CreditCardAuthorizeRequest // choose the action you want to use and provide the payment method specific info.
+ {
+ CustomerCode = string.Empty,
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void CaptureTestCreditCard()
+ {
+ var request =
+ this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ OriginalTransactionKey = "",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .MasterCard() // Choose the paymentmethod you want to use
+ .Capture(new CreditCardCaptureRequest // choose the action you want to use and provide the payment method specific info.
+ {
+
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void CancelAuthorizeTestCreditCard()
+ {
+ var request =
+ this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ OriginalTransactionKey = "",
+ AmountCredit = 2,
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .MasterCard() // Choose the paymentmethod you want to use
+ .CancelAuthorize(new CreditCardCancelAuthorizeRequest // choose the action you want to use and provide the payment method specific info.
+ {
+
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void PayRecurrentTestCreditCard()
+ {
+ var request =
+ this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ OriginalTransactionKey = "",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .MasterCard() // Choose the paymentmethod you want to use
+ .PayRecurrent(new CreditCardPayRecurrentRequest // choose the action you want to use and provide the payment method specific info.
+ {
+
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void PayRemainderTestCreditCard()
+ {
+ var request =
+ this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ OriginalTransactionKey = "",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .MasterCard() // Choose the paymentmethod you want to use
+ .PayRemainder(new CreditCardPayRemainderRequest // choose the action you want to use and provide the payment method specific info.
+ {
+ CustomerCode = string.Empty,
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void PayEncryptedTestCreditCard()
+ {
+ var request =
+ this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .MasterCard() // Choose the paymentmethod you want to use
+ .PayEncrypted(new CreditCardPayEncryptedRequest // choose the action you want to use and provide the payment method specific info.
+ {
+ EncryptedCardData = string.Empty,
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void AuthorizeEncryptedTestCreditCard()
+ {
+ var request =
+ this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .MasterCard() // Choose the paymentmethod you want to use
+ .AuthorizeEncrypted(new CreditCardAuthorizeEncryptedRequest // choose the action you want to use and provide the payment method specific info.
+ {
+ EncryptedCardData = string.Empty,
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+ #endregion
+ }
}
diff --git a/BuckarooSdk.Tests/Services/P24/P24Tests.cs b/BuckarooSdk.Tests/Services/P24/P24Tests.cs
index fffe5f6..3dd566e 100644
--- a/BuckarooSdk.Tests/Services/P24/P24Tests.cs
+++ b/BuckarooSdk.Tests/Services/P24/P24Tests.cs
@@ -2,67 +2,69 @@
using System.Globalization;
using BuckarooSdk.DataTypes.RequestBases;
using BuckarooSdk.Services.P24.TransactionRequest;
+using BuckarooSdk.Tests.Constants;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace BuckarooSdk.Tests.Services.P24
{
- [TestClass]
- public class P24Tests
- {
- private SdkClient _sdkClient;
+ [TestClass]
+ public class P24Tests
+ {
+ private SdkClient _buckarooClient;
- [TestInitialize]
- public void Setup()
- {
- this._sdkClient = new SdkClient(Constants.TestSettings.Logger);
- }
+ [TestInitialize]
+ public void Setup()
+ {
+ _buckarooClient = new SdkClient(TestSettings.Logger);
+ }
- [TestMethod]
- public void PayTest()
- {
- var request = this._sdkClient.CreateRequest()
- .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest()
- .SetBasicFields(new TransactionBase
- {
- Currency = "PLN",
- AmountDebit = 0.02m,
- Invoice = $"SDK_TEST_{DateTime.Now.Ticks}",
- Description = "P24_PAY_SDK_UNITTEST",
- })
- .P24()
- .Pay(new P24PayRequest()
- {
- CustomerEmail = "s.roos@buckaroo.nl",
- CustomerFirstName = "Sjaak",
- CustomerLastName = "Roos"
- });
+ [TestMethod]
+ public void PayTest()
+ {
+ var request = this._buckarooClient
+ .CreateRequest()
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest()
+ .SetBasicFields(new TransactionBase
+ {
+ Currency = "PLN",
+ AmountDebit = 0.02m,
+ Invoice = $"SDK_TEST_{DateTime.Now.Ticks}",
+ Description = "P24_PAY_SDK_UNITTEST",
+ })
+ .P24()
+ .Pay(new P24PayRequest()
+ {
+ CustomerEmail = "s.roos@buckaroo.nl",
+ CustomerFirstName = "Sjaak",
+ CustomerLastName = "Roos"
+ });
- var response = request.Execute();
+ var response = request.Execute();
+ }
- }
+ [TestMethod]
+ public void RefundTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest()
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest()
+ .SetBasicFields(new TransactionBase
+ {
+ OriginalTransactionKey = "FDE0FA2B028F4060BE8A3CDE822D211C",
+ Currency = "PLN",
+ Invoice = "SDK_TEST_636777962968205413",
+ AmountCredit = 0.02m,
+ Description = "P24_REFUND_SDK_UNITTEST",
+ })
+ .P24()
+ .Refund(new P24RefundRequest
+ {
+ //set properties
+ });
- [TestMethod]
- public void RefundTest()
- {
- var request = this._sdkClient.CreateRequest()
- .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest()
- .SetBasicFields(new TransactionBase
- {
- OriginalTransactionKey = "FDE0FA2B028F4060BE8A3CDE822D211C",
- Currency = "PLN",
- Invoice = "SDK_TEST_636777962968205413",
- AmountCredit = 0.02m,
- Description = "P24_REFUND_SDK_UNITTEST",
- })
- .P24()
- .Refund(new P24RefundRequest
- {
- //set properties
- });
-
- var response = request.Execute();
- }
- }
+ var response = request.Execute();
+ }
+ }
}
diff --git a/BuckarooSdk.Tests/Services/PayPal/PayPalTests.cs b/BuckarooSdk.Tests/Services/PayPal/PayPalTests.cs
index d9efc58..40e9311 100644
--- a/BuckarooSdk.Tests/Services/PayPal/PayPalTests.cs
+++ b/BuckarooSdk.Tests/Services/PayPal/PayPalTests.cs
@@ -1,136 +1,159 @@
using System;
-using BuckarooSdk.Services.PayPal;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Globalization;
using BuckarooSdk.DataTypes.RequestBases;
+using BuckarooSdk.Services.PayPal;
+using BuckarooSdk.Tests.Constants;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace BuckarooSdk.Tests.Services.PayPal
{
- [TestClass]
- public class PayPalTests
- {
- private SdkClient _sdkClient;
-
- [TestInitialize]
- public void Setup()
- {
- this._sdkClient = new SdkClient(Constants.TestSettings.Logger);
- }
-
- [TestMethod]
- public void PayTest()
- {
- var request = this._sdkClient.CreateRequest()
- .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest()
- .SetBasicFields(new TransactionBase
- {
- Currency = "EUR",
- AmountDebit = 0.02m,
- Invoice = $"SDK_TEST_{DateTime.Now.Ticks}",
- Description = "PAYPAL_PAY_SDK_UNITTEST",
- })
- .PayPal()
- .Pay(new PayPalPayRequest()
- {
- //define properties
- BuyerEmail = "techsup@buckaroo.nl",
- ProductName = "haardhout",
- });
-
- var paymentResponse = request.Execute();
- }
-
- [TestMethod]
- public void RefundTest()
- {
- var request = this._sdkClient.CreateRequest()
- .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest()
- .SetBasicFields(new TransactionBase
- {
- Currency = "EUR",
- AmountDebit = 0.02m,
- Invoice = $"SDK_TEST_{DateTime.Now.Ticks}"
- })
- .PayPal()
-
- .Refund(new PayPalRefundRequest()
- {
- //define properties
-
- });
-
- var response = request.Execute();
- }
-
- [TestMethod]
- public void PayRecurrentTest()
- {
- var request = this._sdkClient.CreateRequest()
- .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest()
- .SetBasicFields(new TransactionBase
- {
- Currency = "EUR",
- AmountDebit = 0.02m,
- Invoice = $"SDK_TEST_{DateTime.Now.Ticks}"
- })
- .PayPal()
-
- .PayRecurrent(new PayPalPayRecurrentRequest()
- {
- //define properties
-
- });
-
- var response = request.Execute();
- }
-
- [TestMethod]
- [Ignore]
- public void PayRemainderTest()
- {
- var request = this._sdkClient.CreateRequest()
- .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest()
- .SetBasicFields(new TransactionBase
- {
- Currency = "EUR",
- AmountDebit = 0.02m,
- Invoice = $"SDK_TEST_{DateTime.Now.Ticks}"
- })
- .PayPal()
-
- .PayRemainder(new PayPalPayRemainderRequest
- {
- //define properties
- BuyerEmail = "techsup@buckaroo.nl",
-
- });
-
- var response = request.Execute();
- }
-
- [TestMethod]
- public void ExtraInfoTest()
- {
- var request = this._sdkClient.CreateRequest()
- .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest()
- .SetBasicFields(new TransactionBase
- {
- Currency = "EUR",
- AmountDebit = 0.02m,
- Invoice = $"SDK_TEST_{DateTime.Now.Ticks}"
- })
- .PayPal()
- .ExtraInfo(new PayPalExtraInfoRequest
- {
- //define properties
- });
-
- var response = request.Execute();
- }
- }
+ [TestClass]
+ public class PayPalTests
+ {
+ private SdkClient _buckarooClient;
+
+ [TestInitialize]
+ public void Setup()
+ {
+ _buckarooClient = new SdkClient(TestSettings.Logger);
+ }
+
+ [TestMethod]
+ public void PayTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest()
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest()
+ .SetBasicFields(new TransactionBase
+ {
+ Currency = "EUR",
+ AmountDebit = 0.02m,
+ Invoice = $"SDK_TEST_{DateTime.Now.Ticks}",
+ Description = "PAYPAL_PAY_SDK_UNITTEST",
+ })
+ .PayPal()
+ .Pay(new PayPalPayRequest()
+ {
+ //define properties
+ BuyerEmail = "techsup@buckaroo.nl",
+ ProductName = "haardhout",
+ });
+
+ var paymentResponse = request.Execute();
+ }
+
+ [TestMethod]
+ [Obsolete]
+ public void RefundTest_Obsolete()
+ {
+ var request = _buckarooClient
+ .CreateRequest()
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest()
+ .SetBasicFields(new TransactionBase
+ {
+ Currency = "EUR",
+ AmountDebit = 0.02m,
+ Invoice = $"SDK_TEST_{DateTime.Now.Ticks}"
+ })
+ .PayPal()
+ .Refund(new PayPalRefundRequest()
+ {
+ //define properties
+
+ });
+
+ var response = request.Execute();
+ }
+
+ [TestMethod]
+ public void RefundTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest()
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest()
+ .SetBasicFields(new TransactionBase
+ {
+ Currency = "EUR",
+ AmountDebit = 0.02m,
+ Invoice = $"SDK_TEST_{DateTime.Now.Ticks}"
+ })
+ .PayPal()
+ .Refund();
+
+ var response = request.Execute();
+ }
+
+ [TestMethod]
+ public void PayRecurrentTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest()
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest()
+ .SetBasicFields(new TransactionBase
+ {
+ Currency = "EUR",
+ AmountDebit = 0.02m,
+ Invoice = $"SDK_TEST_{DateTime.Now.Ticks}"
+ })
+ .PayPal()
+ .PayRecurrent(new PayPalPayRecurrentRequest()
+ {
+ //define properties
+
+ });
+
+ var response = request.Execute();
+ }
+
+ [TestMethod]
+ [Ignore]
+ public void PayRemainderTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest()
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest()
+ .SetBasicFields(new TransactionBase
+ {
+ Currency = "EUR",
+ AmountDebit = 0.02m,
+ Invoice = $"SDK_TEST_{DateTime.Now.Ticks}"
+ })
+ .PayPal()
+ .PayRemainder(new PayPalPayRemainderRequest
+ {
+ //define properties
+ BuyerEmail = "techsup@buckaroo.nl",
+
+ });
+
+ var response = request.Execute();
+ }
+
+ [TestMethod]
+ public void ExtraInfoTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest()
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest()
+ .SetBasicFields(new TransactionBase
+ {
+ Currency = "EUR",
+ AmountDebit = 0.02m,
+ Invoice = $"SDK_TEST_{DateTime.Now.Ticks}"
+ })
+ .PayPal()
+ .ExtraInfo(new PayPalExtraInfoRequest
+ {
+ //define properties
+ });
+
+ var response = request.Execute();
+ }
+ }
}
diff --git a/BuckarooSdk.Tests/Services/PayPerEmail/PayPerEmailTests.cs b/BuckarooSdk.Tests/Services/PayPerEmail/PayPerEmailTests.cs
index 5ffd96f..d443f2b 100644
--- a/BuckarooSdk.Tests/Services/PayPerEmail/PayPerEmailTests.cs
+++ b/BuckarooSdk.Tests/Services/PayPerEmail/PayPerEmailTests.cs
@@ -1,27 +1,29 @@
using System;
-using BuckarooSdk.Services.PayPerEmail;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Globalization;
using BuckarooSdk.DataTypes.RequestBases;
+using BuckarooSdk.Services.PayPerEmail;
+using BuckarooSdk.Tests.Constants;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace BuckarooSdk.Tests.Services.PayPerEmail
{
[TestClass]
public class PayPerEmailTests
{
- private SdkClient _sdkClient;
+ private SdkClient _buckarooClient;
- [TestInitialize]
- public void Setup()
- {
- this._sdkClient = new SdkClient(Constants.TestSettings.Logger);
- }
+ [TestInitialize]
+ public void Setup()
+ {
+ _buckarooClient = new SdkClient(TestSettings.Logger);
+ }
- [TestMethod]
+ [TestMethod]
public void PaymentInvitationTest()
- {
- var request = this._sdkClient.CreateRequest()
- .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("en-US"))
+ {
+ var request = _buckarooClient
+ .CreateRequest()
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("en-US"))
.TransactionRequest()
.SetBasicFields(new TransactionBase
{
@@ -32,7 +34,7 @@ public void PaymentInvitationTest()
ServicesSelectableByClient = "ideal",
})
.PayPerEmail()
- .PaymentInvitation(new PayPerEmailPaymentInvitationRequest()
+ .PaymentInvitation(new PayPerEmailPaymentInvitationRequest
{
CustomerGender = BuckarooSdk.Services.PayPerEmail.Constants.Gender.Male,
Attachment = "",
@@ -45,7 +47,7 @@ public void PaymentInvitationTest()
});
var paypermailResponse = request.Execute();
- var actionResponse = paypermailResponse.GetActionResponse();
- }
+ var actionResponse = paypermailResponse.GetActionResponse();
+ }
}
}
diff --git a/BuckarooSdk.Tests/Services/SimpleSepaDirectDebit/SimpleSepaDirectDebitTests.cs b/BuckarooSdk.Tests/Services/SimpleSepaDirectDebit/SimpleSepaDirectDebitTests.cs
index d9f180d..4c93496 100644
--- a/BuckarooSdk.Tests/Services/SimpleSepaDirectDebit/SimpleSepaDirectDebitTests.cs
+++ b/BuckarooSdk.Tests/Services/SimpleSepaDirectDebit/SimpleSepaDirectDebitTests.cs
@@ -1,76 +1,78 @@
using System;
-using BuckarooSdk.Services.SimpleSepaDirectDebit;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Globalization;
using BuckarooSdk.DataTypes.RequestBases;
+using BuckarooSdk.Services.SimpleSepaDirectDebit;
+using BuckarooSdk.Tests.Constants;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace BuckarooSdk.Tests.Services.SimpleSepaDirectDebit
{
- [TestClass]
- public class SimpleSepaDirectDebitTests
- {
- private SdkClient _sdkClient;
-
- [TestInitialize]
- public void Setup()
- {
- this._sdkClient = new SdkClient(Constants.TestSettings.Logger);
- }
+ [TestClass]
+ public class SimpleSepaDirectDebitTests
+ {
+ private SdkClient _buckarooClient;
- [TestMethod]
- public void PayTest()
- {
- var payment = this._sdkClient.CreateRequest()
- .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest()
- .SetBasicFields(new TransactionBase
- {
- Currency = "EUR",
- AmountDebit = 0.02m,
- Invoice = $"SDK_TEST_{DateTime.Now.Ticks}",
- Description = "SIMPLESEPADIRECTDEBIT_PAY_SDK_UNITTEST",
- StartRecurrent = true,
+ [TestInitialize]
+ public void Setup()
+ {
+ _buckarooClient = new SdkClient(TestSettings.Logger);
+ }
- })
- .SimpleSepaDirectDebit()
- .Pay(new SimpleSepaDirectDebitPayRequest()
- {
- MandateReference = "0012652668455265",
- MandateDate = "16-11-2016",
- CustomerIban = "NL88INGB0757641768",
- CustomerBic = "INGBNL2A",
- CustomerAccountName = "JJA Roos",
- CollectDate = "26-11-2016",
- });
+ [TestMethod]
+ public void PayTest()
+ {
+ var payment = _buckarooClient
+ .CreateRequest()
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest()
+ .SetBasicFields(new TransactionBase
+ {
+ Currency = "EUR",
+ AmountDebit = 0.02m,
+ Invoice = $"SDK_TEST_{DateTime.Now.Ticks}",
+ Description = "SIMPLESEPADIRECTDEBIT_PAY_SDK_UNITTEST",
+ StartRecurrent = true,
- var paymentResponse = payment.Execute();
- }
+ })
+ .SimpleSepaDirectDebit()
+ .Pay(new SimpleSepaDirectDebitPayRequest
+ {
+ MandateReference = "0012652668455265",
+ MandateDate = "16-11-2016",
+ CustomerIban = "NL88INGB0757641768",
+ CustomerBic = "INGBNL2A",
+ CustomerAccountName = "JJA Roos",
+ CollectDate = "26-11-2016",
+ });
- [TestMethod]
- public void RefundTest()
- {
- var request = this._sdkClient.CreateRequest()
- .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest()
- .SetBasicFields(new TransactionBase
- {
- AmountCredit = 0.02m,
- Currency = "EUR",
- Invoice = "",
- OriginalTransactionKey = "",
- Description = "SIMPLESEPADIRECTDEBIT_REFUND_SDK_UNITTEST",
+ var paymentResponse = payment.Execute();
+ }
- })
- .SimpleSepaDirectDebit()
+ [TestMethod]
+ public void RefundTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest()
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest()
+ .SetBasicFields(new TransactionBase
+ {
+ AmountCredit = 0.02m,
+ Currency = "EUR",
+ Invoice = "",
+ OriginalTransactionKey = "",
+ Description = "SIMPLESEPADIRECTDEBIT_REFUND_SDK_UNITTEST",
- .Refund(new SimpleSepaDirectDebitRefundRequest()
- {
- CustomerIban = "NL88INGB0757641768",
- CustomerBic = "INGBNL2A",
- CustomerAccountName = "JJA Roos",
- });
+ })
+ .SimpleSepaDirectDebit()
+ .Refund(new SimpleSepaDirectDebitRefundRequest
+ {
+ CustomerIban = "NL88INGB0757641768",
+ CustomerBic = "INGBNL2A",
+ CustomerAccountName = "JJA Roos",
+ });
- var response = request.Execute();
- }
- }
+ var response = request.Execute();
+ }
+ }
}
diff --git a/BuckarooSdk.Tests/Services/Sofort/SofortTests.cs b/BuckarooSdk.Tests/Services/Sofort/SofortTests.cs
index c548a46..cd151f6 100644
--- a/BuckarooSdk.Tests/Services/Sofort/SofortTests.cs
+++ b/BuckarooSdk.Tests/Services/Sofort/SofortTests.cs
@@ -1,130 +1,131 @@
+using System;
+using System.Globalization;
using BuckarooSdk.DataTypes.RequestBases;
using BuckarooSdk.Logging;
using BuckarooSdk.Services.Sofort;
using BuckarooSdk.Tests.Constants;
using Microsoft.VisualStudio.TestTools.UnitTesting;
-using System;
-using System.Diagnostics;
-using System.Globalization;
namespace BuckarooSdk.Tests.Services.Sofort
{
- [TestClass]
- public class SofortTests
- {
- private SdkClient _buckarooClient;
- private string TestName => nameof(SofortTests).ToUpper();
-
- [TestInitialize]
- public void Setup()
- {
- this._buckarooClient = new SdkClient(TestSettings.Logger);
- }
-
- [TestMethod]
- public void PayTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .Sofort() // Choose the paymentmethod you want to use
- .Pay(new SofortPayRequest // choose the action you want to use and provide the payment method specific info.
- {
-
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
- [TestMethod]
- public void RefundTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- OriginalTransactionKey = "",
- AmountCredit = 2,
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .Sofort() // Choose the paymentmethod you want to use
- .Refund(new SofortRefundRequest // choose the action you want to use and provide the payment method specific info.
- {
- CustomerBIC = string.Empty,
- CustomerIBAN = string.Empty,
- CustomerAccountName = string.Empty,
- CustomerKontoNummer = 0,
- CustomerBankLeitzahl = 0,
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestMethod]
- public void PayRemainderTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- OriginalTransactionKey = "",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .Sofort() // Choose the paymentmethod you want to use
- .PayRemainder(new SofortPayRemainderRequest // choose the action you want to use and provide the payment method specific info.
- {
-
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestCleanup]
- public void TearDown()
- {
- this._buckarooClient = null;
- }
- }
+ [TestClass]
+ public class SofortTests
+ {
+ private SdkClient _buckarooClient;
+
+ private string TestName => nameof(SofortTests).ToUpper();
+
+ [TestInitialize]
+ public void Setup()
+ {
+ _buckarooClient = new SdkClient(TestSettings.Logger);
+ }
+
+ [TestMethod]
+ public void PayTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .Sofort() // Choose the paymentmethod you want to use
+ .Pay(new SofortPayRequest // choose the action you want to use and provide the payment method specific info.
+ {
+
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void RefundTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ OriginalTransactionKey = "",
+ AmountCredit = 2,
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .Sofort() // Choose the paymentmethod you want to use
+ .Refund(new SofortRefundRequest // choose the action you want to use and provide the payment method specific info.
+ {
+ CustomerBIC = string.Empty,
+ CustomerIBAN = string.Empty,
+ CustomerAccountName = string.Empty,
+ CustomerKontoNummer = 0,
+ CustomerBankLeitzahl = 0,
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void PayRemainderTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ OriginalTransactionKey = "",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .Sofort() // Choose the paymentmethod you want to use
+ .PayRemainder(new SofortPayRemainderRequest // choose the action you want to use and provide the payment method specific info.
+ {
+
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestCleanup]
+ public void TearDown()
+ {
+ _buckarooClient = null;
+ }
+ }
}
diff --git a/BuckarooSdk.Tests/Services/Subscriptions/SubscriptionRequestTests.cs b/BuckarooSdk.Tests/Services/Subscriptions/SubscriptionRequestTests.cs
deleted file mode 100644
index 5a4e6e3..0000000
--- a/BuckarooSdk.Tests/Services/Subscriptions/SubscriptionRequestTests.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using BuckarooSdk.Tests.Constants;
-
-
-namespace BuckarooSdk.Tests.Services.Subscriptions
-{
- [TestClass]
- public class SubscriptionRequestTests
- {
- private SdkClient BuckarooClient { get; set; }
-
- [TestInitialize]
- public void Setup()
- {
- this.BuckarooClient = new SdkClient(TestSettings.Logger);
- }
-
- [TestMethod]
- public void CreateSubscriptionTest()
- {
- //var request = this._buckarooClient.CreateRequest()
- //.Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- //.Subscriptions()
- }
-
-
-
- }
-}
\ No newline at end of file
diff --git a/BuckarooSdk.Tests/Services/VPay/VPayTests.cs b/BuckarooSdk.Tests/Services/VPay/VPayTests.cs
index 2646451..72192d2 100644
--- a/BuckarooSdk.Tests/Services/VPay/VPayTests.cs
+++ b/BuckarooSdk.Tests/Services/VPay/VPayTests.cs
@@ -1,310 +1,314 @@
-using BuckarooSdk.DataTypes.RequestBases;
+using System;
+using System.Globalization;
+using BuckarooSdk.DataTypes.RequestBases;
using BuckarooSdk.Logging;
using BuckarooSdk.Services.CreditCards.Request;
using BuckarooSdk.Tests.Constants;
using Microsoft.VisualStudio.TestTools.UnitTesting;
-using System;
-using System.Globalization;
namespace BuckarooSdk.Tests.Services.VPay
{
- [TestClass]
- public class VPayTests
- {
- private SdkClient _buckarooClient;
- private string TestName => nameof(VPayTests).ToUpper();
-
- [TestInitialize]
- public void Setup()
- {
- this._buckarooClient = new SdkClient(TestSettings.Logger);
- }
-
- [TestMethod]
- public void PayTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ContinueOnIncomplete = DataTypes.ContinueOnIncomplete.RedirectToHTML
- })
- .VPay() // Choose the paymentmethod you want to use
- .Pay(new CreditCardPayRequest // choose the action you want to use and provide the payment method specific info.
- {
- CustomerCode = "1234",
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
- [TestMethod]
- public void RefundTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- OriginalTransactionKey = "",
- AmountCredit = 2,
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .VPay() // Choose the paymentmethod you want to use
- .Refund(new CreditCardRefundRequest // choose the action you want to use and provide the payment method specific info.
- {
-
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
- [TestMethod]
- public void AuthorizeTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .VPay() // Choose the paymentmethod you want to use
- .Authorize(new CreditCardAuthorizeRequest // choose the action you want to use and provide the payment method specific info.
- {
- CustomerCode = string.Empty,
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
- [TestMethod]
- public void CaptureTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- OriginalTransactionKey = "",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .VPay() // Choose the paymentmethod you want to use
- .Capture(new CreditCardCaptureRequest // choose the action you want to use and provide the payment method specific info.
- {
-
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
- [TestMethod]
- public void CancelAuthorizeTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- OriginalTransactionKey = "",
- AmountCredit = 2,
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .VPay() // Choose the paymentmethod you want to use
- .CancelAuthorize(new CreditCardCancelAuthorizeRequest // choose the action you want to use and provide the payment method specific info.
- {
-
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
- [TestMethod]
- public void PayRecurrentTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- OriginalTransactionKey = "",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .VPay() // Choose the paymentmethod you want to use
- .PayRecurrent(new CreditCardPayRecurrentRequest // choose the action you want to use and provide the payment method specific info.
- {
-
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
- [TestMethod]
- public void PayRemainderTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- OriginalTransactionKey = "",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .VPay() // Choose the paymentmethod you want to use
- .PayRemainder(new CreditCardPayRemainderRequest // choose the action you want to use and provide the payment method specific info.
- {
- CustomerCode = string.Empty,
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
- [TestMethod]
- public void PayEncryptedTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .VPay() // Choose the paymentmethod you want to use
- .PayEncrypted(new CreditCardPayEncryptedRequest // choose the action you want to use and provide the payment method specific info.
- {
- EncryptedCardData = string.Empty,
-
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
- [TestMethod]
- public void AuthorizeEncryptedTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .VPay() // Choose the paymentmethod you want to use
- .AuthorizeEncrypted(new CreditCardAuthorizeEncryptedRequest // choose the action you want to use and provide the payment method specific info.
- {
- EncryptedCardData = string.Empty,
-
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestCleanup]
- public void TearDown()
- {
- this._buckarooClient = null;
- }
- }
+ [TestClass]
+ public class VPayTests
+ {
+ private SdkClient _buckarooClient;
+
+ private string TestName => nameof(VPayTests).ToUpper();
+
+ [TestInitialize]
+ public void Setup()
+ {
+ _buckarooClient = new SdkClient(TestSettings.Logger);
+ }
+
+ [TestMethod]
+ public void PayTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ContinueOnIncomplete = DataTypes.ContinueOnIncomplete.RedirectToHTML
+ })
+ .VPay() // Choose the paymentmethod you want to use
+ .Pay(new CreditCardPayRequest // choose the action you want to use and provide the payment method specific info.
+ {
+ CustomerCode = "1234",
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void RefundTest()
+ {
+ var request =
+ this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ OriginalTransactionKey = "",
+ AmountCredit = 2,
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .VPay() // Choose the paymentmethod you want to use
+ .Refund(new CreditCardRefundRequest // choose the action you want to use and provide the payment method specific info.
+ {
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void AuthorizeTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .VPay() // Choose the paymentmethod you want to use
+ .Authorize(new CreditCardAuthorizeRequest // choose the action you want to use and provide the payment method specific info.
+ {
+ CustomerCode = string.Empty,
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void CaptureTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ OriginalTransactionKey = "",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .VPay() // Choose the paymentmethod you want to use
+ .Capture(new CreditCardCaptureRequest // choose the action you want to use and provide the payment method specific info.
+ {
+
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void CancelAuthorizeTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ OriginalTransactionKey = "",
+ AmountCredit = 2,
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .VPay() // Choose the paymentmethod you want to use
+ .CancelAuthorize(new CreditCardCancelAuthorizeRequest // choose the action you want to use and provide the payment method specific info.
+ {
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void PayRecurrentTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ OriginalTransactionKey = "",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .VPay() // Choose the paymentmethod you want to use
+ .PayRecurrent(new CreditCardPayRecurrentRequest // choose the action you want to use and provide the payment method specific info.
+ {
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void PayRemainderTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ OriginalTransactionKey = "",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .VPay() // Choose the paymentmethod you want to use
+ .PayRemainder(new CreditCardPayRemainderRequest // choose the action you want to use and provide the payment method specific info.
+ {
+ CustomerCode = string.Empty,
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void PayEncryptedTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .VPay() // Choose the paymentmethod you want to use
+ .PayEncrypted(new CreditCardPayEncryptedRequest // choose the action you want to use and provide the payment method specific info.
+ {
+ EncryptedCardData = string.Empty
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void AuthorizeEncryptedTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .VPay() // Choose the paymentmethod you want to use
+ .AuthorizeEncrypted(new CreditCardAuthorizeEncryptedRequest // choose the action you want to use and provide the payment method specific info.
+ {
+ EncryptedCardData = string.Empty
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestCleanup]
+ public void TearDown()
+ {
+ _buckarooClient = null;
+ }
+ }
}
diff --git a/BuckarooSdk.Tests/Services/Visa/VisaTests.cs b/BuckarooSdk.Tests/Services/Visa/VisaTests.cs
index b6f320f..381e083 100644
--- a/BuckarooSdk.Tests/Services/Visa/VisaTests.cs
+++ b/BuckarooSdk.Tests/Services/Visa/VisaTests.cs
@@ -1,551 +1,555 @@
using System;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Globalization;
using BuckarooSdk.DataTypes.RequestBases;
-using BuckarooSdk.Services.CreditCards.Visa;
using BuckarooSdk.Logging;
using BuckarooSdk.Services.CreditCards.Request;
using BuckarooSdk.Services.CreditCards.Visa.Request;
using BuckarooSdk.Tests.Constants;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace BuckarooSdk.Tests.Services.Visa
{
- [TestClass]
- public class VisaTests
- {
- private SdkClient _buckarooClient;
- private string TestName => nameof(VisaTests).ToUpper();
-
- [TestInitialize]
- public void Setup()
- {
- this._buckarooClient = new SdkClient(Constants.TestSettings.Logger);
- }
-
- #region Visa
- [TestMethod]
- [Obsolete]
- public void PayTest()
- {
- var request = this._buckarooClient.CreateRequest()
- .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest()
- .SetBasicFields(new TransactionBase
- {
- Currency = "EUR",
- AmountDebit = 0.02m,
- Invoice = $"SDK_{ TestName }_ { DateTime.Now.Ticks }"
- }
- .AddAdditionalParameter("add_test1", DateTime.Now.Ticks.ToString())
- .AddAdditionalParameter("add_test2", "test")
- )
- .Visa()
- .Pay(new VisaPayRequest()
- {
- //set properties
- });
-
- var response = request.Execute();
- }
-
- [TestMethod]
- [Obsolete]
- public void RefundTest()
- {
- var request = this._buckarooClient.CreateRequest()
- .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest()
- .SetBasicFields(new TransactionBase
- {
- Currency = "EUR",
- AmountDebit = 0.02m,
- Invoice = $"SDK_{ TestName }_ { DateTime.Now.Ticks }"
- })
- .Visa()
- .Refund(new VisaRefundRequest()
- {
- //set properties
- });
-
- var response = request.Execute();
- }
-
- [TestMethod]
- [Obsolete]
- public void AuthorizeTest()
- {
- var request = this._buckarooClient.CreateRequest()
- .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest()
- .SetBasicFields(new TransactionBase
- {
- Currency = "EUR",
- AmountDebit = 0.02m,
- Invoice = $"SDK_{ TestName }_ { DateTime.Now.Ticks }"
- }
- .AddAdditionalParameter("add_test1", DateTime.Now.Ticks.ToString())
- .AddAdditionalParameter("add_test2", "test")
- )
- .Visa()
-
- .Authorize(new VisaAuthorizeRequest()
- {
- //set properties
- });
-
- var response = request.Execute();
- }
-
- [TestMethod]
- [Obsolete]
- public void CaptureTest()
- {
- var request = this._buckarooClient.CreateRequest()
- .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest()
- .SetBasicFields(new TransactionBase
- {
- Currency = "EUR",
- AmountDebit = 0.02m,
- Invoice = $"SDK_{ TestName }_ { DateTime.Now.Ticks }"
- })
- .Visa()
-
- .Capture(new VisaCaptureRequest()
- {
- //set properties
- });
-
- var response = request.Execute();
- }
-
- [TestMethod]
- [Obsolete]
- public void PayRecurrentTest()
- {
- var request = this._buckarooClient.CreateRequest()
- .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest()
- .SetBasicFields(new TransactionBase
- {
- Currency = "EUR",
- AmountDebit = 0.02m,
- Invoice = $"SDK_{ TestName }_ { DateTime.Now.Ticks }"
- })
- .Visa()
-
- .PayRecurrent(new VisaPayRecurrentRequest()
- {
- //define properties
- });
-
- var response = request.Execute();
- }
-
- [TestMethod]
- [Obsolete]
- public void PayRemainderTest()
- {
- var request = this._buckarooClient.CreateRequest()
- .Authenticate(Constants.TestSettings.WebsiteKey, Constants.TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest()
- .SetBasicFields(new TransactionBase
- {
- Currency = "EUR",
- AmountDebit = 0.02m,
- Invoice = $"SDK_{ TestName }_ { DateTime.Now.Ticks }"
- })
- .Visa()
-
- .PayRemainder(new VisaPayRemainderRequest()
- {
- //define properties
- });
-
- var response = request.Execute();
- }
-
- [TestMethod]
- public void CancelAuthorizeTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- OriginalTransactionKey = "",
- AmountCredit = 2,
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .Visa() // Choose the paymentmethod you want to use
- .CancelAuthorize(new VisaCancelAuthorizeRequest // choose the action you want to use and provide the payment method specific info.
- {
-
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestMethod]
- public void PayEncryptedTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .Visa() // Choose the paymentmethod you want to use
- .PayEncrypted(new VisaPayEncryptedRequest // choose the action you want to use and provide the payment method specific info.
- {
- EncryptedCardData = string.Empty,
-
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestMethod]
- public void AuthorizeEncryptedTest()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .Visa() // Choose the paymentmethod you want to use
- .AuthorizeEncrypted(new VisaAuthorizeEncryptedRequest // choose the action you want to use and provide the payment method specific info.
- {
- EncryptedCardData = string.Empty,
-
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
- #endregion
-
- #region CreditCard
- [TestMethod]
- public void PayTestCreditCard()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .Visa() // Choose the paymentmethod you want to use
- .Pay(new CreditCardPayRequest // choose the action you want to use and provide the payment method specific info.
- {
- CustomerCode = string.Empty,
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestMethod]
- public void RefundTestCreditCard()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- OriginalTransactionKey = "",
- AmountCredit = 2,
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .Visa() // Choose the paymentmethod you want to use
- .Refund(new CreditCardRefundRequest // choose the action you want to use and provide the payment method specific info.
- {
-
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestMethod]
- public void AuthorizeTestCreditCard()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .Visa() // Choose the paymentmethod you want to use
- .Authorize(new CreditCardAuthorizeRequest // choose the action you want to use and provide the payment method specific info.
- {
- CustomerCode = string.Empty,
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestMethod]
- public void CaptureTestCreditCard()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- OriginalTransactionKey = "",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .Visa() // Choose the paymentmethod you want to use
- .Capture(new CreditCardCaptureRequest // choose the action you want to use and provide the payment method specific info.
- {
-
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestMethod]
- public void CancelAuthorizeTestCreditCard()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- OriginalTransactionKey = "",
- AmountCredit = 2,
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .Visa() // Choose the paymentmethod you want to use
- .CancelAuthorize(new CreditCardCancelAuthorizeRequest // choose the action you want to use and provide the payment method specific info.
- {
-
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestMethod]
- public void PayRecurrentTestCreditCard()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- OriginalTransactionKey = "",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .Visa() // Choose the paymentmethod you want to use
- .PayRecurrent(new CreditCardPayRecurrentRequest // choose the action you want to use and provide the payment method specific info.
- {
-
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestMethod]
- public void PayRemainderTestCreditCard()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- OriginalTransactionKey = "",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .Visa() // Choose the paymentmethod you want to use
- .PayRemainder(new CreditCardPayRemainderRequest // choose the action you want to use and provide the payment method specific info.
- {
- CustomerCode = string.Empty,
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestMethod]
- public void PayEncryptedTestCreditCard()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .Visa() // Choose the paymentmethod you want to use
- .PayEncrypted(new CreditCardPayEncryptedRequest // choose the action you want to use and provide the payment method specific info.
- {
- EncryptedCardData = string.Empty,
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
-
- [TestMethod]
- public void AuthorizeEncryptedTestCreditCard()
- {
- var request =
- this._buckarooClient.CreateRequest(new StandardLogger()) // Create a request.
- .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
- .TransactionRequest() // One of the request type options.
- .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
- {
- Currency = "EUR",
- Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- ReturnUrl = TestSettings.ReturnUrl,
- ReturnUrlCancel = TestSettings.ReturnUrlCancel,
- ReturnUrlError = TestSettings.ReturnUrlError,
- ReturnUrlReject = TestSettings.ReturnUrlReject,
- AmountDebit = 2,
- Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
- })
- .Visa() // Choose the paymentmethod you want to use
- .AuthorizeEncrypted(new CreditCardAuthorizeEncryptedRequest // choose the action you want to use and provide the payment method specific info.
- {
- EncryptedCardData = string.Empty,
- });
-
- var response = request.Execute();
-
- // Process.Start(response.RequiredAction.RedirectURL);
- // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
- }
- #endregion
- }
+ [TestClass]
+ public class VisaTests
+ {
+ private SdkClient _buckarooClient;
+
+ private string TestName => nameof(VisaTests).ToUpper();
+
+ [TestInitialize]
+ public void Setup()
+ {
+ _buckarooClient = new SdkClient(TestSettings.Logger);
+ }
+
+ #region Visa
+
+ [TestMethod]
+ [Obsolete]
+ public void PayTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest()
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest()
+ .SetBasicFields(new TransactionBase
+ {
+ Currency = "EUR",
+ AmountDebit = 0.02m,
+ Invoice = $"SDK_{ TestName }_ { DateTime.Now.Ticks }"
+ }
+ .AddAdditionalParameter("add_test1", DateTime.Now.Ticks.ToString())
+ .AddAdditionalParameter("add_test2", "test")
+ )
+ .Visa()
+ .Pay(new VisaPayRequest()
+ {
+ //set properties
+ });
+
+ var response = request.Execute();
+ }
+
+ [TestMethod]
+ [Obsolete]
+ public void RefundTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest()
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest()
+ .SetBasicFields(new TransactionBase
+ {
+ Currency = "EUR",
+ AmountDebit = 0.02m,
+ Invoice = $"SDK_{ TestName }_ { DateTime.Now.Ticks }"
+ })
+ .Visa()
+ .Refund(new VisaRefundRequest()
+ {
+ //set properties
+ });
+
+ var response = request.Execute();
+ }
+
+ [TestMethod]
+ [Obsolete]
+ public void AuthorizeTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest()
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest()
+ .SetBasicFields(new TransactionBase
+ {
+ Currency = "EUR",
+ AmountDebit = 0.02m,
+ Invoice = $"SDK_{ TestName }_ { DateTime.Now.Ticks }"
+ }
+ .AddAdditionalParameter("add_test1", DateTime.Now.Ticks.ToString())
+ .AddAdditionalParameter("add_test2", "test")
+ )
+ .Visa()
+ .Authorize(new VisaAuthorizeRequest()
+ {
+ //set properties
+ });
+
+ var response = request.Execute();
+ }
+
+ [TestMethod]
+ [Obsolete]
+ public void CaptureTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest()
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest()
+ .SetBasicFields(new TransactionBase
+ {
+ Currency = "EUR",
+ AmountDebit = 0.02m,
+ Invoice = $"SDK_{ TestName }_ { DateTime.Now.Ticks }"
+ })
+ .Visa()
+ .Capture(new VisaCaptureRequest()
+ {
+ //set properties
+ });
+
+ var response = request.Execute();
+ }
+
+ [TestMethod]
+ [Obsolete]
+ public void PayRecurrentTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest()
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest()
+ .SetBasicFields(new TransactionBase
+ {
+ Currency = "EUR",
+ AmountDebit = 0.02m,
+ Invoice = $"SDK_{ TestName }_ { DateTime.Now.Ticks }"
+ })
+ .Visa()
+ .PayRecurrent(new VisaPayRecurrentRequest()
+ {
+ //define properties
+ });
+
+ var response = request.Execute();
+ }
+
+ [TestMethod]
+ [Obsolete]
+ public void PayRemainderTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest()
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest()
+ .SetBasicFields(new TransactionBase
+ {
+ Currency = "EUR",
+ AmountDebit = 0.02m,
+ Invoice = $"SDK_{ TestName }_ { DateTime.Now.Ticks }"
+ })
+ .Visa()
+ .PayRemainder(new VisaPayRemainderRequest()
+ {
+ //define properties
+ });
+
+ var response = request.Execute();
+ }
+
+ [TestMethod]
+ public void CancelAuthorizeTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ OriginalTransactionKey = "",
+ AmountCredit = 2,
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .Visa() // Choose the paymentmethod you want to use
+ .CancelAuthorize(new VisaCancelAuthorizeRequest // choose the action you want to use and provide the payment method specific info.
+ {
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void PayEncryptedTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .Visa() // Choose the paymentmethod you want to use
+ .PayEncrypted(new VisaPayEncryptedRequest // choose the action you want to use and provide the payment method specific info.
+ {
+ EncryptedCardData = string.Empty,
+
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void AuthorizeEncryptedTest()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .Visa() // Choose the paymentmethod you want to use
+ .AuthorizeEncrypted(new VisaAuthorizeEncryptedRequest // choose the action you want to use and provide the payment method specific info.
+ {
+ EncryptedCardData = string.Empty,
+
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ #endregion
+
+ #region CreditCard
+
+ [TestMethod]
+ public void PayTestCreditCard()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .Visa() // Choose the paymentmethod you want to use
+ .Pay(new CreditCardPayRequest // choose the action you want to use and provide the payment method specific info.
+ {
+ CustomerCode = string.Empty,
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void RefundTestCreditCard()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ OriginalTransactionKey = "",
+ AmountCredit = 2,
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .Visa() // Choose the paymentmethod you want to use
+ .Refund(new CreditCardRefundRequest // choose the action you want to use and provide the payment method specific info.
+ {
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void AuthorizeTestCreditCard()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .Visa() // Choose the paymentmethod you want to use
+ .Authorize(new CreditCardAuthorizeRequest // choose the action you want to use and provide the payment method specific info.
+ {
+ CustomerCode = string.Empty,
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void CaptureTestCreditCard()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ OriginalTransactionKey = "",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .Visa() // Choose the paymentmethod you want to use
+ .Capture(new CreditCardCaptureRequest // choose the action you want to use and provide the payment method specific info.
+ {
+
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void CancelAuthorizeTestCreditCard()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ OriginalTransactionKey = "",
+ AmountCredit = 2,
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .Visa() // Choose the paymentmethod you want to use
+ .CancelAuthorize(new CreditCardCancelAuthorizeRequest // choose the action you want to use and provide the payment method specific info.
+ {
+
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void PayRecurrentTestCreditCard()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ OriginalTransactionKey = "",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .Visa() // Choose the paymentmethod you want to use
+ .PayRecurrent(new CreditCardPayRecurrentRequest // choose the action you want to use and provide the payment method specific info.
+ {
+
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void PayRemainderTestCreditCard()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ OriginalTransactionKey = "",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .Visa() // Choose the paymentmethod you want to use
+ .PayRemainder(new CreditCardPayRemainderRequest // choose the action you want to use and provide the payment method specific info.
+ {
+ CustomerCode = string.Empty,
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void PayEncryptedTestCreditCard()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .Visa() // Choose the paymentmethod you want to use
+ .PayEncrypted(new CreditCardPayEncryptedRequest // choose the action you want to use and provide the payment method specific info.
+ {
+ EncryptedCardData = string.Empty,
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ [TestMethod]
+ public void AuthorizeEncryptedTestCreditCard()
+ {
+ var request = _buckarooClient
+ .CreateRequest(new StandardLogger()) // Create a request.
+ .Authenticate(TestSettings.WebsiteKey, TestSettings.SecretKey, false, new CultureInfo("nl-NL"))
+ .TransactionRequest() // One of the request type options.
+ .SetBasicFields(new TransactionBase // The transactionbase contains the base information of a transaction.
+ {
+ Currency = "EUR",
+ Description = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ ReturnUrl = TestSettings.ReturnUrl,
+ ReturnUrlCancel = TestSettings.ReturnUrlCancel,
+ ReturnUrlError = TestSettings.ReturnUrlError,
+ ReturnUrlReject = TestSettings.ReturnUrlReject,
+ AmountDebit = 2,
+ Invoice = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ Order = $"SDK_{ TestName }_{ DateTime.Now.Ticks }",
+ })
+ .Visa() // Choose the paymentmethod you want to use
+ .AuthorizeEncrypted(new CreditCardAuthorizeEncryptedRequest // choose the action you want to use and provide the payment method specific info.
+ {
+ EncryptedCardData = string.Empty,
+ });
+
+ var response = request.Execute();
+
+ // Process.Start(response.RequiredAction.RedirectURL);
+ // Console.WriteLine(response.BuckarooSdkLogger.GetFullLog());
+ }
+
+ #endregion
+ }
}
diff --git a/BuckarooSdk.sln b/BuckarooSdk.sln
index 0e9b8d2..d1f264b 100644
--- a/BuckarooSdk.sln
+++ b/BuckarooSdk.sln
@@ -3,10 +3,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28809.33
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BuckarooSdk", "BuckarooSdk\BuckarooSdk.csproj", "{CB68F005-23BC-42B0-8D90-787F97E9E646}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BuckarooSdk", "BuckarooSdk\BuckarooSdk.csproj", "{CB68F005-23BC-42B0-8D90-787F97E9E646}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6F0BFC81-9AA4-45C6-8635-EC9B5FE50DA0}"
ProjectSection(SolutionItems) = preProject
+ .editorconfig = .editorconfig
.gitattributes = .gitattributes
.gitignore = .gitignore
EndProjectSection
diff --git a/BuckarooSdk/Base/AuthenticatedRequest.cs b/BuckarooSdk/Base/AuthenticatedRequest.cs
index ebaabb6..204d64b 100644
--- a/BuckarooSdk/Base/AuthenticatedRequest.cs
+++ b/BuckarooSdk/Base/AuthenticatedRequest.cs
@@ -7,10 +7,10 @@
namespace BuckarooSdk.Base
{
- ///
- /// An authenticatedRequest is a request where authentication properties are
- /// defined and validated upon type.
- ///
+ ///
+ /// An authenticatedRequest is a request where authentication properties are
+ /// defined and validated upon type.
+ ///
public class AuthenticatedRequest
{
internal Request Request { get; set; }
@@ -20,44 +20,44 @@ internal AuthenticatedRequest(Request request)
this.Request = request;
}
- ///
- /// States that the request that will be performed is a transaction request.
- ///
- /// A CancelTransaction
+ ///
+ /// States that the request that will be performed is a transaction request.
+ ///
+ /// A CancelTransaction
public TransactionRequest TransactionRequest()
{
return new TransactionRequest(this);
}
- public CancelTransaction CancelTransactionRequest()
- {
- return new CancelTransaction(this);
- }
+ public CancelTransaction CancelTransactionRequest()
+ {
+ return new CancelTransaction(this);
+ }
- public TransactionStatus TransactionStatusRequest()
- {
- return new TransactionStatus(this);
- }
+ public TransactionStatus TransactionStatusRequest()
+ {
+ return new TransactionStatus(this);
+ }
- public TransactionSpecification TransactionSpecificationRequest()
- {
- return new TransactionSpecification(this);
- }
+ public TransactionSpecification TransactionSpecificationRequest()
+ {
+ return new TransactionSpecification(this);
+ }
- public TransactionInvoiceInfo TransactionInvoiceInfoRequest()
- {
- return new TransactionInvoiceInfo(this);
- }
+ public TransactionInvoiceInfo TransactionInvoiceInfoRequest()
+ {
+ return new TransactionInvoiceInfo(this);
+ }
- public TransactionRefundInfo TransactionRefundInfoRequest()
- {
- return new TransactionRefundInfo(this);
- }
+ public TransactionRefundInfo TransactionRefundInfoRequest()
+ {
+ return new TransactionRefundInfo(this);
+ }
- ///
- /// States that the request that will be performed is a data request.
- ///
- /// A Data object
+ ///
+ /// States that the request that will be performed is a data request.
+ ///
+ /// A Data object
public Data.Data DataRequest()
{
return new Data.Data(this);
diff --git a/BuckarooSdk/Base/PushHandler.cs b/BuckarooSdk/Base/PushHandler.cs
index ecd3c87..dd81ce4 100644
--- a/BuckarooSdk/Base/PushHandler.cs
+++ b/BuckarooSdk/Base/PushHandler.cs
@@ -10,72 +10,72 @@
namespace BuckarooSdk.Base
{
- public class PushHandler
- {
- private SignatureCalculationService SignatureCalculationService { get; }
- private readonly string _apiKey;
+ public class PushHandler
+ {
+ private SignatureCalculationService SignatureCalculationService { get; }
+ private readonly string _apiKey;
- public PushHandler(string apiKey)
- {
- this._apiKey = apiKey;
- this.SignatureCalculationService = new SignatureCalculationService();
- }
+ public PushHandler(string apiKey)
+ {
+ this._apiKey = apiKey;
+ this.SignatureCalculationService = new SignatureCalculationService();
+ }
- public Push DeserializePush(byte[] body, string requestUri, string authorizationHeader)
- {
- var requestUriEncoded = WebUtility.UrlEncode(requestUri)?.ToLower();
+ public Push DeserializePush(byte[] body, string requestUri, string authorizationHeader)
+ {
+ var requestUriEncoded = WebUtility.UrlEncode(requestUri)?.ToLower();
- var requestMethod = HttpMethod.Post.ToString();
+ var requestMethod = HttpMethod.Post.ToString();
- //calculate signature
- if (!this.SignatureCalculationService.VerifySignature(body, requestMethod, requestUriEncoded, this._apiKey, authorizationHeader))
- {
- throw new AuthenticationException();
- }
+ //calculate signature
+ if (!this.SignatureCalculationService.VerifySignature(body, requestMethod, requestUriEncoded, this._apiKey, authorizationHeader))
+ {
+ throw new AuthenticationException();
+ }
// get content from request.
var bodyAsString = Encoding.UTF8.GetString(body);
return this.DeserializePush(bodyAsString);
- }
+ }
- private Push DeserializePush(string jsonString)
- {
- Push deserializeObject;
+ private Push DeserializePush(string jsonString)
+ {
+ Push deserializeObject;
- var secondLeftBraceIndex = jsonString.IndexOf("{", 1 + jsonString.IndexOf("{", StringComparison.Ordinal), StringComparison.Ordinal);
- var lastRightBraceIndex = jsonString.LastIndexOf("}", StringComparison.Ordinal);
- var pushtype = jsonString.Substring(0, secondLeftBraceIndex);
+ var secondLeftBraceIndex = jsonString.IndexOf("{", 1 + jsonString.IndexOf("{", StringComparison.Ordinal), StringComparison.Ordinal);
+ var lastRightBraceIndex = jsonString.LastIndexOf("}", StringComparison.Ordinal);
+ var pushtype = jsonString.Substring(0, secondLeftBraceIndex);
- // Take everything that is between the second opening brace and the last closing brace (excluding the latter)
- var content = jsonString.Substring(secondLeftBraceIndex, lastRightBraceIndex - secondLeftBraceIndex);
+ // Take everything that is between the second opening brace and the last closing brace (excluding the latter)
+ var content = jsonString.Substring(secondLeftBraceIndex, lastRightBraceIndex - secondLeftBraceIndex);
- if (pushtype.Contains(PushType.TransactionPush))
- {
- return DeserializeTransaction(content);
- }
+ if (pushtype.Contains(PushType.TransactionPush))
+ {
+ return DeserializeTransaction(content);
+ }
- if (pushtype.Contains(PushType.DataRequestPush))
- {
- deserializeObject = DeserializeDataRequest(content);
- }
- else
- {
- throw new SerializationException();
- }
+ if (pushtype.Contains(PushType.DataRequestPush))
+ {
+ deserializeObject = DeserializeDataRequest(content);
+ }
+ else
+ {
+ throw new SerializationException();
+ }
- return deserializeObject;
- }
+ return deserializeObject;
+ }
- private static TransactionPush DeserializeTransaction(string jsonString)
- {
- return JsonConvert.DeserializeObject(jsonString);
- }
+ private static TransactionPush DeserializeTransaction(string jsonString)
+ {
+ return JsonConvert.DeserializeObject(jsonString);
+ }
- private static DataRequest DeserializeDataRequest(string jsonString)
- {
- return JsonConvert.DeserializeObject(jsonString);
- }
- }
+ private static DataRequest DeserializeDataRequest(string jsonString)
+ {
+ return JsonConvert.DeserializeObject(jsonString);
+ }
+ }
}
diff --git a/BuckarooSdk/Base/ResponseHandler.cs b/BuckarooSdk/Base/ResponseHandler.cs
deleted file mode 100644
index 92eadbb..0000000
--- a/BuckarooSdk/Base/ResponseHandler.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-using System;
-using System.Collections.Generic;
-using BuckarooSdk.DataTypes.Response;
-using BuckarooSdk.Services;
-using static BuckarooSdk.Constants.Services;
-
-namespace BuckarooSdk.Base
-{
- [Obsolete]
- public class ResponseHandler
- {
- public void HandleResponse(RequestResponse transaction)
- {
-
- }
-
- public static List RetrieveServices(RequestResponse transactionResponse)
- {
- var services = transactionResponse.GetServices();
-
- return new List();
- }
-
- internal static ServiceNames ServiceSwitch(List services)
- {
- var specificService = new ServiceNames();
- foreach (var service in services)
- {
- switch (service)
- {
- case ServiceNames.Ideal:
- specificService = ServiceNames.Ideal;
- break;
- }
- }
- return specificService;
- }
- }
-}
diff --git a/BuckarooSdk/Connection/BuckarooDelegatingHandler.cs b/BuckarooSdk/Connection/BuckarooDelegatingHandler.cs
index 6fd5789..537e328 100644
--- a/BuckarooSdk/Connection/BuckarooDelegatingHandler.cs
+++ b/BuckarooSdk/Connection/BuckarooDelegatingHandler.cs
@@ -11,80 +11,78 @@
namespace BuckarooSdk.Connection
{
- internal class BuckarooDelegatingHandler : DelegatingHandler
- {
- private SignatureCalculationService SignatureCalculationService { get; }
-
- internal BuckarooDelegatingHandler(string websiteKey, string apiKey, string channel, string culture)
- {
- this._websiteKey = websiteKey;
- this._apiKey = apiKey;
- this._channel = channel;
- this._culture = culture;
- this._software = JsonConvert.SerializeObject(new Settings.Software());
-
- this.InnerHandler = new HttpClientHandler();
- this.SignatureCalculationService = new SignatureCalculationService();
- }
-
-
-
- //Obtained from the server earlier
- private readonly string _websiteKey;
- private readonly string _apiKey;
- private readonly string _channel;
- private readonly string _culture;
- private readonly string _software;
-
- protected override async Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
- {
- HttpResponseMessage response = null;
-
- var requestUri = WebUtility.UrlEncode(request.RequestUri.Authority + request.RequestUri.PathAndQuery).ToLower();
-
- var requestHttpMethod = request.Method.Method;
-
- // calculate UNIX time
- var epochStart = new DateTime(1970, 01, 01, 0, 0, 0, 0, DateTimeKind.Utc);
- var timeSpan = DateTime.UtcNow - epochStart;
- var requestTimeStamp = Convert.ToUInt64(timeSpan.TotalSeconds).ToString();
-
- // create random nonce for each request
- var nonce = Guid.NewGuid().ToString("N");
- var content = new byte[0];
-
- // checking if the request contains body, usually will be null with HTTP GET and DELETE
- if (request.Content != null)
- {
- content = await request.Content.ReadAsByteArrayAsync().ConfigureAwait(false);
- request.Content.Headers.ContentType = new MediaTypeHeaderValue("application/json");
- }
-
- var authorizationHeaderString = this.SignatureCalculationService.CalculateSignature(content, requestHttpMethod, requestTimeStamp, nonce, requestUri, this._websiteKey, this._apiKey);
-
- request.Headers.Authorization = new AuthenticationHeaderValue("hmac", authorizationHeaderString);
- // set other headers
- request.Headers.Add("culture", this._culture);
- request.Headers.Add("channel", this._channel);
- request.Headers.Add("software", this._software);
-
- response = await base.SendAsync(request, cancellationToken).ConfigureAwait(false);
-
- if (!await this.ValidateResponse(response, request.Method.ToString(), requestUri).ConfigureAwait(false))
- {
- throw new AuthenticationException();
- }
-
- return response;
- }
-
- protected async Task ValidateResponse(HttpResponseMessage response, string requestMethod, string requestUri)
- {
- response.Headers.TryGetValues("Authorization", out var authorizationResponse);
- var actualHeader = authorizationResponse.ToList().First();
- var body = await response.Content.ReadAsByteArrayAsync().ConfigureAwait(false);
-
- return this.SignatureCalculationService.VerifySignature(body, requestMethod, requestUri, this._apiKey, actualHeader);
- }
- }
+ internal class BuckarooDelegatingHandler : DelegatingHandler
+ {
+ private SignatureCalculationService SignatureCalculationService { get; }
+
+ internal BuckarooDelegatingHandler(string websiteKey, string apiKey, string channel, string culture)
+ {
+ this._websiteKey = websiteKey;
+ this._apiKey = apiKey;
+ this._channel = channel;
+ this._culture = culture;
+ this._software = JsonConvert.SerializeObject(new Settings.Software());
+
+ this.InnerHandler = new HttpClientHandler();
+ this.SignatureCalculationService = new SignatureCalculationService();
+ }
+
+
+
+ //Obtained from the server earlier
+ private readonly string _websiteKey;
+ private readonly string _apiKey;
+ private readonly string _channel;
+ private readonly string _culture;
+ private readonly string _software;
+
+ protected override async Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
+ {
+ var requestUri = WebUtility.UrlEncode(request.RequestUri.Authority + request.RequestUri.PathAndQuery).ToLower();
+
+ var requestHttpMethod = request.Method.Method;
+
+ // calculate UNIX time
+ var epochStart = new DateTime(1970, 01, 01, 0, 0, 0, 0, DateTimeKind.Utc);
+ var timeSpan = DateTime.UtcNow - epochStart;
+ var requestTimeStamp = Convert.ToUInt64(timeSpan.TotalSeconds).ToString();
+
+ // create random nonce for each request
+ var nonce = Guid.NewGuid().ToString("N");
+ var content = new byte[0];
+
+ // checking if the request contains body, usually will be null with HTTP GET and DELETE
+ if (request.Content != null)
+ {
+ content = await request.Content.ReadAsByteArrayAsync().ConfigureAwait(false);
+ request.Content.Headers.ContentType = new MediaTypeHeaderValue("application/json");
+ }
+
+ var authorizationHeaderString = this.SignatureCalculationService.CalculateSignature(content, requestHttpMethod, requestTimeStamp, nonce, requestUri, this._websiteKey, this._apiKey);
+
+ request.Headers.Authorization = new AuthenticationHeaderValue("hmac", authorizationHeaderString);
+ // set other headers
+ request.Headers.Add("culture", this._culture);
+ request.Headers.Add("channel", this._channel);
+ request.Headers.Add("software", this._software);
+
+ var response = await base.SendAsync(request, cancellationToken).ConfigureAwait(false);
+
+ if (!await this.ValidateResponse(response, request.Method.ToString(), requestUri).ConfigureAwait(false))
+ {
+ throw new AuthenticationException();
+ }
+
+ return response;
+ }
+
+ protected async Task ValidateResponse(HttpResponseMessage response, string requestMethod, string requestUri)
+ {
+ response.Headers.TryGetValues("Authorization", out var authorizationResponse);
+ var actualHeader = authorizationResponse.ToList().First();
+ var body = await response.Content.ReadAsByteArrayAsync().ConfigureAwait(false);
+
+ return this.SignatureCalculationService.VerifySignature(body, requestMethod, requestUri, this._apiKey, actualHeader);
+ }
+ }
}
diff --git a/BuckarooSdk/Connection/Connector.cs b/BuckarooSdk/Connection/Connector.cs
index d34fe08..66530d2 100644
--- a/BuckarooSdk/Connection/Connector.cs
+++ b/BuckarooSdk/Connection/Connector.cs
@@ -14,120 +14,119 @@
namespace BuckarooSdk.Connection
{
- ///
- /// Copyright 2016, Buckaroo B.V, Utrecht, The Netherlands.
- /// Use of copies permitted under the of terms of the GNU General Public Licence.
- ///
- internal static class Connector
- {
- private static readonly string CheckoutUrl = "https://checkout.buckaroo.nl";
- private static readonly string TestCheckoutUrl = "https://testcheckout.buckaroo.nl";
-
- static Connector()
- {
- // ensure urls are on the correct format
- ValidateUrls();
- }
-
- public static async Task SendRequest(Request request, TRequest data, HttpRequestType requestType)
- where TResponse : IRequestResponse
- {
- try
- {
- // prepare serializer settings
- var settings = new JsonSerializerSettings
- {
- ContractResolver = new CamelCasePropertyNamesContractResolver(),
- Formatting = Formatting.Indented
- };
-
- var requestJson = String.Empty;
- try
- {
- requestJson = JsonConvert.SerializeObject(data, settings);
- //LOGGING
- request.BuckarooSdkLogger.AddProcessLogging(Constants.Logging.Messages.SerializedRequestJson(requestJson));
- request.BuckarooSdkLogger.HandleRawRequest(requestJson);
- }
- catch (JsonSerializationException exception)
- {
- request.BuckarooSdkLogger.AddErrorLogging(exception.ToString());
- }
-
- // live or test url
- var apiBaseAddress = request.IsLive ? CheckoutUrl : TestCheckoutUrl;
-
- // use BuckarooDelegatingHandler for HMAC auth
- var customDelegatingHandler = new BuckarooDelegatingHandler(request.WebsiteKey, request.ApiKey,
- request.Channel.ToString(), request.Culture.Name);
- var client = new HttpClient(customDelegatingHandler);
-
- //LOGGING
- request.BuckarooSdkLogger.AddProcessLogging(Constants.Logging.Messages.RequestTypeAndAddress(requestType,
- apiBaseAddress + request.Endpoint));
-
- HttpResponseMessage response;
- switch (requestType)
- {
- case HttpRequestType.Post:
- response =
- await
- client.PostAsync(apiBaseAddress + request.Endpoint,
- new StringContent(requestJson, Encoding.UTF8, "application/json")).ConfigureAwait(false);
- break;
- case HttpRequestType.Get:
- response = await client.GetAsync(apiBaseAddress + request.Endpoint).ConfigureAwait(false);
- break;
- default:
- request.BuckarooSdkLogger.AddErrorLogging(Constants.Logging.Messages.BadImplementation);
- throw new Exception(Constants.Logging.Messages.BadImplementation);
- }
-
- var responseJson = response.Content.ReadAsStringAsync().Result;
-
- // deserialize to response type
- try
- {
- var deserializedResponse = JsonConvert.DeserializeObject(responseJson);
- if (responseJson != null)
- {
- //Logging response
- request.BuckarooSdkLogger.AddProcessLogging(Constants.Logging.Messages.RequestSuccessful(true,
- responseJson));
- request.BuckarooSdkLogger.HandleRawResponse(responseJson);
- }
-
- request.BuckarooSdkLogger.AddProcessLogging(Constants.Logging.Messages.ResponseDeserialized);
-
- return deserializedResponse;
- }
- catch (JsonSerializationException exception)
- {
- request.BuckarooSdkLogger.AddErrorLogging(Constants.Logging.Messages.FailedSerializationResponseJson(responseJson) + exception);
- }
-
- return default(TResponse);
-
- }
- catch (Exception exception)
- {
- return default(TResponse);
- }
- }
-
-
- private static void ValidateUrls()
- {
- foreach (var url in new List() { CheckoutUrl, TestCheckoutUrl })
- {
- Uri uriResult;
- var isValidUrl = Uri.TryCreate(url, UriKind.Absolute, out uriResult) && (uriResult.Scheme == Uri.UriSchemeHttp || uriResult.Scheme == Uri.UriSchemeHttps);
-
- if (!isValidUrl)
- {
- throw new UriFormatException($"'{url}' is not a valid URI.");
- }
- }
- }
- }
+ ///
+ /// Copyright 2016, Buckaroo B.V, Utrecht, The Netherlands.
+ /// Use of copies permitted under the of terms of the GNU General Public Licence.
+ ///
+ internal static class Connector
+ {
+ private static readonly string CheckoutUrl = "https://checkout.buckaroo.nl";
+ private static readonly string TestCheckoutUrl = "https://testcheckout.buckaroo.nl";
+
+ static Connector()
+ {
+ // ensure urls are on the correct format
+ ValidateUrls();
+ }
+
+ public static async Task SendRequest(Request request, TRequest data, HttpRequestType requestType)
+ where TResponse : IRequestResponse
+ {
+ try
+ {
+ // prepare serializer settings
+ var settings = new JsonSerializerSettings
+ {
+ ContractResolver = new CamelCasePropertyNamesContractResolver(),
+ Formatting = Formatting.Indented
+ };
+
+ var requestJson = String.Empty;
+ try
+ {
+ requestJson = JsonConvert.SerializeObject(data, settings);
+ //LOGGING
+ request.BuckarooSdkLogger.AddProcessLogging(Constants.Logging.Messages.SerializedRequestJson(requestJson));
+ request.BuckarooSdkLogger.HandleRawRequest(requestJson);
+ }
+ catch (JsonSerializationException exception)
+ {
+ request.BuckarooSdkLogger.AddErrorLogging(exception.ToString());
+ }
+
+ // live or test url
+ var apiBaseAddress = request.IsLive ? CheckoutUrl : TestCheckoutUrl;
+
+ // use BuckarooDelegatingHandler for HMAC auth
+ var customDelegatingHandler = new BuckarooDelegatingHandler(request.WebsiteKey, request.ApiKey,
+ request.Channel.ToString(), request.Culture.Name);
+ var client = new HttpClient(customDelegatingHandler);
+
+ //LOGGING
+ request.BuckarooSdkLogger.AddProcessLogging(Constants.Logging.Messages.RequestTypeAndAddress(requestType,
+ apiBaseAddress + request.Endpoint));
+
+ HttpResponseMessage response;
+ switch (requestType)
+ {
+ case HttpRequestType.Post:
+ response =
+ await
+ client.PostAsync(apiBaseAddress + request.Endpoint,
+ new StringContent(requestJson, Encoding.UTF8, "application/json")).ConfigureAwait(false);
+ break;
+ case HttpRequestType.Get:
+ response = await client.GetAsync(apiBaseAddress + request.Endpoint).ConfigureAwait(false);
+ break;
+ default:
+ request.BuckarooSdkLogger.AddErrorLogging(Constants.Logging.Messages.BadImplementation);
+ throw new Exception(Constants.Logging.Messages.BadImplementation);
+ }
+
+ var responseJson = response.Content.ReadAsStringAsync().Result;
+
+ // deserialize to response type
+ try
+ {
+ var deserializedResponse = JsonConvert.DeserializeObject(responseJson);
+ if (responseJson != null)
+ {
+ //Logging response
+ request.BuckarooSdkLogger.AddProcessLogging(Constants.Logging.Messages.RequestSuccessful(true,
+ responseJson));
+ request.BuckarooSdkLogger.HandleRawResponse(responseJson);
+ }
+
+ request.BuckarooSdkLogger.AddProcessLogging(Constants.Logging.Messages.ResponseDeserialized);
+
+ return deserializedResponse;
+ }
+ catch (JsonSerializationException exception)
+ {
+ request.BuckarooSdkLogger.AddErrorLogging(Constants.Logging.Messages.FailedSerializationResponseJson(responseJson) + exception);
+ }
+
+ return default;
+
+ }
+ catch (Exception)
+ {
+ return default;
+ }
+ }
+
+
+ private static void ValidateUrls()
+ {
+ foreach (var url in new List() { CheckoutUrl, TestCheckoutUrl })
+ {
+ var isValidUrl = Uri.TryCreate(url, UriKind.Absolute, out var uriResult) && (uriResult.Scheme == Uri.UriSchemeHttp || uriResult.Scheme == Uri.UriSchemeHttps);
+
+ if (!isValidUrl)
+ {
+ throw new UriFormatException($"'{url}' is not a valid URI.");
+ }
+ }
+ }
+ }
}
diff --git a/BuckarooSdk/Constants/Services.cs b/BuckarooSdk/Constants/Services.cs
index 9b06dc2..b26182b 100644
--- a/BuckarooSdk/Constants/Services.cs
+++ b/BuckarooSdk/Constants/Services.cs
@@ -1,54 +1,54 @@
namespace BuckarooSdk.Constants
{
- public static class Services
- {
- public enum ServiceNames
- {
- CreditCard,
- Bancontact,
- MasterCard,
- Maestro,
- CarteBleueVisa,
- Visa,
- VisaElectron,
- VPay,
- Nexi,
- CarteBancaire,
- //// Payment services
- Ideal,
- IdealProcessing,
- PayPal,
- AmericanExpress,
- Transfer,
- SimpleSepaDirectDebit,
- Payconiq,
- Sofort,
- //// additional services
- CreditManagement,
- //Subscriptions,
- PayPerEmail,
- IdealQr,
- Giropay,
- EPS,
- KbcPaymentButton,
- EMandate,
- PaysafeCard,
- Dankort,
- Afterpay,
- OnlineGiro,
- OnlineGiroLite,
- Capayable,
- Klarna,
- KlarnaKP,
- CustomGiftcard,
- CustomGiftcard2,
- CustomGiftcard3,
- BuckarooWallet,
- BuckarooVoucher,
- Notification,
- Ippies,
- HuisTuinGiftcard,
+ public static class Services
+ {
+ public enum ServiceNames
+ {
+ CreditCard,
+ Bancontact,
+ MasterCard,
+ Maestro,
+ CarteBleueVisa,
+ Visa,
+ VisaElectron,
+ VPay,
+ Nexi,
+ CarteBancaire,
+ //// Payment services
+ Ideal,
+ IdealProcessing,
+ PayPal,
+ AmericanExpress,
+ Transfer,
+ SimpleSepaDirectDebit,
+ Payconiq,
+ Sofort,
+ //// additional services
+ CreditManagement,
+ //Subscriptions,
+ PayPerEmail,
+ IdealQr,
+ Giropay,
+ EPS,
+ KbcPaymentButton,
+ EMandate,
+ PaysafeCard,
+ Dankort,
+ Afterpay,
+ OnlineGiro,
+ OnlineGiroLite,
+ Capayable,
+ Klarna,
+ KlarnaKP,
+ CustomGiftcard,
+ CustomGiftcard2,
+ CustomGiftcard3,
+ BuckarooWallet,
+ BuckarooVoucher,
+ Notification,
+ Ippies,
+ HuisTuinGiftcard,
VVVGiftcard,
- }
- }
-}
\ No newline at end of file
+ }
+ }
+}
diff --git a/BuckarooSdk/Data/ConfiguredDataRequest.cs b/BuckarooSdk/Data/ConfiguredDataRequest.cs
index 4bf34e7..67f30c9 100644
--- a/BuckarooSdk/Data/ConfiguredDataRequest.cs
+++ b/BuckarooSdk/Data/ConfiguredDataRequest.cs
@@ -1,95 +1,100 @@
-
-using BuckarooSdk.Services.CreditManagement.DataRequest;
-using BuckarooSdk.Services.CustomGiftcard;
+using BuckarooSdk.Services.BuckarooVoucher;
using BuckarooSdk.Services.BuckarooWallet;
-using BuckarooSdk.Services.BuckarooVoucher;
using BuckarooSdk.Services.CreditManagement.DataRequest;
+using BuckarooSdk.Services.CustomGiftcard;
using BuckarooSdk.Services.EMandate;
using BuckarooSdk.Services.Ideal.DataRequest;
using BuckarooSdk.Services.IdealQr.DataRequest;
namespace BuckarooSdk.Data
{
- public class ConfiguredDataRequest
- {
- internal Data BaseDataRequest { get; private set; }
+ public class ConfiguredDataRequest
+ {
+ internal Data BaseDataRequest { get; private set; }
- ///
- /// ConfiguredDataRequest primary constructor.
- ///
- ///
- public ConfiguredDataRequest(Data data)
- {
- this.BaseDataRequest = data;
- }
+ ///
+ /// ConfiguredDataRequest primary constructor.
+ ///
+ ///
+ public ConfiguredDataRequest(Data data)
+ {
+ this.BaseDataRequest = data;
+ }
- #region "Services"
+ #region "Services"
- /// The instantiation of the specific CustomGiftcard service transaction.
- ///
- public CustomGiftcardRequestObject CustomGiftcard()
- {
- return new CustomGiftcardRequestObject(this, Constants.Services.ServiceNames.CustomGiftcard);
- }
+ ///
+ /// The instantiation of the specific CustomGiftcard service transaction.
+ ///
+ ///
+ public CustomGiftcardRequestObject CustomGiftcard()
+ {
+ return new CustomGiftcardRequestObject(this, Constants.Services.ServiceNames.CustomGiftcard);
+ }
- /// The instantiation of the specific CustomGiftcard3 service transaction.
- ///
- public CustomGiftcardRequestObject CustomGiftcard2()
- {
- return new CustomGiftcardRequestObject(this, Constants.Services.ServiceNames.CustomGiftcard2);
- }
+ ///
+ /// The instantiation of the specific CustomGiftcard3 service transaction.
+ ///
+ ///
+ public CustomGiftcardRequestObject CustomGiftcard2()
+ {
+ return new CustomGiftcardRequestObject(this, Constants.Services.ServiceNames.CustomGiftcard2);
+ }
- /// The instantiation of the specific CustomGiftcard3 service transaction.
- ///
- public CustomGiftcardRequestObject CustomGiftcard3()
- {
- return new CustomGiftcardRequestObject(this, Constants.Services.ServiceNames.CustomGiftcard3);
+ ///
+ /// The instantiation of the specific CustomGiftcard3 service transaction.
+ ///
+ ///
+ public CustomGiftcardRequestObject CustomGiftcard3()
+ {
+ return new CustomGiftcardRequestObject(this, Constants.Services.ServiceNames.CustomGiftcard3);
}
- public BuckarooWalletRequestObject BuckarooWallet()
- {
- return new BuckarooWalletRequestObject(this);
+ public BuckarooWalletRequestObject BuckarooWallet()
+ {
+ return new BuckarooWalletRequestObject(this);
}
- public BuckarooVoucherRequestObject BuckarooVoucher()
- {
- return new BuckarooVoucherRequestObject(this);
- }
+ public BuckarooVoucherRequestObject BuckarooVoucher()
+ {
+ return new BuckarooVoucherRequestObject(this);
+ }
- public Services.Klarna.KlarnaRequestObject Klarna()
- {
- return new Services.Klarna.KlarnaRequestObject(this);
- }
- public Services.KlarnaKP.KlarnaRequestObject KlarnaKP()
- {
- return new Services.KlarnaKP.KlarnaRequestObject(this);
- }
+ public Services.Klarna.KlarnaRequestObject Klarna()
+ {
+ return new Services.Klarna.KlarnaRequestObject(this);
+ }
- ///
- /// The instanciation of the specific Ideal Service transaction.
- ///
- /// An ideal
- public IdealDataRequest Ideal()
- {
- return new IdealDataRequest(this);
- }
+ public Services.KlarnaKP.KlarnaRequestObject KlarnaKP()
+ {
+ return new Services.KlarnaKP.KlarnaRequestObject(this);
+ }
- public IdealQrDataRequest IdealQr()
- {
- return new IdealQrDataRequest(this);
- }
+ ///
+ /// The instanciation of the specific Ideal Service transaction.
+ ///
+ /// An ideal
+ public IdealDataRequest Ideal()
+ {
+ return new IdealDataRequest();
+ }
+ public IdealQrDataRequest IdealQr()
+ {
+ return new IdealQrDataRequest(this);
+ }
- public CreditManagementDataRequest CreditManagement()
- {
- return new CreditManagementDataRequest(this);
- }
- public EMandateRequestObject EMandate()
- {
- return new EMandateRequestObject(this);
- }
+ public CreditManagementDataRequest CreditManagement()
+ {
+ return new CreditManagementDataRequest(this);
+ }
- #endregion
- }
+ public EMandateRequestObject EMandate()
+ {
+ return new EMandateRequestObject(this);
+ }
+
+ #endregion
+ }
}
diff --git a/BuckarooSdk/Data/Data.cs b/BuckarooSdk/Data/Data.cs
index 491fa15..8fc05ca 100644
--- a/BuckarooSdk/Data/Data.cs
+++ b/BuckarooSdk/Data/Data.cs
@@ -5,69 +5,69 @@
namespace BuckarooSdk.Data
{
- ///
- /// General data class, to hold a Request object and a list of services
- ///
+ ///
+ /// General data class, to hold a Request object and a list of services
+ ///
public class Data
{
internal AuthenticatedRequest AuthenticatedRequest { get; set; }
-
+
internal List Services { get; set; }
- internal DataBase DataRequestBase { get; private set; }
+ internal DataBase DataRequestBase { get; private set; }
- internal Data(AuthenticatedRequest authenticatedRequest)
+ internal Data(AuthenticatedRequest authenticatedRequest)
{
- authenticatedRequest.Request.Endpoint = Constants.Settings.GatewaySettings.DataRequestEndPoint;
- this.AuthenticatedRequest = authenticatedRequest;
+ authenticatedRequest.Request.Endpoint = Constants.Settings.GatewaySettings.DataRequestEndPoint;
+ this.AuthenticatedRequest = authenticatedRequest;
}
-
+
- public ConfiguredDataRequest SetBasicFields(DataBase basicFields)
- {
- this.DataRequestBase = basicFields;
- return new ConfiguredDataRequest(this);
- }
+ public ConfiguredDataRequest SetBasicFields(DataBase basicFields)
+ {
+ this.DataRequestBase = basicFields;
+ return new ConfiguredDataRequest(this);
+ }
- #region "Internal methods"
- ///
- /// Adding a service to the datarequest.
- ///
- /// The name of the service
- /// The list of service parameters
- internal void AddService(string serviceName, List parameters, string action, string version = "1")
+ #region "Internal methods"
+ ///
+ /// Adding a service to the datarequest.
+ ///
+ /// The name of the service
+ /// The list of service parameters
+ internal void AddService(string serviceName, List parameters, string action, string version = "1")
{
var service = new Service()
{
Name = serviceName,
- Action = action,
- Version = version,
- Parameters = parameters,
+ Action = action,
+ Version = version,
+ Parameters = parameters,
};
- if(this.DataRequestBase.Services.ServiceList == null)
- {
- this.DataRequestBase.Services.ServiceList = new List();
- }
+ if(this.DataRequestBase.Services.ServiceList == null)
+ {
+ this.DataRequestBase.Services.ServiceList = new List();
+ }
this.DataRequestBase.Services.ServiceList.Add(service);
}
- internal void AddGlobal(string serviceName, List parameters, string action, string version = "1")
- {
- var global = new Global()
- {
- Name = serviceName,
- Action = action,
- Version = version,
- Parameters = parameters,
- };
+ internal void AddGlobal(string serviceName, List parameters, string action, string version = "1")
+ {
+ var global = new Global()
+ {
+ Name = serviceName,
+ Action = action,
+ Version = version,
+ Parameters = parameters,
+ };
- if (this.DataRequestBase.Services.ServiceList == null)
- {
- this.DataRequestBase.Services.ServiceList = new List();
- }
- this.DataRequestBase.Services.ServiceList.Add(global);
- }
- #endregion
- }
+ if (this.DataRequestBase.Services.ServiceList == null)
+ {
+ this.DataRequestBase.Services.ServiceList = new List();
+ }
+ this.DataRequestBase.Services.ServiceList.Add(global);
+ }
+ #endregion
+ }
}
diff --git a/BuckarooSdk/DataTypes/AdditionalParameter.cs b/BuckarooSdk/DataTypes/AdditionalParameter.cs
index d1d1061..c478fb3 100644
--- a/BuckarooSdk/DataTypes/AdditionalParameter.cs
+++ b/BuckarooSdk/DataTypes/AdditionalParameter.cs
@@ -1,19 +1,19 @@
namespace BuckarooSdk.DataTypes
{
- ///
- /// An additional parameter is a name value pair that can be used to add custom data
- /// to a request.
- ///
- public class AdditionalParameter
+ ///
+ /// An additional parameter is a name value pair that can be used to add custom data
+ /// to a request.
+ ///
+ public class AdditionalParameter
{
- ///
- /// The name of the parameter.
- ///
- public string Name { get; set; }
+ ///
+ /// The name of the parameter.
+ ///
+ public string Name { get; set; }
- ///
- /// The value of the parameter.
- ///
- public string Value { get; set; }
+ ///
+ /// The value of the parameter.
+ ///
+ public string Value { get; set; }
}
}
diff --git a/BuckarooSdk/DataTypes/AdditionalParameters.cs b/BuckarooSdk/DataTypes/AdditionalParameters.cs
index 466e6d7..86b5938 100644
--- a/BuckarooSdk/DataTypes/AdditionalParameters.cs
+++ b/BuckarooSdk/DataTypes/AdditionalParameters.cs
@@ -2,25 +2,25 @@
namespace BuckarooSdk.DataTypes
{
- // INTERNAL NOTE: This class purely exists because of the legacy json message that has to be created. within
- // this message, the list of custom parameters is a value belonging to the tag: additionalparameters
+ // INTERNAL NOTE: This class purely exists because of the legacy json message that has to be created. within
+ // this message, the list of custom parameters is a value belonging to the tag: additionalparameters
- ///
- /// A class that holds a list of additional parameters.
- ///
- public class AdditionalParameters
+ ///
+ /// A class that holds a list of additional parameters.
+ ///
+ public class AdditionalParameters
{
- ///
- /// A list of additional parameters.
- ///
- public List AdditionalParameter { get; set; }
+ ///
+ /// A list of additional parameters.
+ ///
+ public List AdditionalParameter { get; set; }
- ///
- /// primary constructor. A new list of additional parameters is instantiated.
- ///
- public AdditionalParameters()
+ ///
+ /// primary constructor. A new list of additional parameters is instantiated.
+ ///
+ public AdditionalParameters()
{
- this.AdditionalParameter = new List();
+ this.AdditionalParameter = new List();
}
}
}
diff --git a/BuckarooSdk/DataTypes/ChannelEnum.cs b/BuckarooSdk/DataTypes/ChannelEnum.cs
index 849971f..6eae663 100644
--- a/BuckarooSdk/DataTypes/ChannelEnum.cs
+++ b/BuckarooSdk/DataTypes/ChannelEnum.cs
@@ -1,45 +1,45 @@
namespace BuckarooSdk.DataTypes
{
- ///
- /// Enum with all channels from which transactions can be initiated.
- ///
+ ///
+ /// Enum with all channels from which transactions can be initiated.
+ ///
public enum ChannelEnum
{
- #region channels
+ #region channels
- ///
- /// The web channel.
- ///
- Web = 1,
- ///
- /// The POS channel.
- ///
+ ///
+ /// The web channel.
+ ///
+ Web = 1,
+ ///
+ /// The POS channel.
+ ///
PointOfSale = 2,
- ///
- /// The batch file channel.
- ///
+ ///
+ /// The batch file channel.
+ ///
BatchFile = 3,
- ///
- /// the Employee channel.
- ///
+ ///
+ /// the Employee channel.
+ ///
Employee = 4,
- ///
- /// The callcenter channel.
- ///
+ ///
+ /// The callcenter channel.
+ ///
CallCenter = 5,
- ///
- /// The BSS channel.
- ///
+ ///
+ /// The BSS channel.
+ ///
Bss = 6,
- ///
- /// The Buckaroo backoffice channel.
- ///
+ ///
+ /// The Buckaroo backoffice channel.
+ ///
BackOffice = 7,
- ///
- /// The internal checkout channel.
- ///
+ ///
+ /// The internal checkout channel.
+ ///
InternalCheckout = 8
- #endregion
- }
+ #endregion
+ }
}
diff --git a/BuckarooSdk/DataTypes/ContinueOnIncomplete.cs b/BuckarooSdk/DataTypes/ContinueOnIncomplete.cs
index adc8b4f..5a91366 100644
--- a/BuckarooSdk/DataTypes/ContinueOnIncomplete.cs
+++ b/BuckarooSdk/DataTypes/ContinueOnIncomplete.cs
@@ -1,17 +1,17 @@
namespace BuckarooSdk.DataTypes
{
- ///
- /// Enum with options for the continue on incomplete.
- ///
+ ///
+ /// Enum with options for the continue on incomplete.
+ ///
public enum ContinueOnIncomplete
{
- ///
- /// do not continue on incomplete.
- ///
+ ///
+ /// do not continue on incomplete.
+ ///
No,
- ///
- /// Redirect to HTML page on incpmplete.
- ///
+ ///
+ /// Redirect to HTML page on incpmplete.
+ ///
RedirectToHTML
}
}
diff --git a/BuckarooSdk/DataTypes/CustomParameter.cs b/BuckarooSdk/DataTypes/CustomParameter.cs
index c6c309f..84ef4d3 100644
--- a/BuckarooSdk/DataTypes/CustomParameter.cs
+++ b/BuckarooSdk/DataTypes/CustomParameter.cs
@@ -1,19 +1,19 @@
namespace BuckarooSdk.DataTypes
{
- ///
- /// A custom parameter is a name value pair that can be used to add custom data
- /// to a request.
- ///
+ ///
+ /// A custom parameter is a name value pair that can be used to add custom data
+ /// to a request.
+ ///
public class CustomParameter
{
- ///
- /// The name of the parameter.
- ///
+ ///
+ /// The name of the parameter.
+ ///
public string Name { get; set; }
- ///
- /// The value of the parameter.
- ///
+ ///
+ /// The value of the parameter.
+ ///
public string Value { get; set; }
}
}
diff --git a/BuckarooSdk/DataTypes/CustomParameters.cs b/BuckarooSdk/DataTypes/CustomParameters.cs
index 55b9937..44321c0 100644
--- a/BuckarooSdk/DataTypes/CustomParameters.cs
+++ b/BuckarooSdk/DataTypes/CustomParameters.cs
@@ -2,25 +2,25 @@
namespace BuckarooSdk.DataTypes
{
- // INTERNAL NOTE: This class purely exists because of the legacy json message that has to be created. within
- // this message, the list of custom parameters is a value belonging to the tag: customparameters
+ // INTERNAL NOTE: This class purely exists because of the legacy json message that has to be created. within
+ // this message, the list of custom parameters is a value belonging to the tag: customparameters
- ///
- /// A class that holds a list of custom parameters.
- ///
- public class CustomParameters
+ ///
+ /// A class that holds a list of custom parameters.
+ ///
+ public class CustomParameters
{
- ///
- /// A list of custom parameters.
- ///
+ ///
+ /// A list of custom parameters.
+ ///
public List List { get; set; }
- ///
- /// primary constructor. A new list of custom parameters is instantiated.
- ///
+ ///
+ /// primary constructor. A new list of custom parameters is instantiated.
+ ///
public CustomParameters()
{
- this.List = new List();
+ this.List = new List();
}
}
}
diff --git a/BuckarooSdk/DataTypes/IpAddress.cs b/BuckarooSdk/DataTypes/IpAddress.cs
index c1b06f6..9b38f64 100644
--- a/BuckarooSdk/DataTypes/IpAddress.cs
+++ b/BuckarooSdk/DataTypes/IpAddress.cs
@@ -1,18 +1,18 @@
namespace BuckarooSdk.DataTypes
{
- ///
- /// The IpAddress class contains all properties regarding the host IP address
- ///
+ ///
+ /// The IpAddress class contains all properties regarding the host IP address
+ ///
public class IpAddress
{
- ///
- /// The type of Ip address, also known as the protocol type.
- ///
+ ///
+ /// The type of Ip address, also known as the protocol type.
+ ///
public InternetProtocolVersion Type { get; set; }
- ///
- /// The actual Ip address
- ///
+ ///
+ /// The actual Ip address
+ ///
public string Address { get; set; }
}
}
diff --git a/BuckarooSdk/DataTypes/IpProtocolVersion.cs b/BuckarooSdk/DataTypes/IpProtocolVersion.cs
index d2cd086..6e58593 100644
--- a/BuckarooSdk/DataTypes/IpProtocolVersion.cs
+++ b/BuckarooSdk/DataTypes/IpProtocolVersion.cs
@@ -1,17 +1,17 @@
namespace BuckarooSdk.DataTypes
{
- ///
- /// enum for possible internet protocols
- ///
+ ///
+ /// enum for possible internet protocols
+ ///
public enum InternetProtocolVersion
{
- ///
- /// Internet protocol version V4
- ///
+ ///
+ /// Internet protocol version V4
+ ///
IPv4,
- ///
- /// Internet protocol version V6
- ///
+ ///
+ /// Internet protocol version V6
+ ///
IPv6,
}
}
diff --git a/BuckarooSdk/DataTypes/ParameterGroups/Afterpay/Article.cs b/BuckarooSdk/DataTypes/ParameterGroups/Afterpay/Article.cs
index d09fc72..de85198 100644
--- a/BuckarooSdk/DataTypes/ParameterGroups/Afterpay/Article.cs
+++ b/BuckarooSdk/DataTypes/ParameterGroups/Afterpay/Article.cs
@@ -1,21 +1,21 @@
-using BuckarooSdk.Services;
+using BuckarooSdk.Services;
namespace BuckarooSdk.DataTypes.ParameterGroups.Afterpay
{
- public class Article : ParameterGroup
- {
- public string Description { get; set; }
- public string GrossUnitPrice { get; set; }
- public string VatPercentage { get; set; }
- public int Quantity { get; set; }
- public string Identifier { get; set; }
- public string ImageUrl { get; set; }
- public string Url { get; set; }
- ///
- /// Possible values: PhysicalArticle, DigitalArticle, Giftcard, Discount, ShippingFee, Surcharge, Info, ShippingFees.
- ///
- public string Type { get; set; }
- public string UnitCode { get; set; }
+ public class Article : ParameterGroup
+ {
+ public string Description { get; set; }
+ public string GrossUnitPrice { get; set; }
+ public string VatPercentage { get; set; }
+ public int Quantity { get; set; }
+ public string Identifier { get; set; }
+ public string ImageUrl { get; set; }
+ public string Url { get; set; }
+ ///
+ /// Possible values: PhysicalArticle, DigitalArticle, Giftcard, Discount, ShippingFee, Surcharge, Info, ShippingFees.
+ ///
+ public string Type { get; set; }
+ public string UnitCode { get; set; }
public string RefundType { get; set; }
- }
+ }
}
diff --git a/BuckarooSdk/DataTypes/RequestBases/CancelTransactionBase.cs b/BuckarooSdk/DataTypes/RequestBases/CancelTransactionBase.cs
index 83c8b62..ba6e27a 100644
--- a/BuckarooSdk/DataTypes/RequestBases/CancelTransactionBase.cs
+++ b/BuckarooSdk/DataTypes/RequestBases/CancelTransactionBase.cs
@@ -2,38 +2,40 @@
namespace BuckarooSdk.DataTypes.RequestBases
{
- public class CancelTransactionBase : IRequestBase
- {
- public List Transactions { get; set; }
+ public class CancelTransactionBase : IRequestBase
+ {
+ public List Transactions { get; set; }
- public CancelTransactionBase(IEnumerable transactions)
- {
- this.Transactions = new List();
- foreach (var transaction in transactions)
- {
- this.Transactions.Add(new CancelTransaction(transaction));
- }
- }
+ public CancelTransactionBase(IEnumerable transactions)
+ {
+ this.Transactions = new List();
+ foreach (var transaction in transactions)
+ {
+ this.Transactions.Add(new CancelTransaction(transaction));
+ }
+ }
- public CancelTransactionBase(string transactionToBeCanceled)
- {
- this.Transactions = new List();
- this.Transactions.Add(new CancelTransaction(transactionToBeCanceled));
- }
- }
+ public CancelTransactionBase(string transactionToBeCanceled)
+ {
+ this.Transactions = new List
+ {
+ new CancelTransaction(transactionToBeCanceled)
+ };
+ }
+ }
- public class CancelTransaction
- {
- public string Key { get; set; }
+ public class CancelTransaction
+ {
+ public string Key { get; set; }
- public CancelTransaction(string key)
- {
- this.Key = key;
- }
+ public CancelTransaction(string key)
+ {
+ this.Key = key;
+ }
- public CancelTransaction()
- {
-
- }
- }
+ public CancelTransaction()
+ {
+
+ }
+ }
}
diff --git a/BuckarooSdk/DataTypes/RequestBases/TransactionBase.cs b/BuckarooSdk/DataTypes/RequestBases/TransactionBase.cs
index 20fdb65..d434f78 100644
--- a/BuckarooSdk/DataTypes/RequestBases/TransactionBase.cs
+++ b/BuckarooSdk/DataTypes/RequestBases/TransactionBase.cs
@@ -3,133 +3,133 @@
namespace BuckarooSdk.DataTypes.RequestBases
{
- ///
- /// The base properties for a transaction request
- ///
+ ///
+ /// The base properties for a transaction request
+ ///
public class TransactionBase : IRequestBase
{
- ///
- /// The currency of the transaction.
- ///
+ ///
+ /// The currency of the transaction.
+ ///
public string Currency { get; set; }
- ///
- /// The debit amount of the transaction.
- ///
+ ///
+ /// The debit amount of the transaction.
+ ///
public decimal? AmountDebit { get; set; }
- ///
- /// the credit amount of the transaction.
- ///
+ ///
+ /// the credit amount of the transaction.
+ ///
public decimal? AmountCredit { get; set; }
- ///
- /// The invoicenumber of the invoice the transaction belongs to.
- ///
+ ///
+ /// The invoicenumber of the invoice the transaction belongs to.
+ ///
public string Invoice { get; set; }
- ///
- /// The ordernumber of the order the transaction belongs to.
- ///
+ ///
+ /// The ordernumber of the order the transaction belongs to.
+ ///
public string Order { get; set; }
- ///
- /// The description that belongs to the transaction.
- ///
+ ///
+ /// The description that belongs to the transaction.
+ ///
public string Description { get; set; }
- ///
- /// The Ip Address of the client, that is sending the request. Needs to be instantiated.
- ///
+ ///
+ /// The Ip Address of the client, that is sending the request. Needs to be instantiated.
+ ///
public IpAddress ClientIp { get; set; }
- ///
- /// The return url, is the url that the user needs to be redirected to.
- ///
+ ///
+ /// The return url, is the url that the user needs to be redirected to.
+ ///
public string ReturnUrl { get; set; }
- ///
- /// The return url cancel, is a specific url that the user needs to be redirected to in
- /// case the user cancels the transaction.
- ///
+ ///
+ /// The return url cancel, is a specific url that the user needs to be redirected to in
+ /// case the user cancels the transaction.
+ ///
public string ReturnUrlCancel { get; set; }
- ///
- /// The return url error, is a specific url that the user needs to be redirected to in
- /// case the an error occurs during the processing of the request.
- ///
- public string ReturnUrlError { get; set; }
- ///
- /// The return url reject, is a specific url that the user needs to be redirected to in
- /// case the transaction is rejected by Buckaroo.
- ///
- public string ReturnUrlReject { get; set; }
- ///
- /// Contains the original transaction key in case there was a previous payment, that is
- /// linked to this payment. e.g. in case of a refund.
- ///
+ ///
+ /// The return url error, is a specific url that the user needs to be redirected to in
+ /// case the an error occurs during the processing of the request.
+ ///
+ public string ReturnUrlError { get; set; }
+ ///
+ /// The return url reject, is a specific url that the user needs to be redirected to in
+ /// case the transaction is rejected by Buckaroo.
+ ///
+ public string ReturnUrlReject { get; set; }
+ ///
+ /// Contains the original transaction key in case there was a previous payment, that is
+ /// linked to this payment. e.g. in case of a refund.
+ ///
public string OriginalTransactionKey { get; set; }
- ///
- /// Defines if a transaction should initiate a recurrent transaction. Some services support
- /// recurring payments (You can identify these by determining if they support the action
- /// PayRecurrent). Before being able to do a recurrent payment, a normal payment needs to be
- /// made with this field set to true (the default value for this field is false).
- ///
- public bool StartRecurrent { get; set; }
- ///
- /// Defines a value that states wheter the request should be aborted, or that the user should
- /// be redirected in case the request is incomplete.
- ///
+ ///
+ /// Defines if a transaction should initiate a recurrent transaction. Some services support
+ /// recurring payments (You can identify these by determining if they support the action
+ /// PayRecurrent). Before being able to do a recurrent payment, a normal payment needs to be
+ /// made with this field set to true (the default value for this field is false).
+ ///
+ public bool StartRecurrent { get; set; }
+ ///
+ /// Defines a value that states wheter the request should be aborted, or that the user should
+ /// be redirected in case the request is incomplete.
+ ///
public ContinueOnIncomplete ContinueOnIncomplete { get; set; }
- ///
- /// If no primary service is provided and ContinueOnIncomplete is set, this list of comma
- /// separated servicescodes can be used to limit the number of services from which the customer
- /// may choose once he is redirected to the payment form. Only services which are entered in
- /// this field are selectable. This field is optional and when empty or missing, the customer
- /// may choose any of the available services
- ///
- public string ServicesSelectableByClient { get; set; }
- ///
- /// If no primary service is provided and ContinueOnIncomplete is set, this list of comma
- /// separated servicescodes can be used to limit the number of services from which the customer
- /// may choose once he is redirected to the payment form. Services which are entered in this field
- /// are not selectable. This field is optional.
- ///
- public string ServicesExcludedForClient { get; set; }
- ///
- /// When provided, this push URL overrides all the push URLs as configured in the payment plaza
- /// under websites for the associated website key.
- ///
- public string PushUrl { get; set; }
- ///
- /// When provided, this push URL overrides the push URL for failed transactions as configured
- /// in the payment plaza under websites for the associated website key.
- ///
- public string PushUrlFailure { get; set; }
- ///
- /// This tag can be used to tell the Payment Engine what the user agent of the client’s
- /// webbrowser is. This can be used for statistical purposes but also to perform anti-fraud checks
- /// on transactions.
- ///
- public string ClientUserAgent { get; set; }
- ///
- /// Contains the reference to a previously performed transaction. It has a type, as well as the
- /// actual reference
- ///
- public TransactionReference OriginalTransactionReference { get; set; }
+ ///
+ /// If no primary service is provided and ContinueOnIncomplete is set, this list of comma
+ /// separated servicescodes can be used to limit the number of services from which the customer
+ /// may choose once he is redirected to the payment form. Only services which are entered in
+ /// this field are selectable. This field is optional and when empty or missing, the customer
+ /// may choose any of the available services
+ ///
+ public string ServicesSelectableByClient { get; set; }
+ ///
+ /// If no primary service is provided and ContinueOnIncomplete is set, this list of comma
+ /// separated servicescodes can be used to limit the number of services from which the customer
+ /// may choose once he is redirected to the payment form. Services which are entered in this field
+ /// are not selectable. This field is optional.
+ ///
+ public string ServicesExcludedForClient { get; set; }
+ ///
+ /// When provided, this push URL overrides all the push URLs as configured in the payment plaza
+ /// under websites for the associated website key.
+ ///
+ public string PushUrl { get; set; }
+ ///
+ /// When provided, this push URL overrides the push URL for failed transactions as configured
+ /// in the payment plaza under websites for the associated website key.
+ ///
+ public string PushUrlFailure { get; set; }
+ ///
+ /// This tag can be used to tell the Payment Engine what the user agent of the client’s
+ /// webbrowser is. This can be used for statistical purposes but also to perform anti-fraud checks
+ /// on transactions.
+ ///
+ public string ClientUserAgent { get; set; }
+ ///
+ /// Contains the reference to a previously performed transaction. It has a type, as well as the
+ /// actual reference
+ ///
+ public TransactionReference OriginalTransactionReference { get; set; }
- ///
- /// The parameters that are custom, which means that they can vary in case different services
- /// are used. Where the base transaction paremeters are service independent, these
- ///
+ ///
+ /// The parameters that are custom, which means that they can vary in case different services
+ /// are used. Where the base transaction paremeters are service independent, these
+ ///
[JsonProperty()]
internal CustomParameters CustomParameters { get; set; }
- ///
- /// The parameters that are additional to the service, which means that they can vary in case
- /// different service are used. Where the base transaction paremeters are service independent, these
- ///
- [JsonProperty()]
+ ///
+ /// The parameters that are additional to the service, which means that they can vary in case
+ /// different service are used. Where the base transaction paremeters are service independent, these
+ ///
+ [JsonProperty()]
internal AdditionalParameters AdditionalParameters { get; set; }
- ///
- /// A services property, which then contains a list of Services
- ///
+ ///
+ /// A services property, which then contains a list of Services
+ ///
[JsonProperty()]
internal TransactionServices Services { get; set; }
- ///
- /// Primary constructor. Al lists are instantiate within this constructor
- ///
+ ///
+ /// Primary constructor. Al lists are instantiate within this constructor
+ ///
public TransactionBase()
{
this.CustomParameters = new CustomParameters();
@@ -150,7 +150,7 @@ public TransactionBase AddCustomParameter(string key, string value)
this.CustomParameters.List.Add(new CustomParameter()
{
Name = key,
- Value = value
+ Value = value
});
return this;
diff --git a/BuckarooSdk/DataTypes/RequestBases/TransactionStatusBase.cs b/BuckarooSdk/DataTypes/RequestBases/TransactionStatusBase.cs
index 129786e..10d3800 100644
--- a/BuckarooSdk/DataTypes/RequestBases/TransactionStatusBase.cs
+++ b/BuckarooSdk/DataTypes/RequestBases/TransactionStatusBase.cs
@@ -3,46 +3,46 @@
namespace BuckarooSdk.DataTypes.RequestBases
{
- public class TransactionStatusBase : IRequestBase
- {
- public List Transactions { get; set; }
+ public class TransactionStatusBase : IRequestBase
+ {
+ public List Transactions { get; set; }
- public TransactionStatusBase(List transactions)
- {
- this.Transactions = transactions;
- }
+ public TransactionStatusBase(List transactions)
+ {
+ this.Transactions = transactions;
+ }
- public TransactionStatusBase AddTransactionStatus(TransactionStatus transaction)
- {
- this.Transactions.Add(transaction);
- return this;
- }
- }
+ public TransactionStatusBase AddTransactionStatus(TransactionStatus transaction)
+ {
+ this.Transactions.Add(transaction);
+ return this;
+ }
+ }
- public class TransactionStatus
- {
- public string Key { get; set; }
- public string Invoice {get; set; }
+ public class TransactionStatus
+ {
+ public string Key { get; set; }
+ public string Invoice {get; set; }
- ///
- /// The parameters that are custom, which means that they can vary in case different services
- /// are used. Where the base transaction paremeters are service independent, these
- ///
+ ///
+ /// The parameters that are custom, which means that they can vary in case different services
+ /// are used. Where the base transaction paremeters are service independent, these
+ ///
[JsonProperty()]
internal CustomParameters CustomParameters { get; set; }
- ///
- /// The parameters that are additional to the service, which means that they can vary in case
- /// different service are used. Where the base transaction paremeters are service independent, these
- ///
- [JsonProperty()]
+ ///
+ /// The parameters that are additional to the service, which means that they can vary in case
+ /// different service are used. Where the base transaction paremeters are service independent, these
+ ///
+ [JsonProperty()]
internal AdditionalParameters AdditionalParameters { get; set; }
- public TransactionStatus()
- {
-
- }
+ public TransactionStatus()
+ {
+
+ }
- ///
+ ///
/// Adds a custom parameter to the transactionbase. requires a parameter key and a parameter value.
///
///
@@ -53,7 +53,7 @@ public void AddCustomParameter(string key, string value)
this.CustomParameters.List.Add(new CustomParameter()
{
Name = key,
- Value = value
+ Value = value
});
}
@@ -71,5 +71,5 @@ public void AddAdditionalParameter(string key, string value)
Value = value
});
}
- }
+ }
}
diff --git a/BuckarooSdk/DataTypes/Response/ConsumerMessage.cs b/BuckarooSdk/DataTypes/Response/ConsumerMessage.cs
index cf48b83..3b5ad28 100644
--- a/BuckarooSdk/DataTypes/Response/ConsumerMessage.cs
+++ b/BuckarooSdk/DataTypes/Response/ConsumerMessage.cs
@@ -1,29 +1,29 @@
-namespace BuckarooSdk.DataTypes.Response
+namespace BuckarooSdk.DataTypes.Response
{
- ///
- /// The date corresponding with the consumer message within the response
- ///
+ ///
+ /// The date corresponding with the consumer message within the response
+ ///
public class ConsumerMessage
{
- ///
- /// boolean that specifies if the message is must read
- ///
+ ///
+ /// boolean that specifies if the message is must read
+ ///
public bool MustRead { get; set; }
- ///
- /// The name of the culture that needs to be used for the message
- ///
+ ///
+ /// The name of the culture that needs to be used for the message
+ ///
public string CultureName { get; set; }
- ///
- /// The title of the message
- ///
+ ///
+ /// The title of the message
+ ///
public string Title { get; set; }
- ///
- /// the text that is used for the message
- ///
+ ///
+ /// the text that is used for the message
+ ///
public string PlainText { get; set; }
- ///
- /// the html text that is used for the message.
- ///
+ ///
+ /// the html text that is used for the message.
+ ///
public string HtmlText { get; set; }
}
-}
\ No newline at end of file
+}
diff --git a/BuckarooSdk/DataTypes/Response/DataType.cs b/BuckarooSdk/DataTypes/Response/DataType.cs
index 0175877..cd9fe67 100644
--- a/BuckarooSdk/DataTypes/Response/DataType.cs
+++ b/BuckarooSdk/DataTypes/Response/DataType.cs
@@ -1,47 +1,47 @@
-namespace BuckarooSdk.DataTypes.Response
+namespace BuckarooSdk.DataTypes.Response
{
- ///
- /// Enum that is used for the typing of response parameters.
- ///
+ ///
+ /// Enum that is used for the typing of response parameters.
+ ///
public enum DataType
{
- #region Datatypes
- ///
- /// String data type
- ///
- String,
- ///
- /// Integer data type
- ///
- Integer,
- ///
- /// Decimal data type
- ///
- Decimal,
- ///
- /// Date data type
- ///
- Date,
- ///
- /// Date time data type
- ///
- Datetime,
- ///
- /// Boolean data type
- ///
- Boolean,
- ///
- /// Cardnumber data type
- ///
- CardNumber,
- ///
- /// ExiryDate data type
- ///
+ #region Datatypes
+ ///
+ /// String data type
+ ///
+ String,
+ ///
+ /// Integer data type
+ ///
+ Integer,
+ ///
+ /// Decimal data type
+ ///
+ Decimal,
+ ///
+ /// Date data type
+ ///
+ Date,
+ ///
+ /// Date time data type
+ ///
+ Datetime,
+ ///
+ /// Boolean data type
+ ///
+ Boolean,
+ ///
+ /// Cardnumber data type
+ ///
+ CardNumber,
+ ///
+ /// ExiryDate data type
+ ///
ExpiryDate,
- ///
- /// CardStart data type
- ///
+ ///
+ /// CardStart data type
+ ///
CardStartDate
- #endregion
- }
-}
\ No newline at end of file
+ #endregion
+ }
+}
diff --git a/BuckarooSdk/DataTypes/Response/Error/ActionError.cs b/BuckarooSdk/DataTypes/Response/Error/ActionError.cs
index ef64de3..418488f 100644
--- a/BuckarooSdk/DataTypes/Response/Error/ActionError.cs
+++ b/BuckarooSdk/DataTypes/Response/Error/ActionError.cs
@@ -1,25 +1,25 @@
-namespace BuckarooSdk.DataTypes.Response.Error
+namespace BuckarooSdk.DataTypes.Response.Error
{
- ///
- /// An error regarding an action related problem.
- ///
- public class ActionError : RequestError
- {
- ///
- /// Service used when the error occured.
- ///
- public string Service { get; set; }
- ///
- /// The name of the error.
- ///
- public string Name { get; set; }
- ///
- /// The actual error.
- ///
- public string Error { get; set; }
- ///
- /// The message containing details of the error.
- ///
- public string ErrorMessage { get; set; }
+ ///
+ /// An error regarding an action related problem.
+ ///
+ public class ActionError : RequestError
+ {
+ ///
+ /// Service used when the error occured.
+ ///
+ public string Service { get; set; }
+ ///
+ /// The name of the error.
+ ///
+ public string Name { get; set; }
+ ///
+ /// The actual error.
+ ///
+ public string Error { get; set; }
+ ///
+ /// The message containing details of the error.
+ ///
+ public string ErrorMessage { get; set; }
}
-}
\ No newline at end of file
+}
diff --git a/BuckarooSdk/DataTypes/Response/Error/ChannelError.cs b/BuckarooSdk/DataTypes/Response/Error/ChannelError.cs
index db65e18..2696546 100644
--- a/BuckarooSdk/DataTypes/Response/Error/ChannelError.cs
+++ b/BuckarooSdk/DataTypes/Response/Error/ChannelError.cs
@@ -1,31 +1,31 @@
-namespace BuckarooSdk.DataTypes.Response.Error
+namespace BuckarooSdk.DataTypes.Response.Error
{
- ///
- /// An error regarding a channel related problem.
- ///
+ ///
+ /// An error regarding a channel related problem.
+ ///
public class ChannelError : RequestError
- {
- ///
- /// Service used when the error occured.
- ///
- public string Service { get; set; }
- ///
- /// The action that was performed when the error occured.
- ///
+ {
+ ///
+ /// Service used when the error occured.
+ ///
+ public string Service { get; set; }
+ ///
+ /// The action that was performed when the error occured.
+ ///
public string Action { get; set; }
- ///
- /// The name of the error.
- ///
+ ///
+ /// The name of the error.
+ ///
public string Name { get; set; }
- ///
- /// The actual error.
- ///
+ ///
+ /// The actual error.
+ ///
public string Error { get; set; }
- ///
- /// The message containing details of the error.
- ///
+ ///
+ /// The message containing details of the error.
+ ///
public string ErrorMessage { get; set; }
- //public string Type => this.GetType().Name;
- }
-}
\ No newline at end of file
+ //public string Type => this.GetType().Name;
+ }
+}
diff --git a/BuckarooSdk/DataTypes/Response/Error/CustomParameterError.cs b/BuckarooSdk/DataTypes/Response/Error/CustomParameterError.cs
index 8033246..fdd536c 100644
--- a/BuckarooSdk/DataTypes/Response/Error/CustomParameterError.cs
+++ b/BuckarooSdk/DataTypes/Response/Error/CustomParameterError.cs
@@ -1,21 +1,21 @@
-namespace BuckarooSdk.DataTypes.Response.Error
+namespace BuckarooSdk.DataTypes.Response.Error
{
- ///
- /// An error regarding a custom parameter related problem.
- ///
- public class CustomParameterError
+ ///
+ /// An error regarding a custom parameter related problem.
+ ///
+ public class CustomParameterError
{
- ///
- /// The name of the error.
- ///
- public string Name { get; set; }
- ///
- /// The actual error.
- ///
- public string Error { get; set; }
- ///
- /// The message containing details of the error.
- ///
- public string ErrorMessage { get; set; }
- }
-}
\ No newline at end of file
+ ///
+ /// The name of the error.
+ ///
+ public string Name { get; set; }
+ ///
+ /// The actual error.
+ ///
+ public string Error { get; set; }
+ ///
+ /// The message containing details of the error.
+ ///
+ public string ErrorMessage { get; set; }
+ }
+}
diff --git a/BuckarooSdk/DataTypes/Response/Error/ParameterError.cs b/BuckarooSdk/DataTypes/Response/Error/ParameterError.cs
index bdcd2e6..48d5b87 100644
--- a/BuckarooSdk/DataTypes/Response/Error/ParameterError.cs
+++ b/BuckarooSdk/DataTypes/Response/Error/ParameterError.cs
@@ -1,30 +1,30 @@
-namespace BuckarooSdk.DataTypes.Response.Error
+namespace BuckarooSdk.DataTypes.Response.Error
{
- ///
- /// An error regarding a parameter related problem.
- ///
- public class ParameterError
+ ///
+ /// An error regarding a parameter related problem.
+ ///
+ public class ParameterError
{
- ///
- /// Service used when the error occured.
- ///
- public string Service { get; set; }
- ///
- /// The action that was performed when the error occured.
- ///
- public string Action { get; set; }
- ///
- /// The name of the error.
- ///
- public string Name { get; set; }
- ///
- /// The actual error.
- ///
- public string Error { get; set; }
- ///
- /// The message containing details of the error.
- ///
- public string ErrorMessage { get; set; }
- }
-}
\ No newline at end of file
+ ///
+ /// Service used when the error occured.
+ ///
+ public string Service { get; set; }
+ ///
+ /// The action that was performed when the error occured.
+ ///
+ public string Action { get; set; }
+ ///
+ /// The name of the error.
+ ///
+ public string Name { get; set; }
+ ///
+ /// The actual error.
+ ///
+ public string Error { get; set; }
+ ///
+ /// The message containing details of the error.
+ ///
+ public string ErrorMessage { get; set; }
+ }
+}
diff --git a/BuckarooSdk/DataTypes/Response/Error/RequestErrors.cs b/BuckarooSdk/DataTypes/Response/Error/RequestErrors.cs
index 186b85e..7b80c9f 100644
--- a/BuckarooSdk/DataTypes/Response/Error/RequestErrors.cs
+++ b/BuckarooSdk/DataTypes/Response/Error/RequestErrors.cs
@@ -1,31 +1,31 @@
-using System.Collections.Generic;
+using System.Collections.Generic;
namespace BuckarooSdk.DataTypes.Response.Error
{
- ///
- /// All errors regarding the request. All errors are ordered by category.
- ///
+ ///
+ /// All errors regarding the request. All errors are ordered by category.
+ ///
public class RequestErrors
{
- ///
- /// A list of channel related errors
- ///
+ ///
+ /// A list of channel related errors
+ ///
public List ChannelErrors = new List();
- ///
- /// A list of service related errors
- ///
+ ///
+ /// A list of service related errors
+ ///
public List ServiceErrors = new List();
- ///
- /// A list of action related errors
- ///
+ ///
+ /// A list of action related errors
+ ///
public List ActionErrors = new List();
- ///
- /// A list of parameter related errors
- ///
+ ///
+ /// A list of parameter related errors
+ ///
public List ParameterErrors = new List();
- ///
- /// A list of custom parameter related errors
- ///
+ ///
+ /// A list of custom parameter related errors
+ ///
public List CustomParameterErrors = new List();
}
-}
\ No newline at end of file
+}
diff --git a/BuckarooSdk/DataTypes/Response/Error/ServiceError.cs b/BuckarooSdk/DataTypes/Response/Error/ServiceError.cs
index 5cf8332..8181d83 100644
--- a/BuckarooSdk/DataTypes/Response/Error/ServiceError.cs
+++ b/BuckarooSdk/DataTypes/Response/Error/ServiceError.cs
@@ -1,21 +1,21 @@
-namespace BuckarooSdk.DataTypes.Response.Error
+namespace BuckarooSdk.DataTypes.Response.Error
{
- ///
- /// An error regarding a service related problem.
- ///
- public class ServiceError
+ ///
+ /// An error regarding a service related problem.
+ ///
+ public class ServiceError
{
- ///
- /// The name of the error.
- ///
- public string Name { get; set; }
- ///
- /// The actual error.
- ///
- public string Error { get; set; }
- ///
- /// The message containing details of the error.
- ///
- public string ErrorMessage { get; set; }
+ ///
+ /// The name of the error.
+ ///
+ public string Name { get; set; }
+ ///
+ /// The actual error.
+ ///
+ public string Error { get; set; }
+ ///
+ /// The message containing details of the error.
+ ///
+ public string ErrorMessage { get; set; }
}
-}
\ No newline at end of file
+}
diff --git a/BuckarooSdk/DataTypes/Response/MutationType.cs b/BuckarooSdk/DataTypes/Response/MutationType.cs
index 8109471..defa18b 100644
--- a/BuckarooSdk/DataTypes/Response/MutationType.cs
+++ b/BuckarooSdk/DataTypes/Response/MutationType.cs
@@ -1,29 +1,29 @@
-namespace BuckarooSdk.DataTypes.Response
+namespace BuckarooSdk.DataTypes.Response
{
- ///
- /// Enum within options for the mutationtype. The mutationtype specifies the financial impact.
- ///
+ ///
+ /// Enum within options for the mutationtype. The mutationtype specifies the financial impact.
+ ///
public enum MutationType
{
- ///
- /// CancelTransaction mutation type not specified
- ///
+ ///
+ /// CancelTransaction mutation type not specified
+ ///
NotSet,
- ///
- /// CancelTransaction mutation type is collecting, which means that Buckaroo
- /// collects the funds of the transaction
- ///
+ ///
+ /// CancelTransaction mutation type is collecting, which means that Buckaroo
+ /// collects the funds of the transaction
+ ///
Collecting,
- ///
- /// CancelTransaction mutation type is processing, which means that Buckaroo
- /// does not collect the funds. The funds will be collected and paid out
- /// by a third party
- ///
+ ///
+ /// CancelTransaction mutation type is processing, which means that Buckaroo
+ /// does not collect the funds. The funds will be collected and paid out
+ /// by a third party
+ ///
Processing,
- ///
- /// CancelTransaction mutation type is informational, which means that this
- /// transactions has no financial consequenses directly.
- ///
+ ///
+ /// CancelTransaction mutation type is informational, which means that this
+ /// transactions has no financial consequenses directly.
+ ///
Informational
}
-}
\ No newline at end of file
+}
diff --git a/BuckarooSdk/DataTypes/Response/PayRemainderDetails.cs b/BuckarooSdk/DataTypes/Response/PayRemainderDetails.cs
index 410abfe..0d0a278 100644
--- a/BuckarooSdk/DataTypes/Response/PayRemainderDetails.cs
+++ b/BuckarooSdk/DataTypes/Response/PayRemainderDetails.cs
@@ -1,21 +1,21 @@
-namespace BuckarooSdk.DataTypes.Response
+namespace BuckarooSdk.DataTypes.Response
{
- ///
- /// Data corresponding to the payremainder details.
- ///
+ ///
+ /// Data corresponding to the payremainder details.
+ ///
public class PayRemainderDetails
{
- ///
- /// the remaining amount set for the remainder
- ///
+ ///
+ /// the remaining amount set for the remainder
+ ///
public decimal RemainderAmount { get; set; }
- ///
- /// The currency of the payment remainder
- ///
+ ///
+ /// The currency of the payment remainder
+ ///
public string Currency { get; set; }
///
/// The grouptransaction of the payremainder
///
public string GroupTransaction { get; set; }
}
-}
\ No newline at end of file
+}
diff --git a/BuckarooSdk/DataTypes/Response/RelatedTransaction.cs b/BuckarooSdk/DataTypes/Response/RelatedTransaction.cs
index 0f7b924..728fe64 100644
--- a/BuckarooSdk/DataTypes/Response/RelatedTransaction.cs
+++ b/BuckarooSdk/DataTypes/Response/RelatedTransaction.cs
@@ -1,17 +1,17 @@
-namespace BuckarooSdk.DataTypes.Response
+namespace BuckarooSdk.DataTypes.Response
{
- ///
- /// A previously performed transaction that is related to the transaction that has to be performed now.
- ///
+ ///
+ /// A previously performed transaction that is related to the transaction that has to be performed now.
+ ///
public class RelatedTransaction
{
- ///
- /// The type of relation that the
- ///
+ ///
+ /// The type of relation that the
+ ///
public string RelationType { get; set; }
///
/// The transaction key of the related transaction
///
public string RelatedTransactionKey { get; set; }
}
-}
\ No newline at end of file
+}
diff --git a/BuckarooSdk/DataTypes/Response/RequestInformationParameter.cs b/BuckarooSdk/DataTypes/Response/RequestInformationParameter.cs
index 58b25b2..fe93fba 100644
--- a/BuckarooSdk/DataTypes/Response/RequestInformationParameter.cs
+++ b/BuckarooSdk/DataTypes/Response/RequestInformationParameter.cs
@@ -1,29 +1,29 @@
-namespace BuckarooSdk.DataTypes.Response
+namespace BuckarooSdk.DataTypes.Response
{
- ///
- /// All data corresponding for a request information parameter
- ///
+ ///
+ /// All data corresponding for a request information parameter
+ ///
public class RequestInformationParameter
{
- ///
- /// The name of the request information parameter
- ///
+ ///
+ /// The name of the request information parameter
+ ///
public string Name { get; set; }
- ///
- /// The data type of the parameter
- ///
+ ///
+ /// The data type of the parameter
+ ///
public DataType DataType { get; set; }
- ///
- /// the maximum length of the parameter
- ///
+ ///
+ /// the maximum length of the parameter
+ ///
public int MaxLength { get; set; }
- ///
- /// Specifies whether the parameter is required for the request.
- ///
+ ///
+ /// Specifies whether the parameter is required for the request.
+ ///
public bool Required { get; set; }
- ///
- /// The description of the parameter.
- ///
+ ///
+ /// The description of the parameter.
+ ///
public string Description { get; set; }
}
-}
\ No newline at end of file
+}
diff --git a/BuckarooSdk/DataTypes/Response/RequestResponse.cs b/BuckarooSdk/DataTypes/Response/RequestResponse.cs
index 50de96b..dea67c9 100644
--- a/BuckarooSdk/DataTypes/Response/RequestResponse.cs
+++ b/BuckarooSdk/DataTypes/Response/RequestResponse.cs
@@ -21,26 +21,32 @@ public class RequestResponse : IRequestResponse
/// is performed.
///
public ILogger BuckarooSdkLogger { get; internal set; }
+
///
/// The transaction key
///
public string Key { get; set; }
+
///
/// The status of the transaction
///
public Status.Status Status { get; set; }
+
///
/// The required action
///
public RequiredAction RequiredAction { get; set; }
+
///
/// The list of services that were available for the transaction request
///
public List Services { get; set; }
+
///
/// The list of custom parameters that was sent with the transaction request
///
public CustomParameters CustomParameters { get; set; }
+
///
/// The list of additional parameters that was sent with the transaction request
///
@@ -50,81 +56,97 @@ public class RequestResponse : IRequestResponse
/// An overcoupling error overview with list of all errors per error type.
///
public RequestErrors RequestErrors { get; set; }
+
///
/// The invoice used in the request.
///
public string Invoice { get; set; }
+
///
/// The code of the service used for the transaction.
///
public string ServiceCode { get; set; }
+
///
/// boolean that specifies if the transaction was a test transaction.
///
public bool IsTest { get; set; }
+
///
/// The currency that
///
public string Currency { get; set; }
+
///
/// The debit amount of the requested transaction
///
public decimal? AmountDebit { get; set; }
+
///
/// The transaction type that was specified in the transaction request.
///
public string TransactionType { get; set; }
+
///
/// The mutation type of the transaction request.
///
public MutationType MutationType { get; set; }
+
///
/// A list of transactions that are related to the transaction that was requested.
///
public List RelatedTransactions { get; set; }
+
///
/// The consumer message
///
public ConsumerMessage ConsumerMessage { get; set; }
+
///
/// The order value. This is an alphanumerical value.
///
public string Order { get; set; }
+
///
/// The issuing country of the requested transaction.
///
public string IssuingCountry { get; set; }
+
///
/// Boolean value that specifies wheter the requested transactions initiated a startrecurrent.
///
public bool StartRecurrent { get; set; }
+
///
/// Boolean value that specifies wheter the transaction is a recurring transaction.
///
public bool Recurring { get; set; }
+
///
/// The number of the customer that the transaction request was meant for.
///
public string CustomerName { get; set; }
+
///
/// The payer hash value of the requested transaction.
///
public string PayerHash { get; set; }
+
///
/// The key value of the payment.
///
public string PaymentKey { get; set; }
- public string RawRequest => this.BuckarooSdkLogger.GetRawRequest();
+ public string RawRequest => BuckarooSdkLogger.GetRawRequest();
- public string RawResponse => this.BuckarooSdkLogger.GetRawResponse();
+ public string RawResponse => BuckarooSdkLogger.GetRawResponse();
///
/// Primary constructor.
///
public RequestResponse()
{
- this.Status = new Status.Status();
+ Status = new Status.Status();
}
public List GetServices()
@@ -141,12 +163,6 @@ public List GetServices()
public bool CheckResponseForErrors()
{
-
- foreach (var actionError in RequestErrors.ActionErrors)
- {
-
- }
-
return false;
}
diff --git a/BuckarooSdk/DataTypes/Response/RequiredAction.cs b/BuckarooSdk/DataTypes/Response/RequiredAction.cs
index 868d0fc..137e9a4 100644
--- a/BuckarooSdk/DataTypes/Response/RequiredAction.cs
+++ b/BuckarooSdk/DataTypes/Response/RequiredAction.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Collections.Generic;
namespace BuckarooSdk.DataTypes.Response
@@ -24,9 +24,8 @@ public string Name
}
set
{
- RequiredActionType type;
- Enum.TryParse(value, out type);
- this.Type = type;
+ Enum.TryParse(value, out RequiredActionType type);
+ this.Type = type;
}
}
///
@@ -42,4 +41,4 @@ public string Name
///
public PayRemainderDetails PayRemainderDetails { get; set; }
}
-}
\ No newline at end of file
+}
diff --git a/BuckarooSdk/DataTypes/Response/ResponseParameter.cs b/BuckarooSdk/DataTypes/Response/ResponseParameter.cs
index 2e9a1ec..ceca5c1 100644
--- a/BuckarooSdk/DataTypes/Response/ResponseParameter.cs
+++ b/BuckarooSdk/DataTypes/Response/ResponseParameter.cs
@@ -1,18 +1,18 @@
-namespace BuckarooSdk.DataTypes.Response
+namespace BuckarooSdk.DataTypes.Response
{
- ///
- /// The reponse parameter specifies the name and value of each response.
- ///
+ ///
+ /// The reponse parameter specifies the name and value of each response.
+ ///
public class ResponseParameter
{
- ///
- /// The name of the response parameter.
- ///
+ ///
+ /// The name of the response parameter.
+ ///
public string Name { get; set; }
- ///
- /// The value of the response parameter.
- ///
+ ///
+ /// The value of the response parameter.
+ ///
public string Value { get; set; }
}
-}
\ No newline at end of file
+}
diff --git a/BuckarooSdk/DataTypes/Response/Service.cs b/BuckarooSdk/DataTypes/Response/Service.cs
index 9b29a13..a857689 100644
--- a/BuckarooSdk/DataTypes/Response/Service.cs
+++ b/BuckarooSdk/DataTypes/Response/Service.cs
@@ -1,4 +1,4 @@
-using System.Collections.Generic;
+using System.Collections.Generic;
namespace BuckarooSdk.DataTypes.Response
{
@@ -7,23 +7,23 @@ namespace BuckarooSdk.DataTypes.Response
///
public class Service
{
- ///
- /// The version of the service
- ///
- public uint VersionAsProperty { get; set; }
- ///
- /// The name of the service that the response belongs to.
- ///
+ ///
+ /// The version of the service
+ ///
+ public uint VersionAsProperty { get; set; }
+ ///
+ /// The name of the service that the response belongs to.
+ ///
public string Name { get; set; }
- ///
- /// The name of the action that the response belongs to.
- ///
+ ///
+ /// The name of the action that the response belongs to.
+ ///
public string Action { get; set; }
- ///
- /// The list of response parameters.
- ///
+ ///
+ /// The list of response parameters.
+ ///
public List Parameters { get; set; }
}
-}
\ No newline at end of file
+}
diff --git a/BuckarooSdk/DataTypes/Response/Status/Status.cs b/BuckarooSdk/DataTypes/Response/Status/Status.cs
index b189a44..5c95ca8 100644
--- a/BuckarooSdk/DataTypes/Response/Status/Status.cs
+++ b/BuckarooSdk/DataTypes/Response/Status/Status.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
namespace BuckarooSdk.DataTypes.Response.Status
{
@@ -25,8 +25,8 @@ public class Status
///
public Status()
{
- this.Code = new StatusCode();
- this.SubCode = new StatusSubCode();
+ this.Code = new StatusCode();
+ this.SubCode = new StatusSubCode();
}
}
-}
\ No newline at end of file
+}
diff --git a/BuckarooSdk/DataTypes/TransactionReference.cs b/BuckarooSdk/DataTypes/TransactionReference.cs
index cf6391a..7544e0c 100644
--- a/BuckarooSdk/DataTypes/TransactionReference.cs
+++ b/BuckarooSdk/DataTypes/TransactionReference.cs
@@ -1,18 +1,18 @@
namespace BuckarooSdk.DataTypes
{
- ///
- /// A transaction reference is used to give within a transaction to give a reference towards
- /// previously performed transaction.
- ///
+ ///
+ /// A transaction reference is used to give within a transaction to give a reference towards
+ /// previously performed transaction.
+ ///
public class TransactionReference
{
- ///
- /// The type of the original transaction
- ///
+ ///
+ /// The type of the original transaction
+ ///
public string Type { get; set; }
- ///
- /// The actual reference of the original transaction
- ///
+ ///
+ /// The actual reference of the original transaction
+ ///
public string Reference { get; set; }
}
}
diff --git a/BuckarooSdk/SdkClient.cs b/BuckarooSdk/SdkClient.cs
index e35d821..bfaa8bf 100644
--- a/BuckarooSdk/SdkClient.cs
+++ b/BuckarooSdk/SdkClient.cs
@@ -5,115 +5,111 @@
namespace BuckarooSdk
{
- ///
- ///
- /// @Copyright 2016, 2017, Sjaak Roos, Buckaroo B.V.
- ///
- /// This file is part of the Buckaroo SDK
- ///
- /// The Buckaroo SDK is free software: you can redistribute it and/or modify
- /// it under the terms of the GNU General Public License as published by
- /// the Free Software Foundation, either version 3 of the License, or
- /// (at your option) any later version.
- ///
- /// This program is distributed in the hope that it will be useful,
- /// but WITHOUT ANY WARRANTY; without even the implied warranty of
- /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- /// GNU General Public License for more details.
- ///
- /// You should have received a copy of the GNU General Public License
- /// along with this program. If not, see http://www.gnu.org/licenses/
- ///
- ///
- public class SdkClient
- {
- private PushHandler PushHandler { get; set; }
+ ///
+ ///
+ /// @Copyright 2016, 2017, Sjaak Roos, Buckaroo B.V.
+ ///
+ /// This file is part of the Buckaroo SDK
+ ///
+ /// The Buckaroo SDK is free software: you can redistribute it and/or modify
+ /// it under the terms of the GNU General Public License as published by
+ /// the Free Software Foundation, either version 3 of the License, or
+ /// (at your option) any later version.
+ ///
+ /// This program is distributed in the hope that it will be useful,
+ /// but WITHOUT ANY WARRANTY; without even the implied warranty of
+ /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ /// GNU General Public License for more details.
+ ///
+ /// You should have received a copy of the GNU General Public License
+ /// along with this program. If not, see http://www.gnu.org/licenses/
+ ///
+ ///
+ public class SdkClient
+ {
+ private PushHandler PushHandler { get; set; }
- private Func LoggerFactory { get; set; }
+ private Func LoggerFactory { get; set; }
- ///
- /// Default constructor. The standard logger will be used by this instance, if none is provided when creating a request.
- ///
- public SdkClient()
- {
- this.LoggerFactory = () => new StandardLogger();
- }
+ ///
+ /// Default constructor. The standard logger will be used by this instance, if none is provided when creating a request.
+ ///
+ public SdkClient()
+ {
+ this.LoggerFactory = () => new StandardLogger();
+ }
- ///
- /// Constructor where a custom logger factory can be set, for creating custom implemented loggers.
- ///
- /// A locally stored function, e.g. () => new CustomImplementationLogger()
- public SdkClient(Func loggerFactory)
- {
- if (loggerFactory == null)
- {
- throw new ArgumentNullException(nameof(loggerFactory));
- }
- this.LoggerFactory = loggerFactory ;
- }
+ ///
+ /// Constructor where a custom logger factory can be set, for creating custom implemented loggers.
+ ///
+ /// A locally stored function, e.g. () => new CustomImplementationLogger()
+ public SdkClient(Func loggerFactory)
+ {
+ this.LoggerFactory = loggerFactory ?? throw new ArgumentNullException(nameof(loggerFactory));
+ }
- ///
- /// Create request function that returns a new request.
- ///
- ///
- public Request CreateRequest()
- {
- return new Request(this.LoggerFactory());
- }
+ ///
+ /// Create request function that returns a new request.
+ ///
+ ///
+ public Request CreateRequest()
+ {
+ return new Request(this.LoggerFactory());
+ }
- ///
- /// Create request function that returns a new request. A ILogger implementations can be provided. If omitted, the Logger
- /// instance will be provided by the LoggerFactory.
- ///
- ///
- ///
- public Request CreateRequest(ILogger logger)
- {
- return new Request(logger);
- }
+ ///
+ /// Create request function that returns a new request. A ILogger implementations can be provided. If omitted, the Logger
+ /// instance will be provided by the LoggerFactory.
+ ///
+ ///
+ ///
+ public Request CreateRequest(ILogger logger)
+ {
+ return new Request(logger);
+ }
- ///
- /// Create request function that returns a new request. A StandardLogger implementations can be provided. If omitted, the Logger
- /// instance will be provided by the LoggerFactory.
- ///
- ///
- ///
- public Request CreateRequest(StandardLogger logger)
- {
- return new Request(logger);
- }
+ ///
+ /// Create request function that returns a new request. A StandardLogger implementations can be provided. If omitted, the Logger
+ /// instance will be provided by the LoggerFactory.
+ ///
+ ///
+ ///
+ public Request CreateRequest(StandardLogger logger)
+ {
+ return new Request(logger);
+ }
- ///
- /// Create request function that returns a new request. A ExtensiveLogger implementations can be provided. If omitted, the Logger
- /// instance will be provided by the LoggerFactory.
- ///
- ///
- ///
- public Request CreateRequest(ExtensiveLogger logger)
- {
- return new Request(logger);
- }
+ ///
+ /// Create request function that returns a new request. A ExtensiveLogger implementations can be provided. If omitted, the Logger
+ /// instance will be provided by the LoggerFactory.
+ ///
+ ///
+ ///
+ public Request CreateRequest(ExtensiveLogger logger)
+ {
+ return new Request(logger);
+ }
- ///
- /// Returns a Buckaroo push handler, that can be used to process push messages.
- ///
- ///
- public PushHandler GetPushHandler(string apiKey)
- {
- return this.PushHandler ?? (this.PushHandler = new PushHandler(apiKey));
- }
+ ///
+ /// Returns a Buckaroo push handler, that can be used to process push messages.
+ ///
+ ///
+ public PushHandler GetPushHandler(string apiKey)
+ {
+ return this.PushHandler ?? (this.PushHandler = new PushHandler(apiKey));
+ }
- ///
- /// Returns a SignatureCalculationService instance that is also used by the SDK to calculate
- /// and verify authentication signatures regarding the requests, responses and pushes. When using
- /// the SDK one does not need to calculate signatures himself. But because the service is friendly
- /// to use, it is made retrievable through the SDK client and can be used when only a signature needs
- /// the be checked or calculated for sending a request.
- ///
- ///
- public SignatureCalculationService GetSignatureCalculationService()
- {
- return new SignatureCalculationService();
- }
- }
+ ///
+ /// Returns a SignatureCalculationService instance that is also used by the SDK to calculate
+ /// and verify authentication signatures regarding the requests, responses and pushes. When using
+ /// the SDK one does not need to calculate signatures himself. But because the service is friendly
+ /// to use, it is made retrievable through the SDK client and can be used when only a signature needs
+ /// the be checked or calculated for sending a request.
+ ///
+ ///
+ public SignatureCalculationService GetSignatureCalculationService()
+ {
+ return new SignatureCalculationService();
+ }
+ }
}
diff --git a/BuckarooSdk/Services/ActionPush.cs b/BuckarooSdk/Services/ActionPush.cs
index d24c8ea..fba848a 100644
--- a/BuckarooSdk/Services/ActionPush.cs
+++ b/BuckarooSdk/Services/ActionPush.cs
@@ -5,45 +5,51 @@
namespace BuckarooSdk.Services
{
- public abstract class ActionPush
- {
- public abstract ServiceNames ServiceNames { get; }
-
- internal virtual void FillFromPush(DataTypes.Response.Service servicePush)
- {
- var ownType = this.GetType();
- var publicProperties = ownType.GetProperties(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance);
-
- foreach (var property in publicProperties)
- {
- var propertyName = property.Name;
-
- // TODO: Make dictionary/lookup?
- var parameter = this.GetParameter(servicePush, propertyName);
-
- if (parameter == null)
- {
- continue;
- }
-
- var convertedValue = this.ConvertValue(parameter.Value, property.PropertyType);
- property.SetValue(this, convertedValue);
- }
- }
-
- protected ResponseParameter GetParameter(DataTypes.Response.Service serviceResponse, string parameterName)
- {
- return serviceResponse.Parameters.FirstOrDefault(param => param.Name.Equals(parameterName, StringComparison.OrdinalIgnoreCase));
- }
-
- protected T ConvertValue(string value)
- {
- return (T)this.ConvertValue(value, typeof(T));
- }
-
- protected object ConvertValue(string value, Type toType)
- {
- return Convert.ChangeType(value, toType);
- }
- }
+ ///
+ /// Action push.
+ ///
+ public abstract class ActionPush
+ {
+ ///
+ /// Service names.
+ ///
+ public abstract ServiceNames ServiceNames { get; }
+
+ internal virtual void FillFromPush(DataTypes.Response.Service servicePush)
+ {
+ var ownType = this.GetType();
+ var publicProperties = ownType.GetProperties(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance);
+
+ foreach (var property in publicProperties)
+ {
+ var propertyName = property.Name;
+
+ // TODO: Make dictionary/lookup?
+ var parameter = this.GetParameter(servicePush, propertyName);
+
+ if (parameter == null)
+ {
+ continue;
+ }
+
+ var convertedValue = this.ConvertValue(parameter.Value, property.PropertyType);
+ property.SetValue(this, convertedValue);
+ }
+ }
+
+ protected ResponseParameter GetParameter(DataTypes.Response.Service serviceResponse, string parameterName)
+ {
+ return serviceResponse.Parameters.FirstOrDefault(param => param.Name.Equals(parameterName, StringComparison.OrdinalIgnoreCase));
+ }
+
+ protected T ConvertValue(string value)
+ {
+ return (T)this.ConvertValue(value, typeof(T));
+ }
+
+ protected object ConvertValue(string value, Type toType)
+ {
+ return Convert.ChangeType(value, toType);
+ }
+ }
}
diff --git a/BuckarooSdk/Services/Afterpay/AfterpayRefundRequest.cs b/BuckarooSdk/Services/Afterpay/AfterpayRefundRequest.cs
index e17d2e3..8329098 100644
--- a/BuckarooSdk/Services/Afterpay/AfterpayRefundRequest.cs
+++ b/BuckarooSdk/Services/Afterpay/AfterpayRefundRequest.cs
@@ -1,9 +1,9 @@
-using BuckarooSdk.DataTypes.ParameterGroups.Afterpay;
+using BuckarooSdk.DataTypes.ParameterGroups.Afterpay;
namespace BuckarooSdk.Services.Afterpay
{
- public class AfterpayRefundRequest
- {
- public ParameterGroupCollection Articles { get; set; }
+ public class AfterpayRefundRequest
+ {
+ public ParameterGroupCollection Articles { get; set; }
}
}
diff --git a/BuckarooSdk/Services/CreditCards/AmericanExpress/TransactionRequest/AmericanExpressTransaction.cs b/BuckarooSdk/Services/CreditCards/AmericanExpress/TransactionRequest/AmericanExpressTransaction.cs
index 54391bc..84a495c 100644
--- a/BuckarooSdk/Services/CreditCards/AmericanExpress/TransactionRequest/AmericanExpressTransaction.cs
+++ b/BuckarooSdk/Services/CreditCards/AmericanExpress/TransactionRequest/AmericanExpressTransaction.cs
@@ -2,19 +2,19 @@
namespace BuckarooSdk.Services.CreditCards.AmericanExpress.TransactionRequest
{
- public class AmericanExpressTransaction
- {
- ///
- /// The configured transaction
- ///
- private ConfiguredTransaction ConfiguredTransaction { get; set; }
+ public class AmericanExpressTransaction
+ {
+ ///
+ /// The configured transaction
+ ///
+ private ConfiguredTransaction ConfiguredTransaction { get; set; }
- internal AmericanExpressTransaction(ConfiguredTransaction configuredTransaction)
- {
- this.ConfiguredTransaction = configuredTransaction;
- }
+ internal AmericanExpressTransaction(ConfiguredTransaction configuredTransaction)
+ {
+ this.ConfiguredTransaction = configuredTransaction;
+ }
- ///
+ ///
/// The pay function creates a configured transaction with an IdealPayRequest,
/// that is ready to be executed.
///
@@ -29,11 +29,11 @@ public ConfiguredServiceTransaction Pay(AmericanExpressPayRequest request)
return configuredServiceTransaction;
}
///
- /// The refund function creates a configured transaction with an IdealRefundRequest,
+ /// The refund function creates a configured transaction with an IdealRefundRequest,
/// that is ready to be executed.
- ///
- /// An IdealRefundRequest
- ///
+ ///
+ /// An IdealRefundRequest
+ ///
public ConfiguredServiceTransaction Refund(AmericanExpressRefundRequest request)
{
var parameters = ServiceHelper.CreateServiceParameters(request);
@@ -43,12 +43,12 @@ public ConfiguredServiceTransaction Refund(AmericanExpressRefundRequest request)
return configuredServiceTransaction;
}
- ///
- /// The pay remainder function creates a configured transaction with an IdealPayRemainderRequest,
+ ///
+ /// The pay remainder function creates a configured transaction with an IdealPayRemainderRequest,
/// that is ready to be executed.
- ///
- /// An IdealPayRemainderRequest
- ///
+ ///
+ /// An IdealPayRemainderRequest
+ ///
public ConfiguredServiceTransaction Authorize(AmericanExpressAuthorizeRequest request)
{
var parameters = ServiceHelper.CreateServiceParameters(request);
@@ -58,12 +58,12 @@ public ConfiguredServiceTransaction Authorize(AmericanExpressAuthorizeRequest re
return configuredServiceTransaction;
}
- ///
- /// The pay remainder function creates a configured transaction with an IdealPayRemainderRequest,
+ ///
+ /// The pay remainder function creates a configured transaction with an IdealPayRemainderRequest,
/// that is ready to be executed.
- ///
- /// An IdealPayRemainderRequest
- ///
+ ///
+ /// An IdealPayRemainderRequest
+ ///
public ConfiguredServiceTransaction PayRecurrent(AmericanExpressPayRecurrentRequest request)
{
var parameters = ServiceHelper.CreateServiceParameters(request);
@@ -74,11 +74,11 @@ public ConfiguredServiceTransaction PayRecurrent(AmericanExpressPayRecurrentRequ
}
///
- /// The pay remainder function creates a configured transaction with an IdealPayRemainderRequest,
+ /// The pay remainder function creates a configured transaction with an IdealPayRemainderRequest,
/// that is ready to be executed.
- ///
- /// An IdealPayRemainderRequest
- ///
+ ///
+ /// An IdealPayRemainderRequest
+ ///
public ConfiguredServiceTransaction PayRemainder(AmericanExpressPayRemainderRequest request)
{
var parameters = ServiceHelper.CreateServiceParameters(request);
@@ -88,5 +88,5 @@ public ConfiguredServiceTransaction PayRemainder(AmericanExpressPayRemainderRequ
return configuredServiceTransaction;
}
- }
+ }
}
diff --git a/BuckarooSdk/Services/CreditCards/BanContact/BanContactTransaction.cs b/BuckarooSdk/Services/CreditCards/BanContact/BanContactTransaction.cs
index 4bce572..18f1715 100644
--- a/BuckarooSdk/Services/CreditCards/BanContact/BanContactTransaction.cs
+++ b/BuckarooSdk/Services/CreditCards/BanContact/BanContactTransaction.cs
@@ -1,4 +1,4 @@
-using BuckarooSdk.Services.CreditCards.BanContact.Request;
+using BuckarooSdk.Services.CreditCards.BanContact.Request;
using BuckarooSdk.Transaction;
namespace BuckarooSdk.Services.CreditCards.BanContact
@@ -6,8 +6,8 @@ namespace BuckarooSdk.Services.CreditCards.BanContact
public class BancontactTransaction
{
///
- /// The configured transaction
- ///
+ /// The configured transaction
+ ///
private ConfiguredTransaction ConfiguredTransaction { get; set; }
internal BancontactTransaction(ConfiguredTransaction configuredTransaction)
@@ -15,66 +15,66 @@ internal BancontactTransaction(ConfiguredTransaction configuredTransaction)
this.ConfiguredTransaction = configuredTransaction;
}
- ///
+ ///
/// The Pay function creates a configured transaction with an BancontactPayRequest request,
/// that is ready to be executed.
///
/// A BancontactPayRequest
- ///
- public ConfiguredServiceTransaction Pay(BancontactPayRequest request)
- {
- var parameters = ServiceHelper.CreateServiceParameters(request);
- var configuredServiceTransaction = new ConfiguredServiceTransaction(this.ConfiguredTransaction.BaseTransaction);
- configuredServiceTransaction.BaseTransaction.AddService("bancontactmrcash", parameters, "Pay", "1");
+ ///
+ public ConfiguredServiceTransaction Pay(BancontactPayRequest request)
+ {
+ var parameters = ServiceHelper.CreateServiceParameters(request);
+ var configuredServiceTransaction = new ConfiguredServiceTransaction(this.ConfiguredTransaction.BaseTransaction);
+ configuredServiceTransaction.BaseTransaction.AddService("bancontactmrcash", parameters, "Pay", "1");
- return configuredServiceTransaction;
- }
+ return configuredServiceTransaction;
+ }
///
/// The Refund function creates a configured transaction with an BancontactRefundRequest request,
/// that is ready to be executed.
///
/// A BancontactRefundRequest
- ///
- public ConfiguredServiceTransaction Refund(BancontactRefundRequest request)
- {
- var parameters = ServiceHelper.CreateServiceParameters(request);
- var configuredServiceTransaction = new ConfiguredServiceTransaction(this.ConfiguredTransaction.BaseTransaction);
- configuredServiceTransaction.BaseTransaction.AddService("bancontactmrcash", parameters, "Refund", "1");
+ ///
+ public ConfiguredServiceTransaction Refund(BancontactRefundRequest request)
+ {
+ var parameters = ServiceHelper.CreateServiceParameters(request);
+ var configuredServiceTransaction = new ConfiguredServiceTransaction(this.ConfiguredTransaction.BaseTransaction);
+ configuredServiceTransaction.BaseTransaction.AddService("bancontactmrcash", parameters, "Refund", "1");
- return configuredServiceTransaction;
- }
+ return configuredServiceTransaction;
+ }
///
/// The PayRemainder function creates a configured transaction with an BancontactPayRemainderRequest request,
/// that is ready to be executed.
///
/// A BancontactPayRemainderRequest
- ///
- public ConfiguredServiceTransaction PayRemainder(BancontactPayRemainderRequest request)
- {
- var parameters = ServiceHelper.CreateServiceParameters(request);
- var configuredServiceTransaction = new ConfiguredServiceTransaction(this.ConfiguredTransaction.BaseTransaction);
- configuredServiceTransaction.BaseTransaction.AddService("bancontactmrcash", parameters, "PayRemainder", "1");
+ ///
+ public ConfiguredServiceTransaction PayRemainder(BancontactPayRemainderRequest request)
+ {
+ var parameters = ServiceHelper.CreateServiceParameters(request);
+ var configuredServiceTransaction = new ConfiguredServiceTransaction(this.ConfiguredTransaction.BaseTransaction);
+ configuredServiceTransaction.BaseTransaction.AddService("bancontactmrcash", parameters, "PayRemainder", "1");
- return configuredServiceTransaction;
- }
+ return configuredServiceTransaction;
+ }
///
/// The PayEncrypted function creates a configured transaction with an BancontactPayEncryptedRequest request,
/// that is ready to be executed.
///
/// A BancontactPayEncryptedRequest
- ///
- public ConfiguredServiceTransaction PayEncrypted(BancontactPayEncryptedRequest request)
- {
- var parameters = ServiceHelper.CreateServiceParameters(request);
- var configuredServiceTransaction = new ConfiguredServiceTransaction(this.ConfiguredTransaction.BaseTransaction);
- configuredServiceTransaction.BaseTransaction.AddService("bancontactmrcash", parameters, "PayEncrypted", "1");
+ ///
+ public ConfiguredServiceTransaction PayEncrypted(BancontactPayEncryptedRequest request)
+ {
+ var parameters = ServiceHelper.CreateServiceParameters(request);
+ var configuredServiceTransaction = new ConfiguredServiceTransaction(this.ConfiguredTransaction.BaseTransaction);
+ configuredServiceTransaction.BaseTransaction.AddService("bancontactmrcash", parameters, "PayEncrypted", "1");
- return configuredServiceTransaction;
- }
+ return configuredServiceTransaction;
+ }
- }
+ }
}
diff --git a/BuckarooSdk/Services/CreditCards/MasterCard/Response/MasterCardCaptureResponse.cs b/BuckarooSdk/Services/CreditCards/MasterCard/Response/MasterCardCaptureResponse.cs
index d60530e..bf60107 100644
--- a/BuckarooSdk/Services/CreditCards/MasterCard/Response/MasterCardCaptureResponse.cs
+++ b/BuckarooSdk/Services/CreditCards/MasterCard/Response/MasterCardCaptureResponse.cs
@@ -4,16 +4,16 @@ namespace BuckarooSdk.Services.CreditCards.MasterCard.Response
{
public class MasterCardCaptureResponse : ActionResponse
{
- public override ServiceNames ServiceNames => ServiceNames.MasterCard;
+ public override ServiceNames ServiceNames => ServiceNames.MasterCard;
- ///
- /// Last 4 digits of the creditcard number.
- ///
- public string CardNumberEnding { get; set; }
+ ///
+ /// Last 4 digits of the creditcard number.
+ ///
+ public string CardNumberEnding { get; set; }
- ///
- /// Last 4 digits of the creditcard number.
- ///
- public string CardExpirationDate { get; set; }
+ ///
+ /// Last 4 digits of the creditcard number.
+ ///
+ public string CardExpirationDate { get; set; }
}
}
diff --git a/BuckarooSdk/Services/CreditCards/Visa/Response/VisaAuthorizeResponse.cs b/BuckarooSdk/Services/CreditCards/Visa/Response/VisaAuthorizeResponse.cs
index 2aea1a5..ec2b46d 100644
--- a/BuckarooSdk/Services/CreditCards/Visa/Response/VisaAuthorizeResponse.cs
+++ b/BuckarooSdk/Services/CreditCards/Visa/Response/VisaAuthorizeResponse.cs
@@ -4,26 +4,26 @@ namespace BuckarooSdk.Services.CreditCards.Visa.Response
{
public class VisaAuthorizeResponse : ActionResponse
{
- public override ServiceNames ServiceNames => ServiceNames.Visa;
+ public override ServiceNames ServiceNames => ServiceNames.Visa;
- ///
- /// The expiration date of the card used by the customer.
- ///
+ ///
+ /// The expiration date of the card used by the customer.
+ ///
public string CardExpirationDate { get; set; }
- ///
- /// States wether the card is enrolled.
- ///
+ ///
+ /// States wether the card is enrolled.
+ ///
public string CardEnrolled { get; set; }
- ///
- /// The card authentication reference.
- ///
+ ///
+ /// The card authentication reference.
+ ///
public string CardAuthentication { get; set; }
- ///
- /// The last few digits of the card used by the customer.
- ///
+ ///
+ /// The last few digits of the card used by the customer.
+ ///
public string CardNumberEnding { get; set; }
}
}
diff --git a/BuckarooSdk/Services/CreditCards/Visa/Response/VisaCaptureResponse.cs b/BuckarooSdk/Services/CreditCards/Visa/Response/VisaCaptureResponse.cs
index 2713133..f15d1c5 100644
--- a/BuckarooSdk/Services/CreditCards/Visa/Response/VisaCaptureResponse.cs
+++ b/BuckarooSdk/Services/CreditCards/Visa/Response/VisaCaptureResponse.cs
@@ -4,16 +4,16 @@ namespace BuckarooSdk.Services.CreditCards.Visa.Response
{
public class VisaCaptureResponse: ActionResponse
{
- public override ServiceNames ServiceNames => ServiceNames.Visa;
+ public override ServiceNames ServiceNames => ServiceNames.Visa;
- ///
- /// Last 4 digits of the creditcard number.
- ///
- public string CardNumberEnding { get; set; }
+ ///
+ /// Last 4 digits of the creditcard number.
+ ///
+ public string CardNumberEnding { get; set; }
- ///
- /// Last 4 digits of the creditcard number.
- ///
- public string CardExpirationDate { get; set; }
+ ///
+ /// Last 4 digits of the creditcard number.
+ ///
+ public string CardExpirationDate { get; set; }
}
}
diff --git a/BuckarooSdk/Services/CreditCards/Visa/Response/VisaPayRemainderResponse.cs b/BuckarooSdk/Services/CreditCards/Visa/Response/VisaPayRemainderResponse.cs
index 42639e8..bcf0459 100644
--- a/BuckarooSdk/Services/CreditCards/Visa/Response/VisaPayRemainderResponse.cs
+++ b/BuckarooSdk/Services/CreditCards/Visa/Response/VisaPayRemainderResponse.cs
@@ -4,26 +4,26 @@ namespace BuckarooSdk.Services.CreditCards.Visa.Response
{
public class VisaPayRemainderResponse: ActionResponse
{
- public override ServiceNames ServiceNames => ServiceNames.Visa;
+ public override ServiceNames ServiceNames => ServiceNames.Visa;
- ///
- /// Credit card expiration date.
- ///
- public string CardExpirationDate { get; set; }
+ ///
+ /// Credit card expiration date.
+ ///
+ public string CardExpirationDate { get; set; }
- ///
- /// The enrolled status.
- ///
- public string CardEnrolled { get; set; }
+ ///
+ /// The enrolled status.
+ ///
+ public string CardEnrolled { get; set; }
- ///
- /// The authentication status.
- ///
- public string CardAuthentication { get; set; }
+ ///
+ /// The authentication status.
+ ///
+ public string CardAuthentication { get; set; }
- ///
- /// Last 4 digits of the creditcard number.
- ///
- public string CardNumberEnding { get; set; }
+ ///
+ /// Last 4 digits of the creditcard number.
+ ///
+ public string CardNumberEnding { get; set; }
}
}
diff --git a/BuckarooSdk/Services/CreditCards/Visa/Response/VisaPayResponse.cs b/BuckarooSdk/Services/CreditCards/Visa/Response/VisaPayResponse.cs
index 0394d3b..71a28ee 100644
--- a/BuckarooSdk/Services/CreditCards/Visa/Response/VisaPayResponse.cs
+++ b/BuckarooSdk/Services/CreditCards/Visa/Response/VisaPayResponse.cs
@@ -4,26 +4,26 @@ namespace BuckarooSdk.Services.CreditCards.Visa.Response
{
public class VisaPayResponse: ActionResponse
{
- public override ServiceNames ServiceNames => ServiceNames.Visa;
+ public override ServiceNames ServiceNames => ServiceNames.Visa;
- ///
- /// Credit card expiration date.
- ///
- public string CardExpirationDate { get; set; }
+ ///
+ /// Credit card expiration date.
+ ///
+ public string CardExpirationDate { get; set; }
- ///
- /// The enrolled status.
- ///
- public string CardEnrolled { get; set; }
+ ///
+ /// The enrolled status.
+ ///
+ public string CardEnrolled { get; set; }
- ///
- /// The authentication status.
- ///
- public string CardAuthentication { get; set; }
+ ///
+ /// The authentication status.
+ ///
+ public string CardAuthentication { get; set; }
- ///
- /// Last 4 digits of the creditcard number.
- ///
- public string CardNumberEnding { get; set; }
+ ///
+ /// Last 4 digits of the creditcard number.
+ ///
+ public string CardNumberEnding { get; set; }
}
}
diff --git a/BuckarooSdk/Services/EMandate/EMandateRequestObject.cs b/BuckarooSdk/Services/EMandate/EMandateRequestObject.cs
index ef14653..34e1ba4 100644
--- a/BuckarooSdk/Services/EMandate/EMandateRequestObject.cs
+++ b/BuckarooSdk/Services/EMandate/EMandateRequestObject.cs
@@ -1,86 +1,78 @@
-using BuckarooSdk.Transaction;
-using BuckarooSdk.Data;
+using BuckarooSdk.Data;
namespace BuckarooSdk.Services.EMandate
{
- public class EMandateRequestObject
- {
- ///
- /// The configured transaction
- ///
- private ConfiguredTransaction ConfiguredTransaction { get; }
- private ConfiguredDataRequest ConfiguredDataRequest { get; }
+ public class EMandateRequestObject
+ {
+ private ConfiguredDataRequest ConfiguredDataRequest { get; }
- internal EMandateRequestObject(ConfiguredTransaction configuredTransaction)
- {
- this.ConfiguredTransaction = configuredTransaction;
- }
+ internal EMandateRequestObject()
+ {
+ }
- internal EMandateRequestObject(ConfiguredDataRequest configuredDataRequest)
- {
- this.ConfiguredDataRequest = configuredDataRequest;
- }
+ internal EMandateRequestObject(ConfiguredDataRequest configuredDataRequest)
+ {
+ this.ConfiguredDataRequest = configuredDataRequest;
+ }
- ///
- /// The CreateMandate function creates a configured datarequest with an EMandateCreateMandateRequest request,
- /// that is ready to be executed.
- ///
- /// A EMandateCreateMandateRequest
- ///
- public ConfiguredServiceDataRequest CreateMandate(EMandateCreateMandateRequest request)
- {
- var parameters = ServiceHelper.CreateServiceParameters(request);
- var configuredServiceDataReqeust = new ConfiguredServiceDataRequest(this.ConfiguredDataRequest.BaseDataRequest);
- configuredServiceDataReqeust.BaseData.AddService("emandate", parameters, "CreateMandate");
+ ///
+ /// The CreateMandate function creates a configured datarequest with an EMandateCreateMandateRequest request,
+ /// that is ready to be executed.
+ ///
+ /// A EMandateCreateMandateRequest
+ ///
+ public ConfiguredServiceDataRequest CreateMandate(EMandateCreateMandateRequest request)
+ {
+ var parameters = ServiceHelper.CreateServiceParameters(request);
+ var configuredServiceDataReqeust = new ConfiguredServiceDataRequest(this.ConfiguredDataRequest.BaseDataRequest);
+ configuredServiceDataReqeust.BaseData.AddService("emandate", parameters, "CreateMandate");
- return configuredServiceDataReqeust;
- }
+ return configuredServiceDataReqeust;
+ }
- ///
- /// The GetIssuerList function creates a configured datarequest with an EMandateGetIssuerListRequest request,
- /// that is ready to be executed.
- ///
- /// A EMandateGetIssuerListRequest
- ///
- public ConfiguredServiceDataRequest GetIssuerList(EMandateGetIssuerListRequest request)
- {
- var parameters = ServiceHelper.CreateServiceParameters(request);
- var configuredServiceDataReqeust = new ConfiguredServiceDataRequest(this.ConfiguredDataRequest.BaseDataRequest);
- configuredServiceDataReqeust.BaseData.AddService("emandate", parameters, "GetIssuerList");
+ ///
+ /// The GetIssuerList function creates a configured datarequest with an EMandateGetIssuerListRequest request,
+ /// that is ready to be executed.
+ ///
+ /// A EMandateGetIssuerListRequest
+ ///
+ public ConfiguredServiceDataRequest GetIssuerList(EMandateGetIssuerListRequest request)
+ {
+ var parameters = ServiceHelper.CreateServiceParameters(request);
+ var configuredServiceDataReqeust = new ConfiguredServiceDataRequest(this.ConfiguredDataRequest.BaseDataRequest);
+ configuredServiceDataReqeust.BaseData.AddService("emandate", parameters, "GetIssuerList");
- return configuredServiceDataReqeust;
- }
+ return configuredServiceDataReqeust;
+ }
- ///
- /// The GetStatus function creates a configured datarequest with an EMandateGetStatusRequest request,
- /// that is ready to be executed.
- ///
- /// A EMandateGetStatusRequest
- ///
- public ConfiguredServiceDataRequest GetStatus(EMandateGetStatusRequest request)
- {
- var parameters = ServiceHelper.CreateServiceParameters(request);
- var configuredServiceDataReqeust = new ConfiguredServiceDataRequest(this.ConfiguredDataRequest.BaseDataRequest);
- configuredServiceDataReqeust.BaseData.AddService("emandate", parameters, "GetStatus");
+ ///
+ /// The GetStatus function creates a configured datarequest with an EMandateGetStatusRequest request,
+ /// that is ready to be executed.
+ ///
+ /// A EMandateGetStatusRequest
+ ///
+ public ConfiguredServiceDataRequest GetStatus(EMandateGetStatusRequest request)
+ {
+ var parameters = ServiceHelper.CreateServiceParameters(request);
+ var configuredServiceDataReqeust = new ConfiguredServiceDataRequest(this.ConfiguredDataRequest.BaseDataRequest);
+ configuredServiceDataReqeust.BaseData.AddService("emandate", parameters, "GetStatus");
- return configuredServiceDataReqeust;
- }
+ return configuredServiceDataReqeust;
+ }
- ///
- /// The ModifyMandate function creates a configured datarequest with an EMandateModifyMandateRequest request,
- /// that is ready to be executed.
- ///
- /// A EMandateModifyMandateRequest
- ///
- public ConfiguredServiceDataRequest ModifyMandate(EMandateModifyMandateRequest request)
- {
- var parameters = ServiceHelper.CreateServiceParameters(request);
- var configuredServiceDataReqeust = new ConfiguredServiceDataRequest(this.ConfiguredDataRequest.BaseDataRequest);
- configuredServiceDataReqeust.BaseData.AddService("emandate", parameters, "ModifyMandate");
+ ///
+ /// The ModifyMandate function creates a configured datarequest with an EMandateModifyMandateRequest request,
+ /// that is ready to be executed.
+ ///
+ /// A EMandateModifyMandateRequest
+ ///
+ public ConfiguredServiceDataRequest ModifyMandate(EMandateModifyMandateRequest request)
+ {
+ var parameters = ServiceHelper.CreateServiceParameters(request);
+ var configuredServiceDataReqeust = new ConfiguredServiceDataRequest(this.ConfiguredDataRequest.BaseDataRequest);
+ configuredServiceDataReqeust.BaseData.AddService("emandate", parameters, "ModifyMandate");
- return configuredServiceDataReqeust;
- }
-
-
- }
+ return configuredServiceDataReqeust;
+ }
+ }
}
diff --git a/BuckarooSdk/Services/EPS/EPSRequestObject.cs b/BuckarooSdk/Services/EPS/EPSRequestObject.cs
index 91719fd..e83f511 100644
--- a/BuckarooSdk/Services/EPS/EPSRequestObject.cs
+++ b/BuckarooSdk/Services/EPS/EPSRequestObject.cs
@@ -1,69 +1,62 @@
-using BuckarooSdk.Transaction;
-using BuckarooSdk.Data;
+using BuckarooSdk.Transaction;
namespace BuckarooSdk.Services.EPS
{
- public class EPSRequestObject
- {
- ///
- /// The configured transaction
- ///
- private ConfiguredTransaction ConfiguredTransaction { get; }
- private ConfiguredDataRequest ConfiguredDataRequest { get; }
-
- internal EPSRequestObject(ConfiguredTransaction configuredTransaction)
- {
- this.ConfiguredTransaction = configuredTransaction;
- }
-
- internal EPSRequestObject(ConfiguredDataRequest configuredDataRequest)
- {
- this.ConfiguredDataRequest = configuredDataRequest;
- }
-
- ///
- /// The Pay function creates a configured transaction with an EPSPayRequest request,
- /// that is ready to be executed.
- ///
- /// A EPSPayRequest
- ///
- public ConfiguredServiceTransaction Pay(EPSPayRequest request)
- {
- var parameters = ServiceHelper.CreateServiceParameters(request);
- var configuredServiceTransaction = new ConfiguredServiceTransaction(this.ConfiguredTransaction.BaseTransaction);
- configuredServiceTransaction.BaseTransaction.AddService("eps", parameters, "Pay");
-
- return configuredServiceTransaction;
- }
-
- ///
- /// The Refund function creates a configured transaction with an EPSRefundRequest request,
- /// that is ready to be executed.
- ///
- /// A EPSRefundRequest
- ///
- public ConfiguredServiceTransaction Refund(EPSRefundRequest request)
- {
- var parameters = ServiceHelper.CreateServiceParameters(request);
- var configuredServiceTransaction = new ConfiguredServiceTransaction(this.ConfiguredTransaction.BaseTransaction);
- configuredServiceTransaction.BaseTransaction.AddService("eps", parameters, "Refund");
-
- return configuredServiceTransaction;
- }
-
- ///
- /// The PayRemainder function creates a configured transaction with an EPSPayRemainderRequest request,
- /// that is ready to be executed.
- ///
- /// A EPSPayRemainderRequest
- ///
- public ConfiguredServiceTransaction PayRemainder(EPSPayRemainderRequest request)
- {
- var parameters = ServiceHelper.CreateServiceParameters(request);
- var configuredServiceTransaction = new ConfiguredServiceTransaction(this.ConfiguredTransaction.BaseTransaction);
- configuredServiceTransaction.BaseTransaction.AddService("eps", parameters, "PayRemainder");
-
- return configuredServiceTransaction;
- }
- }
+ public class EPSRequestObject
+ {
+ ///
+ /// The configured transaction
+ ///
+ private ConfiguredTransaction ConfiguredTransaction { get; }
+
+ internal EPSRequestObject(ConfiguredTransaction configuredTransaction)
+ {
+ this.ConfiguredTransaction = configuredTransaction;
+ }
+
+ ///
+ /// The Pay function creates a configured transaction with an EPSPayRequest request,
+ /// that is ready to be executed.
+ ///
+ /// A EPSPayRequest
+ ///
+ public ConfiguredServiceTransaction Pay(EPSPayRequest request)
+ {
+ var parameters = ServiceHelper.CreateServiceParameters(request);
+ var configuredServiceTransaction = new ConfiguredServiceTransaction(this.ConfiguredTransaction.BaseTransaction);
+ configuredServiceTransaction.BaseTransaction.AddService("eps", parameters, "Pay");
+
+ return configuredServiceTransaction;
+ }
+
+ ///
+ /// The Refund function creates a configured transaction with an EPSRefundRequest request,
+ /// that is ready to be executed.
+ ///
+ /// A EPSRefundRequest
+ ///
+ public ConfiguredServiceTransaction Refund(EPSRefundRequest request)
+ {
+ var parameters = ServiceHelper.CreateServiceParameters(request);
+ var configuredServiceTransaction = new ConfiguredServiceTransaction(this.ConfiguredTransaction.BaseTransaction);
+ configuredServiceTransaction.BaseTransaction.AddService("eps", parameters, "Refund");
+
+ return configuredServiceTransaction;
+ }
+
+ ///
+ /// The PayRemainder function creates a configured transaction with an EPSPayRemainderRequest request,
+ /// that is ready to be executed.
+ ///
+ /// A EPSPayRemainderRequest
+ ///
+ public ConfiguredServiceTransaction PayRemainder(EPSPayRemainderRequest request)
+ {
+ var parameters = ServiceHelper.CreateServiceParameters(request);
+ var configuredServiceTransaction = new ConfiguredServiceTransaction(this.ConfiguredTransaction.BaseTransaction);
+ configuredServiceTransaction.BaseTransaction.AddService("eps", parameters, "PayRemainder");
+
+ return configuredServiceTransaction;
+ }
+ }
}
diff --git a/BuckarooSdk/Services/Ideal/Constants/Issuers.cs b/BuckarooSdk/Services/Ideal/Constants/Issuers.cs
index ba61f22..21ae28f 100644
--- a/BuckarooSdk/Services/Ideal/Constants/Issuers.cs
+++ b/BuckarooSdk/Services/Ideal/Constants/Issuers.cs
@@ -9,38 +9,47 @@ public static class Issuers
/// ABN AMRO bank
///
public const string AbnAmro = "ABNANL2A";
+
///
/// ASN bank
///
public const string AsnBank = "ASNBNL21";
+
///
/// ING bank
///
public const string IngBank = "INGBNL2A";
+
///
/// Knab bank
///
public const string Knab = "KNABNL2H";
+
///
/// Rabobank
///
public const string RaboBank = "RABONL2U";
+
///
/// Regiobank
///
public const string RegioBank = "RBRBNL21";
+
///
/// SNS bank
///
public const string SnsBank = "SNSBNL2A";
+
///
/// Triodos bank
///
public const string TriodosBank = "TRIONL2U";
+
///
/// Van Lanschot bank
///
public const string VanLanschot = "FVLBNL22";
+
///
/// Bunq bank
///
diff --git a/BuckarooSdk/Services/Ideal/Constants/OutputParameters.cs b/BuckarooSdk/Services/Ideal/Constants/OutputParameters.cs
index 594fd25..91ad04c 100644
--- a/BuckarooSdk/Services/Ideal/Constants/OutputParameters.cs
+++ b/BuckarooSdk/Services/Ideal/Constants/OutputParameters.cs
@@ -1,10 +1,30 @@
namespace BuckarooSdk.Services.Ideal.Constants
{
+ ///
+ /// iDEAL output parameters.
+ ///
public enum OutputParameters
{
+ ///
+ /// The bank identifier (bic code) of the bank of the consumer. Please note: This field is optional. In some countries,
+ /// banks are not allowed to provide this information to third parties.
+ ///
ConsumerBic,
+
+ ///
+ /// The beneficiary of the bank account from which the payment was made.
+ ///
ConsumerName,
+
+ ///
+ /// The name of the issuer (bank) of the consumer.
+ ///
ConsumerIssuer,
+
+ ///
+ /// The international bank account number (iban code) of the bank of the consumer. Please note: This field is optional.
+ /// In some countries, banks are not allowed to provide this information to third parties.
+ ///
ConsumerIban,
}
}
diff --git a/BuckarooSdk/Services/Ideal/DataRequest/IdealDataRequest.cs b/BuckarooSdk/Services/Ideal/DataRequest/IdealDataRequest.cs
index ca3d844..72dd3a7 100644
--- a/BuckarooSdk/Services/Ideal/DataRequest/IdealDataRequest.cs
+++ b/BuckarooSdk/Services/Ideal/DataRequest/IdealDataRequest.cs
@@ -1,15 +1,12 @@
-using BuckarooSdk.Data;
-
-namespace BuckarooSdk.Services.Ideal.DataRequest
+namespace BuckarooSdk.Services.Ideal.DataRequest
{
- public class IdealDataRequest
- {
- private ConfiguredDataRequest ConfiguredDataRequest { get; set; }
-
- internal IdealDataRequest(ConfiguredDataRequest configuredDateRequest)
- {
- this.ConfiguredDataRequest = configuredDateRequest;
- }
-
- }
+ ///
+ /// iDEAL data request.
+ ///
+ public class IdealDataRequest
+ {
+ internal IdealDataRequest()
+ {
+ }
+ }
}
diff --git a/BuckarooSdk/Services/Ideal/Push/IdealPayPush.cs b/BuckarooSdk/Services/Ideal/Push/IdealPayPush.cs
index 3c50097..4cd84a8 100644
--- a/BuckarooSdk/Services/Ideal/Push/IdealPayPush.cs
+++ b/BuckarooSdk/Services/Ideal/Push/IdealPayPush.cs
@@ -2,43 +2,45 @@
namespace BuckarooSdk.Services.Ideal.Push
{
- ///
- ///
- ///
- public class IdealPayPush : ActionPush
- {
- public override ServiceNames ServiceNames => ServiceNames.Ideal;
+ ///
+ /// iDEAL push action.
+ ///
+ public class IdealPayPush : ActionPush
+ {
+ ///
+ public override ServiceNames ServiceNames => ServiceNames.Ideal;
- ///
- /// This is the iDEAL transaction ID.
- ///
- public string Transactionid { get; set; }
+ ///
+ /// This is the iDEAL transaction ID.
+ ///
+ public string Transactionid { get; set; }
- ///
- /// The international bank account number (iban code) of the bank of the consumer. Please note: This field is optional.
- /// In some countries, banks are not allowed to provide this information to third parties.
- ///
- public string ConsumerIban { get; set; }
+ ///
+ /// The international bank account number (iban code) of the bank of the consumer. Please note: This field is optional.
+ /// In some countries, banks are not allowed to provide this information to third parties.
+ ///
+ public string ConsumerIban { get; set; }
- ///
- /// The bank identifier (bic code) of the bank of the consumer. Please note: This field is optional. In some countries,
- /// banks are not allowed to provide this information to third parties.
- ///
- public string ConsumerBic { get; set; }
+ ///
+ /// The bank identifier (bic code) of the bank of the consumer. Please note: This field is optional. In some countries,
+ /// banks are not allowed to provide this information to third parties.
+ ///
+ public string ConsumerBic { get; set; }
- ///
- /// The beneficiary of the bank account from which the payment was made.
- ///
- public string ConsumerName { get; set; }
+ ///
+ /// The beneficiary of the bank account from which the payment was made.
+ ///
+ public string ConsumerName { get; set; }
- ///
- /// The name of the issuer (bank) of the consumer.
- ///
- public string ConsumerIssuer { get; set; }
-
- internal override void FillFromPush(DataTypes.Response.Service serviceResponse)
- {
- base.FillFromPush(serviceResponse);
- }
- }
+ ///
+ /// The name of the issuer (bank) of the consumer.
+ ///
+ public string ConsumerIssuer { get; set; }
+
+ ///
+ internal override void FillFromPush(DataTypes.Response.Service serviceResponse)
+ {
+ base.FillFromPush(serviceResponse);
+ }
+ }
}
diff --git a/BuckarooSdk/Services/Ideal/Push/IdealPayRemainderPush.cs b/BuckarooSdk/Services/Ideal/Push/IdealPayRemainderPush.cs
index be165b8..b77cd19 100644
--- a/BuckarooSdk/Services/Ideal/Push/IdealPayRemainderPush.cs
+++ b/BuckarooSdk/Services/Ideal/Push/IdealPayRemainderPush.cs
@@ -2,20 +2,34 @@
namespace BuckarooSdk.Services.Ideal.Push
{
- ///
- ///
- ///
- public class IdealPayRemainderPush : ActionPush
- {
+ ///
+ /// iDEAL Pay remainder push action.
+ ///
+ public class IdealPayRemainderPush : ActionPush
+ {
+ ///
+ public override ServiceNames ServiceNames => ServiceNames.Ideal;
- public override ServiceNames ServiceNames => ServiceNames.Ideal;
+ ///
+ /// The international bank account number (iban code) of the bank of the consumer. Please note: This field is optional.
+ /// In some countries, banks are not allowed to provide this information to third parties.
+ ///
+ public string ConsumerIban { get; set; }
- ///
- ///
- ///
- public string ConsumerIban { get; set; }
- public string ConsumerBic { get; set; }
- public string ConsumerName { get; set; }
- public string ConsumerIssuer { get; set; }
- }
+ ///
+ /// The bank identifier (bic code) of the bank of the consumer. Please note: This field is optional. In some countries,
+ /// banks are not allowed to provide this information to third parties.
+ ///
+ public string ConsumerBic { get; set; }
+
+ ///
+ /// The beneficiary of the bank account from which the payment was made.
+ ///
+ public string ConsumerName { get; set; }
+
+ ///
+ /// The name of the issuer (bank) of the consumer.
+ ///
+ public string ConsumerIssuer { get; set; }
+ }
}
diff --git a/BuckarooSdk/Services/Ideal/Push/IdealRefundPush.cs b/BuckarooSdk/Services/Ideal/Push/IdealRefundPush.cs
index 2463d5a..e941058 100644
--- a/BuckarooSdk/Services/Ideal/Push/IdealRefundPush.cs
+++ b/BuckarooSdk/Services/Ideal/Push/IdealRefundPush.cs
@@ -2,8 +2,12 @@
namespace BuckarooSdk.Services.Ideal.Push
{
- public class IdealRefundPush : ActionPush
- {
- public override ServiceNames ServiceNames => ServiceNames.Ideal;
- }
-}
\ No newline at end of file
+ ///
+ /// iDEAL refund push action.
+ ///
+ public class IdealRefundPush : ActionPush
+ {
+ ///
+ public override ServiceNames ServiceNames => ServiceNames.Ideal;
+ }
+}
diff --git a/BuckarooSdk/Services/Ideal/TransactionRequest/IdealPayRemainderRequest.cs b/BuckarooSdk/Services/Ideal/TransactionRequest/IdealPayRemainderRequest.cs
index 727c3f8..1659fd4 100644
--- a/BuckarooSdk/Services/Ideal/TransactionRequest/IdealPayRemainderRequest.cs
+++ b/BuckarooSdk/Services/Ideal/TransactionRequest/IdealPayRemainderRequest.cs
@@ -5,15 +5,15 @@
///
public class IdealPayRemainderRequest
{
- ///
- /// Required
- ///
- /// BIC code of the issuing bank of the consumer. Please refer to the list of banks in the general section for the list of BIC codes.
- /// This information is required, but it is possible to let the customer fill it in on the Buckaroo checkout page. In that case, leave
- /// the Issuer parameter out and add the basic parameter "ContinueOnIncomplete" with a value of 1.
- ///
- /// Use constants in BuckarooSdk.Services.Ideal.IdealIssuer
- ///
- public string Issuer { get; set; }
- }
+ ///
+ /// Required
+ ///
+ /// BIC code of the issuing bank of the consumer. Please refer to the list of banks in the general section for the list of BIC codes.
+ /// This information is required, but it is possible to let the customer fill it in on the Buckaroo checkout page. In that case, leave
+ /// the Issuer parameter out and add the basic parameter "ContinueOnIncomplete" with a value of 1.
+ ///
+ /// Use constants in BuckarooSdk.Services.Ideal.IdealIssuer
+ ///
+ public string Issuer { get; set; }
+ }
}
diff --git a/BuckarooSdk/Services/Ideal/TransactionRequest/IdealPayRemainderResponse.cs b/BuckarooSdk/Services/Ideal/TransactionRequest/IdealPayRemainderResponse.cs
index cb055a8..fcc2fa0 100644
--- a/BuckarooSdk/Services/Ideal/TransactionRequest/IdealPayRemainderResponse.cs
+++ b/BuckarooSdk/Services/Ideal/TransactionRequest/IdealPayRemainderResponse.cs
@@ -2,19 +2,23 @@
namespace BuckarooSdk.Services.Ideal.TransactionRequest
{
+ ///
+ /// iDEAL Pay remainder response.
+ ///
public class IdealPayRemainderResponse : ActionResponse
- {
- public override ServiceNames ServiceNames => ServiceNames.Ideal;
+ {
+ ///
+ public override ServiceNames ServiceNames => ServiceNames.Ideal;
- ///
- /// This is the iDEAL transaction ID.
- ///
- public string TransactionId { get; set; }
+ ///
+ /// This is the iDEAL transaction ID.
+ ///
+ public string TransactionId { get; set; }
- ///
- /// The name of the issuer (bank) of the consumer.
- ///
- public string ConsumerIssuer { get; set; }
- }
+ ///
+ /// The name of the issuer (bank) of the consumer.
+ ///
+ public string ConsumerIssuer { get; set; }
+ }
}
diff --git a/BuckarooSdk/Services/Ideal/TransactionRequest/IdealPayRequest.cs b/BuckarooSdk/Services/Ideal/TransactionRequest/IdealPayRequest.cs
index 9d2d87e..4b2a266 100644
--- a/BuckarooSdk/Services/Ideal/TransactionRequest/IdealPayRequest.cs
+++ b/BuckarooSdk/Services/Ideal/TransactionRequest/IdealPayRequest.cs
@@ -1,26 +1,26 @@
namespace BuckarooSdk.Services.Ideal.TransactionRequest
{
- ///
- /// The default action for iDEAL is Pay. This action requires as input the issuing bank of the consumer.
- /// Upon receiving this input, the consumer will be redirected to the issuing bank for verification and confirmation of the payment.
- /// An iDEAL payment has a lifetime of 15 minutes; this means that as soon as the consumer is redirected to the issuer, the payment
- /// must be completed within 15 minutes or it will expire. In the event that the consumer irregularly ends the payment process (for example
- /// by closing the browser window before returning to the webshop), the payment status will be retrieved from the acquirer as soon as
- /// the 15 minute lifespan is expired and the merchant webshop is updated via a push response. It is therefore recommended to enable the
- /// push response in the Payment Plaza when implementing iDEAL. A successful payment will include the BIC, the IBAN, the beneficiary of
- /// the bank account from which the payment was made and the name of the selected issuer.
- ///
- public class IdealPayRequest
+ ///
+ /// The default action for iDEAL is Pay. This action requires as input the issuing bank of the consumer.
+ /// Upon receiving this input, the consumer will be redirected to the issuing bank for verification and confirmation of the payment.
+ /// An iDEAL payment has a lifetime of 15 minutes; this means that as soon as the consumer is redirected to the issuer, the payment
+ /// must be completed within 15 minutes or it will expire. In the event that the consumer irregularly ends the payment process (for example
+ /// by closing the browser window before returning to the webshop), the payment status will be retrieved from the acquirer as soon as
+ /// the 15 minute lifespan is expired and the merchant webshop is updated via a push response. It is therefore recommended to enable the
+ /// push response in the Payment Plaza when implementing iDEAL. A successful payment will include the BIC, the IBAN, the beneficiary of
+ /// the bank account from which the payment was made and the name of the selected issuer.
+ ///
+ public class IdealPayRequest
{
- ///
- /// Required
- ///
- /// BIC code of the issuing bank of the consumer. Please refer to the list of banks in the general section for the list of BIC codes.
- /// This information is required, but it is possible to let the customer fill it in on the Buckaroo checkout page. In that case, leave
- /// the Issuer parameter out and add the basic parameter "ContinueOnIncomplete" with a value of 1.
- ///
- /// Use constants in BuckarooSdk.Services.Ideal.IdealIssuer
- ///
- public string Issuer { get; set; }
- }
+ ///
+ /// Required
+ ///
+ /// BIC code of the issuing bank of the consumer. Please refer to the list of banks in the general section for the list of BIC codes.
+ /// This information is required, but it is possible to let the customer fill it in on the Buckaroo checkout page. In that case, leave
+ /// the Issuer parameter out and add the basic parameter "ContinueOnIncomplete" with a value of 1.
+ ///
+ /// Use constants in BuckarooSdk.Services.Ideal.IdealIssuer
+ ///
+ public string Issuer { get; set; }
+ }
}
diff --git a/BuckarooSdk/Services/Ideal/TransactionRequest/IdealPayResponse.cs b/BuckarooSdk/Services/Ideal/TransactionRequest/IdealPayResponse.cs
index 825926e..b95361b 100644
--- a/BuckarooSdk/Services/Ideal/TransactionRequest/IdealPayResponse.cs
+++ b/BuckarooSdk/Services/Ideal/TransactionRequest/IdealPayResponse.cs
@@ -2,23 +2,24 @@
namespace BuckarooSdk.Services.Ideal.TransactionRequest
{
- ///
- /// If the request has a valid structure and a valid signature, a transaction will be created in the Payment Engine and a response
- /// will be returned. In this case, an additional action is required before the transaction can be completed. The customer needs to
- /// be redirected to the payment environment through the returned redirectURL.
- ///
- public class IdealPayResponse : ActionResponse
- {
- public override ServiceNames ServiceNames => ServiceNames.Ideal;
+ ///
+ /// If the request has a valid structure and a valid signature, a transaction will be created in the Payment Engine and a response
+ /// will be returned. In this case, an additional action is required before the transaction can be completed. The customer needs to
+ /// be redirected to the payment environment through the returned redirectURL.
+ ///
+ public class IdealPayResponse : ActionResponse
+ {
+ ///
+ public override ServiceNames ServiceNames => ServiceNames.Ideal;
- ///
- /// This is the iDEAL transaction ID.
- ///
- public string TransactionId { get; set; }
+ ///
+ /// This is the iDEAL transaction ID.
+ ///
+ public string TransactionId { get; set; }
- ///
- /// The name of the issuer (bank) of the consumer.
- ///
- public string ConsumerIssuer { get; set; }
- }
+ ///
+ /// The name of the issuer (bank) of the consumer.
+ ///
+ public string ConsumerIssuer { get; set; }
+ }
}
diff --git a/BuckarooSdk/Services/Ideal/TransactionRequest/IdealRefundRequest.cs b/BuckarooSdk/Services/Ideal/TransactionRequest/IdealRefundRequest.cs
index 83969c5..b90d5e9 100644
--- a/BuckarooSdk/Services/Ideal/TransactionRequest/IdealRefundRequest.cs
+++ b/BuckarooSdk/Services/Ideal/TransactionRequest/IdealRefundRequest.cs
@@ -1,11 +1,11 @@
namespace BuckarooSdk.Services.Ideal.TransactionRequest
{
- ///
- /// To refund a successfully performed iDEAL transaction, use the action Refund. This is only available for ideal collecting.
- /// A bank transfer is then initiated which transfers the amount of the original transaction to the consumer.
- ///
- public class IdealRefundRequest
+ ///
+ /// To refund a successfully performed iDEAL transaction, use the action Refund. This is only available for ideal collecting.
+ /// A bank transfer is then initiated which transfers the amount of the original transaction to the consumer.
+ ///
+ public class IdealRefundRequest
{
}
diff --git a/BuckarooSdk/Services/Ideal/TransactionRequest/IdealRefundResponse.cs b/BuckarooSdk/Services/Ideal/TransactionRequest/IdealRefundResponse.cs
index a9bb59e..26f4697 100644
--- a/BuckarooSdk/Services/Ideal/TransactionRequest/IdealRefundResponse.cs
+++ b/BuckarooSdk/Services/Ideal/TransactionRequest/IdealRefundResponse.cs
@@ -2,26 +2,29 @@
namespace BuckarooSdk.Services.Ideal.TransactionRequest
{
+ ///
+ /// iDEAL Refund response action.
+ ///
+ public class IdealRefundResponse : ActionResponse
+ {
+ ///
+ public override ServiceNames ServiceNames => ServiceNames.Ideal;
- public class IdealRefundResponse : ActionResponse
- {
- public override ServiceNames ServiceNames => ServiceNames.Ideal;
+ ///
+ /// The international bank account number (iban code) of the bank of the consumer. Please note: This field is optional. In some countries,
+ /// banks are not allowed to provide this information to third parties.
+ ///
+ public string CustomerIban { get; set; }
- ///
- /// The international bank account number (iban code) of the bank of the consumer. Please note: This field is optional. In some countries,
- /// banks are not allowed to provide this information to third parties.
- ///
- public string CustomerIban { get; set; }
+ ///
+ /// The bank identifier (bic code) of the bank of the consumer. Please note: This field is optional. In some countries, banks are not
+ /// allowed to provide this information to third parties.
+ ///
+ public string CustomerBic { get; set; }
- ///
- /// The bank identifier (bic code) of the bank of the consumer. Please note: This field is optional. In some countries, banks are not
- /// allowed to provide this information to third parties.
- ///
- public string CustomerBic { get; set; }
-
- ///
- /// The beneficiary of the bank account from which the payment was made.
- ///
- public string CustomerAccountName { get; set; }
- }
+ ///
+ /// The beneficiary of the bank account from which the payment was made.
+ ///
+ public string CustomerAccountName { get; set; }
+ }
}
diff --git a/BuckarooSdk/Services/Ideal/TransactionRequest/IdealTransaction.cs b/BuckarooSdk/Services/Ideal/TransactionRequest/IdealTransaction.cs
index 384b23f..c02162f 100644
--- a/BuckarooSdk/Services/Ideal/TransactionRequest/IdealTransaction.cs
+++ b/BuckarooSdk/Services/Ideal/TransactionRequest/IdealTransaction.cs
@@ -2,21 +2,21 @@
namespace BuckarooSdk.Services.Ideal.TransactionRequest
{
- ///
- /// The Transaction class of payment method type: iDEAL.
- ///
+ ///
+ /// The Transaction class of payment method type: iDEAL.
+ ///
public class IdealTransaction
{
- ///
- /// The configured transaction
- ///
+ ///
+ /// The configured transaction
+ ///
private ConfiguredTransaction ConfiguredTransaction { get;}
+
internal IdealTransaction(ConfiguredTransaction configuredTransaction)
{
- this.ConfiguredTransaction = configuredTransaction;
+ ConfiguredTransaction = configuredTransaction;
}
-
///
/// The pay function creates a configured transaction with an IdealPayRequest,
/// that is ready to be executed.
@@ -31,12 +31,13 @@ public ConfiguredServiceTransaction Pay(IdealPayRequest request)
return configuredServiceTransaction;
}
+
///
- /// The refund function creates a configured transaction with an IdealRefundRequest,
+ /// The refund function creates a configured transaction with an IdealRefundRequest,
/// that is ready to be executed.
- ///
- /// An IdealRefundRequest
- ///
+ ///
+ /// An IdealRefundRequest
+ ///
public ConfiguredServiceTransaction Refund(IdealRefundRequest request)
{
var parameters = ServiceHelper.CreateServiceParameters(request);
@@ -45,12 +46,13 @@ public ConfiguredServiceTransaction Refund(IdealRefundRequest request)
return configuredServiceTransaction;
}
+
///
- /// The pay remainder function creates a configured transaction with an IdealPayRemainderRequest,
+ /// The pay remainder function creates a configured transaction with an IdealPayRemainderRequest,
/// that is ready to be executed.
- ///
- /// An IdealPayRemainderRequest
- ///
+ ///
+ /// An IdealPayRemainderRequest
+ ///
public ConfiguredServiceTransaction PayRemainder(IdealPayRemainderRequest request)
{
var parameters = ServiceHelper.CreateServiceParameters(request);
diff --git a/BuckarooSdk/Services/IdealProcessing/Constants/Issuers.cs b/BuckarooSdk/Services/IdealProcessing/Constants/Issuers.cs
index 7b8da9c..0f038ad 100644
--- a/BuckarooSdk/Services/IdealProcessing/Constants/Issuers.cs
+++ b/BuckarooSdk/Services/IdealProcessing/Constants/Issuers.cs
@@ -9,38 +9,47 @@ public static class Issuers
/// ABN AMRO bank
///
public const string AbnAmro = "ABNANL2A";
+
///
/// ASN bank
///
public const string AsnBank = "ASNBNL21";
+
///
/// ING bank
///
public const string IngBank = "INGBNL2A";
+
///
/// Knab bank
///
public const string Knab = "KNABNL2H";
+
///
/// Rabobank
///
public const string RaboBank = "RABONL2U";
+
///
/// Regiobank
///
public const string RegioBank = "RBRBNL21";
+
///
/// SNS bank
///
public const string SnsBank = "SNSBNL2A";
+
///
/// Triodos bank
///
public const string TriodosBank = "TRIONL2U";
+
///
/// Van Lanschot bank
///
public const string VanLanschot = "FVLBNL22";
+
///
/// Bunq bank
///
diff --git a/BuckarooSdk/Services/KbcPaymentButton/KbcPaymentButtonRequestObject.cs b/BuckarooSdk/Services/KbcPaymentButton/KbcPaymentButtonRequestObject.cs
index 34e687b..2f85fa1 100644
--- a/BuckarooSdk/Services/KbcPaymentButton/KbcPaymentButtonRequestObject.cs
+++ b/BuckarooSdk/Services/KbcPaymentButton/KbcPaymentButtonRequestObject.cs
@@ -1,72 +1,65 @@
-using BuckarooSdk.Data;
-using BuckarooSdk.Transaction;
+using BuckarooSdk.Transaction;
namespace BuckarooSdk.Services.KbcPaymentButton
{
- public class KbcPaymentButtonRequestObject
- {
- ///
- /// The configured transaction
- ///
- private ConfiguredTransaction ConfiguredTransaction { get; }
- private ConfiguredDataRequest ConfiguredDataRequest { get; }
+ public class KbcPaymentButtonRequestObject
+ {
+ ///
+ /// The configured transaction
+ ///
+ private ConfiguredTransaction ConfiguredTransaction { get; }
- internal KbcPaymentButtonRequestObject(ConfiguredTransaction configuredTransaction)
- {
- this.ConfiguredTransaction = configuredTransaction;
- }
+ internal KbcPaymentButtonRequestObject(ConfiguredTransaction configuredTransaction)
+ {
+ this.ConfiguredTransaction = configuredTransaction;
+ }
- internal KbcPaymentButtonRequestObject(ConfiguredDataRequest configuredDataRequest)
- {
- this.ConfiguredDataRequest = configuredDataRequest;
- }
+ ///
+ /// The Pay function creates a configured transaction with an KbcPaymentButtonPayRequest request,
+ /// that is ready to be executed.
+ ///
+ /// A KbcPaymentButtonPayRequest
+ ///
+ public ConfiguredServiceTransaction Pay(KbcPaymentButtonPayRequest request)
+ {
+ var parameters = ServiceHelper.CreateServiceParameters(request);
+ var configuredServiceTransaction =
+ new ConfiguredServiceTransaction(this.ConfiguredTransaction.BaseTransaction);
+ configuredServiceTransaction.BaseTransaction.AddService("kbcpaymentbutton", parameters, "Pay");
- ///
- /// The Pay function creates a configured transaction with an KbcPaymentButtonPayRequest request,
- /// that is ready to be executed.
- ///
- /// A KbcPaymentButtonPayRequest
- ///
- public ConfiguredServiceTransaction Pay(KbcPaymentButtonPayRequest request)
- {
- var parameters = ServiceHelper.CreateServiceParameters(request);
- var configuredServiceTransaction =
- new ConfiguredServiceTransaction(this.ConfiguredTransaction.BaseTransaction);
- configuredServiceTransaction.BaseTransaction.AddService("kbcpaymentbutton", parameters, "Pay");
+ return configuredServiceTransaction;
+ }
- return configuredServiceTransaction;
- }
+ ///
+ /// The Refund function creates a configured transaction with an KbcPaymentButtonRefundRequest request,
+ /// that is ready to be executed.
+ ///
+ /// A KbcPaymentButtonRefundRequest
+ ///
+ public ConfiguredServiceTransaction Refund(KbcPaymentButtonRefundRequest request)
+ {
+ var parameters = ServiceHelper.CreateServiceParameters(request);
+ var configuredServiceTransaction =
+ new ConfiguredServiceTransaction(this.ConfiguredTransaction.BaseTransaction);
+ configuredServiceTransaction.BaseTransaction.AddService("kbcpaymentbutton", parameters, "Refund");
- ///
- /// The Refund function creates a configured transaction with an KbcPaymentButtonRefundRequest request,
- /// that is ready to be executed.
- ///
- /// A KbcPaymentButtonRefundRequest
- ///
- public ConfiguredServiceTransaction Refund(KbcPaymentButtonRefundRequest request)
- {
- var parameters = ServiceHelper.CreateServiceParameters(request);
- var configuredServiceTransaction =
- new ConfiguredServiceTransaction(this.ConfiguredTransaction.BaseTransaction);
- configuredServiceTransaction.BaseTransaction.AddService("kbcpaymentbutton", parameters, "Refund");
+ return configuredServiceTransaction;
+ }
- return configuredServiceTransaction;
- }
+ ///
+ /// The PayRemainder function creates a configured transaction with an KbcPaymentButtonPayRemainderRequest request,
+ /// that is ready to be executed.
+ ///
+ /// A KbcPaymentButtonPayRemainderRequest
+ ///
+ public ConfiguredServiceTransaction PayRemainder(KbcPaymentButtonPayRemainderRequest request)
+ {
+ var parameters = ServiceHelper.CreateServiceParameters(request);
+ var configuredServiceTransaction =
+ new ConfiguredServiceTransaction(this.ConfiguredTransaction.BaseTransaction);
+ configuredServiceTransaction.BaseTransaction.AddService("kbcpaymentbutton", parameters, "PayRemainder");
- ///
- /// The PayRemainder function creates a configured transaction with an KbcPaymentButtonPayRemainderRequest request,
- /// that is ready to be executed.
- ///
- /// A KbcPaymentButtonPayRemainderRequest
- ///
- public ConfiguredServiceTransaction PayRemainder(KbcPaymentButtonPayRemainderRequest request)
- {
- var parameters = ServiceHelper.CreateServiceParameters(request);
- var configuredServiceTransaction =
- new ConfiguredServiceTransaction(this.ConfiguredTransaction.BaseTransaction);
- configuredServiceTransaction.BaseTransaction.AddService("kbcpaymentbutton", parameters, "PayRemainder");
-
- return configuredServiceTransaction;
- }
- }
+ return configuredServiceTransaction;
+ }
+ }
}
diff --git a/BuckarooSdk/Services/OnlineGiro/OnlineGiroRequestObject.cs b/BuckarooSdk/Services/OnlineGiro/OnlineGiroRequestObject.cs
index a9f97f9..729d7f9 100644
--- a/BuckarooSdk/Services/OnlineGiro/OnlineGiroRequestObject.cs
+++ b/BuckarooSdk/Services/OnlineGiro/OnlineGiroRequestObject.cs
@@ -1,12 +1,12 @@
-using BuckarooSdk.Transaction;
+using BuckarooSdk.Transaction;
namespace BuckarooSdk.Services.OnlineGiro
{
public class OnlineGiroRequestObject
{
///
- /// The configured transaction
- ///
+ /// The configured transaction
+ ///
private ConfiguredTransaction ConfiguredTransaction { get; }
internal OnlineGiroRequestObject(ConfiguredTransaction configuredTransaction)
@@ -14,21 +14,21 @@ internal OnlineGiroRequestObject(ConfiguredTransaction configuredTransaction)
this.ConfiguredTransaction = configuredTransaction;
}
- ///
+ ///
/// The PaymentInvitation function creates a configured transaction with an OnlineGiroPaymentInvitationRequest request,
/// that is ready to be executed.
///
/// A OnlineGiroPaymentInvitationRequest
- ///
- public ConfiguredServiceTransaction PaymentInvitation(OnlineGiroPaymentInvitationRequest request)
- {
- var parameters = ServiceHelper.CreateServiceParameters(request);
- var configuredServiceTransaction = new ConfiguredServiceTransaction(this.ConfiguredTransaction.BaseTransaction);
- configuredServiceTransaction.BaseTransaction.AddService("onlinegiro", parameters, "PaymentInvitation");
+ ///
+ public ConfiguredServiceTransaction PaymentInvitation(OnlineGiroPaymentInvitationRequest request)
+ {
+ var parameters = ServiceHelper.CreateServiceParameters(request);
+ var configuredServiceTransaction = new ConfiguredServiceTransaction(this.ConfiguredTransaction.BaseTransaction);
+ configuredServiceTransaction.BaseTransaction.AddService("onlinegiro", parameters, "PaymentInvitation");
- return configuredServiceTransaction;
- }
+ return configuredServiceTransaction;
+ }
- }
+ }
}
diff --git a/BuckarooSdk/Services/PayPal/PayPalExtraInfoResponse.cs b/BuckarooSdk/Services/PayPal/PayPalExtraInfoResponse.cs
index c89e089..1c55802 100644
--- a/BuckarooSdk/Services/PayPal/PayPalExtraInfoResponse.cs
+++ b/BuckarooSdk/Services/PayPal/PayPalExtraInfoResponse.cs
@@ -4,7 +4,7 @@ namespace BuckarooSdk.Services.PayPal
{
public class PayPalExtraInfoResponse : ActionResponse
{
- public override ServiceNames ServiceNames => ServiceNames.PayPal;
+ public override ServiceNames ServiceNames => ServiceNames.PayPal;
public string SelectedName { get; set; }
public string SelectedStreet1 { get; set; }
public string SelectedStreet2 { get; set; }
diff --git a/BuckarooSdk/Services/PayPal/PayPalPayRecurrentResponse.cs b/BuckarooSdk/Services/PayPal/PayPalPayRecurrentResponse.cs
index 0face13..ee1900e 100644
--- a/BuckarooSdk/Services/PayPal/PayPalPayRecurrentResponse.cs
+++ b/BuckarooSdk/Services/PayPal/PayPalPayRecurrentResponse.cs
@@ -4,7 +4,7 @@ namespace BuckarooSdk.Services.PayPal
{
public class PayPalPayRecurrentResponse : ActionResponse
{
- public override ServiceNames ServiceNames => ServiceNames.PayPal;
+ public override ServiceNames ServiceNames => ServiceNames.PayPal;
public string PayerStatus { get; set; }
public string PayerCountry { get; set; }
public string PayerEmail { get; set; }
diff --git a/BuckarooSdk/Services/PayPal/PayPalPayRemainderResponse.cs b/BuckarooSdk/Services/PayPal/PayPalPayRemainderResponse.cs
index 2bd4b42..e691558 100644
--- a/BuckarooSdk/Services/PayPal/PayPalPayRemainderResponse.cs
+++ b/BuckarooSdk/Services/PayPal/PayPalPayRemainderResponse.cs
@@ -4,7 +4,7 @@ namespace BuckarooSdk.Services.PayPal
{
public class PayPalPayRemainderResponse : ActionResponse
{
- public override ServiceNames ServiceNames => ServiceNames.PayPal;
+ public override ServiceNames ServiceNames => ServiceNames.PayPal;
public string NoteText { get; set; }
public string PayerStatus { get; set; }
public string PayerCountry { get; set; }
diff --git a/BuckarooSdk/Services/PayPal/PayPalPayResponse.cs b/BuckarooSdk/Services/PayPal/PayPalPayResponse.cs
index bf92838..c60da43 100644
--- a/BuckarooSdk/Services/PayPal/PayPalPayResponse.cs
+++ b/BuckarooSdk/Services/PayPal/PayPalPayResponse.cs
@@ -4,7 +4,7 @@ namespace BuckarooSdk.Services.PayPal
{
public class PayPalPayResponse : ActionResponse
{
- public override ServiceNames ServiceNames => ServiceNames.PayPal;
+ public override ServiceNames ServiceNames => ServiceNames.PayPal;
public string PayerEmail { get; set;}
public string NoteText { get; set; }
public string PayerStatus { get; set; }
diff --git a/BuckarooSdk/Services/PayPal/PayPalRefundResponse.cs b/BuckarooSdk/Services/PayPal/PayPalRefundResponse.cs
index 0fd4231..9d05395 100644
--- a/BuckarooSdk/Services/PayPal/PayPalRefundResponse.cs
+++ b/BuckarooSdk/Services/PayPal/PayPalRefundResponse.cs
@@ -7,6 +7,6 @@ namespace BuckarooSdk.Services.PayPal
///
public class PayPalRefundResponse : ActionResponse
{
- public override ServiceNames ServiceNames => ServiceNames.PayPal;
+ public override ServiceNames ServiceNames => ServiceNames.PayPal;
}
}
diff --git a/BuckarooSdk/Services/PayPal/PayPalTransaction.cs b/BuckarooSdk/Services/PayPal/PayPalTransaction.cs
index 8e0de0e..a9ab949 100644
--- a/BuckarooSdk/Services/PayPal/PayPalTransaction.cs
+++ b/BuckarooSdk/Services/PayPal/PayPalTransaction.cs
@@ -1,17 +1,18 @@
-using BuckarooSdk.Transaction;
+using System;
+using BuckarooSdk.Transaction;
namespace BuckarooSdk.Services.PayPal
{
+ ///
+ /// PayPal transaction.
+ ///
public class PayPalTransaction
{
- ///
- /// The configured transaction
- ///
- private ConfiguredTransaction ConfiguredTransaction { get; set; }
+ private readonly ConfiguredTransaction _configuredTransaction;
internal PayPalTransaction(ConfiguredTransaction configuredTransaction)
{
- this.ConfiguredTransaction = configuredTransaction;
+ _configuredTransaction = configuredTransaction;
}
///
@@ -23,25 +24,36 @@ internal PayPalTransaction(ConfiguredTransaction configuredTransaction)
public ConfiguredServiceTransaction Pay(PayPalPayRequest request)
{
var parameters = ServiceHelper.CreateServiceParameters(request);
- var configuredServiceTransaction = new ConfiguredServiceTransaction(this.ConfiguredTransaction.BaseTransaction);
+ var configuredServiceTransaction = new ConfiguredServiceTransaction(_configuredTransaction.BaseTransaction);
configuredServiceTransaction.BaseTransaction.AddService("PayPal", parameters, "pay", "1");
return configuredServiceTransaction;
}
+
+ ///
+ /// The refund function creates a configured transaction that is ready to be executed.
+ ///
+ ///
+ public ConfiguredServiceTransaction Refund()
+ {
+ var configuredServiceTransaction = new ConfiguredServiceTransaction(_configuredTransaction.BaseTransaction);
+ configuredServiceTransaction.BaseTransaction.AddService("PayPal", null, "refund", "1");
+
+ return configuredServiceTransaction;
+ }
+
///
/// The refund function creates a configured transaction with an PayPalRefundRequest request,
/// that is ready to be executed.
///
/// A PayPalRefundRequest
///
+ [Obsolete("PayPal refund request is no longer needed.")]
public ConfiguredServiceTransaction Refund(PayPalRefundRequest request)
{
- var parameters = ServiceHelper.CreateServiceParameters(request);
- var configuredServiceTransaction = new ConfiguredServiceTransaction(this.ConfiguredTransaction.BaseTransaction);
- configuredServiceTransaction.BaseTransaction.AddService("PayPal", null, "refund", "1");
-
- return configuredServiceTransaction;
+ return Refund();
}
+
///
/// The payrecurrent function creates a configured transaction with an PayPalPayRecurrentRequest request,
/// that is ready to be executed.
@@ -51,11 +63,12 @@ public ConfiguredServiceTransaction Refund(PayPalRefundRequest request)
public ConfiguredServiceTransaction PayRecurrent(PayPalPayRecurrentRequest request)
{
var parameters = ServiceHelper.CreateServiceParameters(request);
- var configuredServiceTransaction = new ConfiguredServiceTransaction(this.ConfiguredTransaction.BaseTransaction);
+ var configuredServiceTransaction = new ConfiguredServiceTransaction(_configuredTransaction.BaseTransaction);
configuredServiceTransaction.BaseTransaction.AddService("PayPal", parameters, "payrecurrent", "1");
return configuredServiceTransaction;
}
+
///
/// The payremainder function creates a configured transaction with an PayPalPayRemainderRequest request,
/// that is ready to be executed.
@@ -65,11 +78,12 @@ public ConfiguredServiceTransaction PayRecurrent(PayPalPayRecurrentRequest reque
public ConfiguredServiceTransaction PayRemainder(PayPalPayRemainderRequest request)
{
var parameters = ServiceHelper.CreateServiceParameters(request);
- var configuredServiceTransaction = new ConfiguredServiceTransaction(this.ConfiguredTransaction.BaseTransaction);
+ var configuredServiceTransaction = new ConfiguredServiceTransaction(_configuredTransaction.BaseTransaction);
configuredServiceTransaction.BaseTransaction.AddService("PayPal", parameters, "payremainder", "1");
return configuredServiceTransaction;
}
+
///
/// The extrainfo function creates a configured transaction with an PayPalExtraInfoRequest request,
/// that is ready to be executed.
@@ -79,7 +93,7 @@ public ConfiguredServiceTransaction PayRemainder(PayPalPayRemainderRequest reque
public ConfiguredServiceTransaction ExtraInfo(PayPalExtraInfoRequest request)
{
var parameters = ServiceHelper.CreateServiceParameters(request);
- var configuredServiceTransaction = new ConfiguredServiceTransaction(this.ConfiguredTransaction.BaseTransaction);
+ var configuredServiceTransaction = new ConfiguredServiceTransaction(_configuredTransaction.BaseTransaction);
configuredServiceTransaction.BaseTransaction.AddService("PayPal", parameters, "ExtraInfo", "1");
return configuredServiceTransaction;
diff --git a/BuckarooSdk/Services/PayPerEmail/PayPerEmailPaymentInvitationRequest.cs b/BuckarooSdk/Services/PayPerEmail/PayPerEmailPaymentInvitationRequest.cs
index f21dd88..894a340 100644
--- a/BuckarooSdk/Services/PayPerEmail/PayPerEmailPaymentInvitationRequest.cs
+++ b/BuckarooSdk/Services/PayPerEmail/PayPerEmailPaymentInvitationRequest.cs
@@ -1,14 +1,14 @@
using System;
namespace BuckarooSdk.Services.PayPerEmail
{
- ///
- /// The PayperEmail Payment invitation is a request that has the purpos of sending a payment invitation
- /// to a customer. This can be performed by Buckaroo, or a payment link can be returned, in case the
- /// mail should be sent by your own system. The payment link is the key element of the PayperEmail and
- /// is the link to the Buckaroo Payment Engine.
- ///
- public class PayPerEmailPaymentInvitationRequest
- {
+ ///
+ /// The PayperEmail Payment invitation is a request that has the purpos of sending a payment invitation
+ /// to a customer. This can be performed by Buckaroo, or a payment link can be returned, in case the
+ /// mail should be sent by your own system. The payment link is the key element of the PayperEmail and
+ /// is the link to the Buckaroo Payment Engine.
+ ///
+ public class PayPerEmailPaymentInvitationRequest
+ {
///
/// The gender of the customer, used to properly address the customer in the mail. Possible values are:
///
diff --git a/BuckarooSdk/Services/PayPerEmail/PayPerEmailPaymentInvitationResponse.cs b/BuckarooSdk/Services/PayPerEmail/PayPerEmailPaymentInvitationResponse.cs
index 25864c6..85e93c6 100644
--- a/BuckarooSdk/Services/PayPerEmail/PayPerEmailPaymentInvitationResponse.cs
+++ b/BuckarooSdk/Services/PayPerEmail/PayPerEmailPaymentInvitationResponse.cs
@@ -3,9 +3,9 @@
namespace BuckarooSdk.Services.PayPerEmail
{
- public class PayPerEmailPaymentInvitationResponse : ActionResponse
+ public class PayPerEmailPaymentInvitationResponse : ActionResponse
{
- public override ServiceNames ServiceNames => ServiceNames.PayPerEmail;
+ public override ServiceNames ServiceNames => ServiceNames.PayPerEmail;
public DateTime ExpirationDate { get; set; }
public string PayLink { get; set; }
}
diff --git a/BuckarooSdk/Services/PayPerEmail/PayPerEmailTransaction.cs b/BuckarooSdk/Services/PayPerEmail/PayPerEmailTransaction.cs
index 45c6667..9fafbd0 100644
--- a/BuckarooSdk/Services/PayPerEmail/PayPerEmailTransaction.cs
+++ b/BuckarooSdk/Services/PayPerEmail/PayPerEmailTransaction.cs
@@ -6,30 +6,30 @@ namespace BuckarooSdk.Services.PayPerEmail
/// The CancelTransaction class of payment method type: PayPerMail.
///
public class PayPerEmailTransaction
- {
+ {
///
- /// The configured transaction
- ///
- private ConfiguredTransaction ConfiguredTransaction { get; set; }
+ /// The configured transaction
+ ///
+ private ConfiguredTransaction ConfiguredTransaction { get; set; }
- internal PayPerEmailTransaction(ConfiguredTransaction baseTransaction)
- {
- this.ConfiguredTransaction = baseTransaction;
- }
+ internal PayPerEmailTransaction(ConfiguredTransaction baseTransaction)
+ {
+ this.ConfiguredTransaction = baseTransaction;
+ }
///
- /// The pay function creates a configured transaction with a PayPerEmailPaymentInvitationRequest,
+ /// The pay function creates a configured transaction with a PayPerEmailPaymentInvitationRequest,
/// that is ready to be executed.
- ///
- /// A PayPerEmailPaymentInvitationRequest
- ///
- public ConfiguredServiceTransaction PaymentInvitation(PayPerEmailPaymentInvitationRequest request)
- {
+ ///
+ /// A PayPerEmailPaymentInvitationRequest
+ ///
+ public ConfiguredServiceTransaction PaymentInvitation(PayPerEmailPaymentInvitationRequest request)
+ {
var parameters = ServiceHelper.CreateServiceParameters(request);
var configuredServiceTransaction = new ConfiguredServiceTransaction(this.ConfiguredTransaction.BaseTransaction);
- configuredServiceTransaction.BaseTransaction.AddService("PayPerEmail", parameters, "paymentinvitation");
+ configuredServiceTransaction.BaseTransaction.AddService("PayPerEmail", parameters, "paymentinvitation");
- return configuredServiceTransaction;
- }
- }
+ return configuredServiceTransaction;
+ }
+ }
}
diff --git a/BuckarooSdk/Services/RequestParameter.cs b/BuckarooSdk/Services/RequestParameter.cs
index e4cfac6..0a5ab66 100644
--- a/BuckarooSdk/Services/RequestParameter.cs
+++ b/BuckarooSdk/Services/RequestParameter.cs
@@ -6,7 +6,7 @@ internal class RequestParameter
public string GroupType = string.Empty;
public string GroupId = string.Empty;
public string Value;
- }
-
- internal class Global : Service { }
+ }
+
+ internal class Global : Service { }
}
diff --git a/BuckarooSdk/Services/ServiceHelper.cs b/BuckarooSdk/Services/ServiceHelper.cs
index eb03685..cc26656 100644
--- a/BuckarooSdk/Services/ServiceHelper.cs
+++ b/BuckarooSdk/Services/ServiceHelper.cs
@@ -105,9 +105,9 @@ private static RequestParameter CreateParameter(object value, string name, strin
private static string StringifyParameter(object value)
{
- if (value is decimal)
+ if (value is decimal decimalValue)
{
- return ((decimal)value).ToString(CultureInfo.InvariantCulture);
+ return decimalValue.ToString(CultureInfo.InvariantCulture);
}
else
{
diff --git a/BuckarooSdk/Services/SimpleSepaDirectDebit/SimpleSepaDirectDebitPayRequest.cs b/BuckarooSdk/Services/SimpleSepaDirectDebit/SimpleSepaDirectDebitPayRequest.cs
index 35a6da3..e0cea4f 100644
--- a/BuckarooSdk/Services/SimpleSepaDirectDebit/SimpleSepaDirectDebitPayRequest.cs
+++ b/BuckarooSdk/Services/SimpleSepaDirectDebit/SimpleSepaDirectDebitPayRequest.cs
@@ -2,29 +2,29 @@
{
public class SimpleSepaDirectDebitPayRequest
{
- ///
- /// The account name of the customer.
- ///
+ ///
+ /// The account name of the customer.
+ ///
public string CustomerAccountName { get; set; }
- ///
- /// The mandate reference number.
- ///
+ ///
+ /// The mandate reference number.
+ ///
public string MandateReference { get; set; }
- ///
- /// The IBAN of the customers account.
- ///
- public string CustomerIban { get; set; }
- ///
- /// The BIC of the customers account.
- ///
- public string CustomerBic { get; set; }
- ///
- /// The date on which the Sepa Direct Debit needs to be collected.
- ///
+ ///
+ /// The IBAN of the customers account.
+ ///
+ public string CustomerIban { get; set; }
+ ///
+ /// The BIC of the customers account.
+ ///
+ public string CustomerBic { get; set; }
+ ///
+ /// The date on which the Sepa Direct Debit needs to be collected.
+ ///
public string CollectDate { get; set; }
- ///
- /// The date the mandate has been registered.
- ///
+ ///
+ /// The date the mandate has been registered.
+ ///
public string MandateDate { get; set; }
}
}
diff --git a/BuckarooSdk/Services/SimpleSepaDirectDebit/SimpleSepaDirectDebitPayResponse.cs b/BuckarooSdk/Services/SimpleSepaDirectDebit/SimpleSepaDirectDebitPayResponse.cs
index ab58332..c244eb1 100644
--- a/BuckarooSdk/Services/SimpleSepaDirectDebit/SimpleSepaDirectDebitPayResponse.cs
+++ b/BuckarooSdk/Services/SimpleSepaDirectDebit/SimpleSepaDirectDebitPayResponse.cs
@@ -5,30 +5,30 @@ namespace BuckarooSdk.Services.SimpleSepaDirectDebit
{
public class SimpleSepaDirectDebitPayResponse : ActionResponse
{
- public override ServiceNames ServiceNames => ServiceNames.SimpleSepaDirectDebit;
- ///
- /// The date the mandate has been registered
- ///
+ public override ServiceNames ServiceNames => ServiceNames.SimpleSepaDirectDebit;
+ ///
+ /// The date the mandate has been registered
+ ///
public DateTime MandateDate { get; set; }
- ///
- /// The type of direct debit that will be processed.
- ///
+ ///
+ /// The type of direct debit that will be processed.
+ ///
public string DirectDebitType { get; set; }
- ///
- /// The date the mandate has been registered.
- ///
+ ///
+ /// The date the mandate has been registered.
+ ///
public DateTime CollectDate { get; set; }
- ///
- /// The mandate reference number.
- ///
+ ///
+ /// The mandate reference number.
+ ///
public string MandateReference { get; set; }
- ///
- /// The IBAN of the customers account.
- ///
- public string CustomerIban { get; set; }
- ///
- /// The BIC of the customers account.
- ///
- public string CustomerBic { get; set; }
+ ///
+ /// The IBAN of the customers account.
+ ///
+ public string CustomerIban { get; set; }
+ ///
+ /// The BIC of the customers account.
+ ///
+ public string CustomerBic { get; set; }
}
}
diff --git a/BuckarooSdk/Services/SimpleSepaDirectDebit/SimpleSepaDirectDebitRefundRequest.cs b/BuckarooSdk/Services/SimpleSepaDirectDebit/SimpleSepaDirectDebitRefundRequest.cs
index 96fb6e3..ab8e502 100644
--- a/BuckarooSdk/Services/SimpleSepaDirectDebit/SimpleSepaDirectDebitRefundRequest.cs
+++ b/BuckarooSdk/Services/SimpleSepaDirectDebit/SimpleSepaDirectDebitRefundRequest.cs
@@ -2,17 +2,17 @@
{
public class SimpleSepaDirectDebitRefundRequest
{
- ///
- /// The IBAN of the customers account
- ///
+ ///
+ /// The IBAN of the customers account
+ ///
public string CustomerIban { get; set; }
- ///
- /// The BIC of the customers account
- ///
+ ///
+ /// The BIC of the customers account
+ ///
public string CustomerBic { get; set; }
- ///
- /// The account name of the customer
- ///
+ ///
+ /// The account name of the customer
+ ///
public string CustomerAccountName { get; set; }
}
}
diff --git a/BuckarooSdk/Services/SimpleSepaDirectDebit/SimpleSepaDirectDebitRefundResponse.cs b/BuckarooSdk/Services/SimpleSepaDirectDebit/SimpleSepaDirectDebitRefundResponse.cs
index 92b2632..9c61b02 100644
--- a/BuckarooSdk/Services/SimpleSepaDirectDebit/SimpleSepaDirectDebitRefundResponse.cs
+++ b/BuckarooSdk/Services/SimpleSepaDirectDebit/SimpleSepaDirectDebitRefundResponse.cs
@@ -4,19 +4,19 @@ namespace BuckarooSdk.Services.SimpleSepaDirectDebit
{
public class SimpleSepaDirectDebitRefundResponse : ActionResponse
{
- public override ServiceNames ServiceNames => ServiceNames.SimpleSepaDirectDebit;
+ public override ServiceNames ServiceNames => ServiceNames.SimpleSepaDirectDebit;
- ///
- /// The account name of the customer
- ///
+ ///
+ /// The account name of the customer
+ ///
public string CustomerAccountName { get; set; }
- ///
- /// The IBAN of the customers account
- ///
- public string CustomerIban { get; set; }
- ///
- /// The BIC of the customers account
- ///
- public string CustomerBic { get; set; }
+ ///
+ /// The IBAN of the customers account
+ ///
+ public string CustomerIban { get; set; }
+ ///
+ /// The BIC of the customers account
+ ///
+ public string CustomerBic { get; set; }
}
}
diff --git a/BuckarooSdk/Services/SimpleSepaDirectDebit/SimpleSepaDirectDebitTransaction.cs b/BuckarooSdk/Services/SimpleSepaDirectDebit/SimpleSepaDirectDebitTransaction.cs
index 35582f2..7095f20 100644
--- a/BuckarooSdk/Services/SimpleSepaDirectDebit/SimpleSepaDirectDebitTransaction.cs
+++ b/BuckarooSdk/Services/SimpleSepaDirectDebit/SimpleSepaDirectDebitTransaction.cs
@@ -6,8 +6,8 @@ namespace BuckarooSdk.Services.SimpleSepaDirectDebit
public class SimpleSepaDirectDebitTransaction
{
///
- /// The configured transaction
- ///
+ /// The configured transaction
+ ///
private ConfiguredTransaction ConfiguredTransaction { get; set; }
internal SimpleSepaDirectDebitTransaction(ConfiguredTransaction configuredTransaction)
@@ -30,11 +30,11 @@ public ConfiguredServiceTransaction Pay(SimpleSepaDirectDebitPayRequest request)
return configuredServiceTransaction;
}
///
- /// The refund function creates a configured transaction with an SimpleSepaDirectDebitRefundRequest,
+ /// The refund function creates a configured transaction with an SimpleSepaDirectDebitRefundRequest,
/// that is ready to be executed.
- ///
- /// An SimpleSepaDirectDebitRefundRequest
- ///
+ ///
+ /// An SimpleSepaDirectDebitRefundRequest
+ ///
public ConfiguredServiceTransaction Refund(SimpleSepaDirectDebitRefundRequest request)
{
var parameters = ServiceHelper.CreateServiceParameters(request);
diff --git a/BuckarooSdk/Services/Sofort/SofortPayRecurrentResponse.cs b/BuckarooSdk/Services/Sofort/SofortPayRecurrentResponse.cs
index 729fc26..3aaacd9 100644
--- a/BuckarooSdk/Services/Sofort/SofortPayRecurrentResponse.cs
+++ b/BuckarooSdk/Services/Sofort/SofortPayRecurrentResponse.cs
@@ -1,4 +1,4 @@
-namespace BuckarooSdk.Services.Sofort
+namespace BuckarooSdk.Services.Sofort
{
public class SofortPayRecurrentResponse
{
diff --git a/BuckarooSdk/Services/TransactionServices.cs b/BuckarooSdk/Services/TransactionServices.cs
index 602996a..a85cc51 100644
--- a/BuckarooSdk/Services/TransactionServices.cs
+++ b/BuckarooSdk/Services/TransactionServices.cs
@@ -3,24 +3,24 @@
namespace BuckarooSdk.Services
{
- // INTERNAL NOTE: This class purely exists because of the legacy json message that has to be created. within
- // this message, the list of custom parameters is a value belonging to the tag: services
+ // INTERNAL NOTE: This class purely exists because of the legacy json message that has to be created. within
+ // this message, the list of custom parameters is a value belonging to the tag: services
- ///
- /// A class that holds a list of services.
- ///
- internal class TransactionServices
+ ///
+ /// A class that holds a list of services.
+ ///
+ internal class TransactionServices
{
- ///
- /// A list of Services.
- ///
- [JsonProperty()]
+ ///
+ /// A list of Services.
+ ///
+ [JsonProperty()]
internal List ServiceList { get; set; }
- ///
- /// primary constructor. A new list of services is instantiated.
- ///
- internal TransactionServices()
+ ///
+ /// primary constructor. A new list of services is instantiated.
+ ///
+ internal TransactionServices()
{
this.ServiceList = new List();
}
diff --git a/BuckarooSdk/Services/Transfer/TransactionRequest/TransferPayRequest.cs b/BuckarooSdk/Services/Transfer/TransactionRequest/TransferPayRequest.cs
index 16dc8a3..10477d2 100644
--- a/BuckarooSdk/Services/Transfer/TransactionRequest/TransferPayRequest.cs
+++ b/BuckarooSdk/Services/Transfer/TransactionRequest/TransferPayRequest.cs
@@ -4,37 +4,37 @@ namespace BuckarooSdk.Services.Transfer.TransactionRequest
{
public class TransferPayRequest
{
- ///
- /// The first name of the customer.
- ///
+ ///
+ /// The first name of the customer.
+ ///
public string CustomerFirstName { get; set; }
- ///
- /// The last name of the customer.
- ///
+ ///
+ /// The last name of the customer.
+ ///
public string CustomerLastName { get; set; }
- ///
- /// The gender of the customer, used to properly address the customer in the mail. Possible values are:
- ///
- /// 0 : Unknown
- /// 1 : Male
- /// 2 : Female
- /// 9 : Not applicable
- ///
- /// To be sure that always one of these values are used, the corresponding class with gender constants
- /// can be used.
- ///
- public string CustomerGender { get; set; }
- ///
- /// The country of origin of the customer.
- ///
+ ///
+ /// The gender of the customer, used to properly address the customer in the mail. Possible values are:
+ ///
+ /// 0 : Unknown
+ /// 1 : Male
+ /// 2 : Female
+ /// 9 : Not applicable
+ ///
+ /// To be sure that always one of these values are used, the corresponding class with gender constants
+ /// can be used.
+ ///
+ public string CustomerGender { get; set; }
+ ///
+ /// The country of origin of the customer.
+ ///
public string CustomerCountry { get; set; }
- ///
- /// States wether an email will be sent to the customer.
- ///
+ ///
+ /// States wether an email will be sent to the customer.
+ ///
public bool SendMail { get; set; }
- ///
- /// The email address of the customer. Required if the boolean SendMail == true.
- ///
+ ///
+ /// The email address of the customer. Required if the boolean SendMail == true.
+ ///
public string CustomerEmail { get; set; }
public DateTime DateDue { get; set; }
}
diff --git a/BuckarooSdk/Services/Transfer/TransactionRequest/TransferPayResponse.cs b/BuckarooSdk/Services/Transfer/TransactionRequest/TransferPayResponse.cs
index 398c9fc..600f5bf 100644
--- a/BuckarooSdk/Services/Transfer/TransactionRequest/TransferPayResponse.cs
+++ b/BuckarooSdk/Services/Transfer/TransactionRequest/TransferPayResponse.cs
@@ -4,34 +4,34 @@ namespace BuckarooSdk.Services.Transfer.TransactionRequest
{
public class TransferPayResponse : ActionResponse
{
- public override ServiceNames ServiceNames => ServiceNames.Transfer;
- ///
- /// The name of the account where the transfer is originated from.
- ///
+ public override ServiceNames ServiceNames => ServiceNames.Transfer;
+ ///
+ /// The name of the account where the transfer is originated from.
+ ///
public string AccountHolderName { get; set; }
- ///
- /// The back account number of the account where the transfer is originated from.
- ///
+ ///
+ /// The back account number of the account where the transfer is originated from.
+ ///
public string BankAccount { get; set; }
- ///
- /// The IBAN of the customer that performed the transfer.
- ///
+ ///
+ /// The IBAN of the customer that performed the transfer.
+ ///
public string Iban { get; set; }
- ///
- /// The BIC code of the bank where the payment originated from.
- ///
+ ///
+ /// The BIC code of the bank where the payment originated from.
+ ///
public string Bic { get; set; }
- ///
- /// The country of origin of the customer.
- ///
+ ///
+ /// The country of origin of the customer.
+ ///
public string AccountHolderCountry { get; set; }
- ///
- /// The bankLeitszahl reference.
- ///
+ ///
+ /// The bankLeitszahl reference.
+ ///
public string Bankleitzahl { get; set; }
- ///
- /// The city where the accountholder lives in.
- ///
+ ///
+ /// The city where the accountholder lives in.
+ ///
public string AccountHolderCity { get; set; }
}
}
diff --git a/BuckarooSdk/Services/Transfer/TransactionRequest/TransferRefundRequest.cs b/BuckarooSdk/Services/Transfer/TransactionRequest/TransferRefundRequest.cs
index d8b7dd3..266b513 100644
--- a/BuckarooSdk/Services/Transfer/TransactionRequest/TransferRefundRequest.cs
+++ b/BuckarooSdk/Services/Transfer/TransactionRequest/TransferRefundRequest.cs
@@ -2,30 +2,30 @@
{
public class TransferRefundRequest
{
- ///
- /// The IBAN of the customer that performed the transfer.
- ///
+ ///
+ /// The IBAN of the customer that performed the transfer.
+ ///
public string CustomerIban { get; set; }
- ///
- /// The back account number of the account where the transfer is originated from.
- ///
+ ///
+ /// The back account number of the account where the transfer is originated from.
+ ///
public string CustomerAccountnumber { get; set; }
- ///
- /// The kontonummber of the customer. As the name suggests, it is only required when performing
- /// a refund to a german bank.
- ///
+ ///
+ /// The kontonummber of the customer. As the name suggests, it is only required when performing
+ /// a refund to a german bank.
+ ///
public string CustomerKontoNummer { get; set; }
- ///
- /// The back account number of the account where the transfer is originated from.
- ///
- public string CustomerAccountname { get; set; }
- ///
- /// The bankLeitszahl reference.
- ///
+ ///
+ /// The back account number of the account where the transfer is originated from.
+ ///
+ public string CustomerAccountname { get; set; }
+ ///
+ /// The bankLeitszahl reference.
+ ///
public string CustomerBankleitzahl { get; set; }
- ///
- /// The BIC code of the bank where the payment originated from.
- ///
+ ///
+ /// The BIC code of the bank where the payment originated from.
+ ///
public string CustomerBic { get; set; }
}
}
diff --git a/BuckarooSdk/Services/Transfer/TransactionRequest/TransferRefundResponse.cs b/BuckarooSdk/Services/Transfer/TransactionRequest/TransferRefundResponse.cs
index db607ff..540bb8c 100644
--- a/BuckarooSdk/Services/Transfer/TransactionRequest/TransferRefundResponse.cs
+++ b/BuckarooSdk/Services/Transfer/TransactionRequest/TransferRefundResponse.cs
@@ -7,6 +7,6 @@ namespace BuckarooSdk.Services.Transfer.TransactionRequest
///
public class TransferRefundResponse : ActionResponse
{
- public override ServiceNames ServiceNames => ServiceNames.Transfer;
+ public override ServiceNames ServiceNames => ServiceNames.Transfer;
}
}
diff --git a/BuckarooSdk/Services/Transfer/TransactionRequest/TransferTransaction.cs b/BuckarooSdk/Services/Transfer/TransactionRequest/TransferTransaction.cs
index 2dac128..bb6582e 100644
--- a/BuckarooSdk/Services/Transfer/TransactionRequest/TransferTransaction.cs
+++ b/BuckarooSdk/Services/Transfer/TransactionRequest/TransferTransaction.cs
@@ -5,9 +5,9 @@ namespace BuckarooSdk.Services.Transfer.TransactionRequest
public class TransferTransaction
{
///
- /// The configured transaction
- ///
- private ConfiguredTransaction ConfiguredTransaction { get; set; }
+ /// The configured transaction
+ ///
+ private ConfiguredTransaction ConfiguredTransaction { get; set; }
internal TransferTransaction(ConfiguredTransaction baseTransaction)
{
@@ -15,12 +15,12 @@ internal TransferTransaction(ConfiguredTransaction baseTransaction)
}
///
- /// The pay function creates a configured transaction with a TransferPayRequest,
+ /// The pay function creates a configured transaction with a TransferPayRequest,
/// that is ready to be executed.
- ///
- /// A TransferPayRequest
- ///
- public ConfiguredServiceTransaction Pay(TransferPayRequest request)
+ ///
+ /// A TransferPayRequest
+ ///
+ public ConfiguredServiceTransaction Pay(TransferPayRequest request)
{
var parameters = ServiceHelper.CreateServiceParameters(request);
var configuredServiceTransaction = new ConfiguredServiceTransaction(this.ConfiguredTransaction.BaseTransaction);
diff --git a/BuckarooSdk/Transaction/Cancel/ConfiguredCancelTransaction.cs b/BuckarooSdk/Transaction/Cancel/ConfiguredCancelTransaction.cs
index 82f2ddf..05861a8 100644
--- a/BuckarooSdk/Transaction/Cancel/ConfiguredCancelTransaction.cs
+++ b/BuckarooSdk/Transaction/Cancel/ConfiguredCancelTransaction.cs
@@ -4,16 +4,16 @@
namespace BuckarooSdk.Transaction.Cancel
{
- public class ConfiguredCancelTransaction
- {
- internal CancelTransaction CancelTransaction { get; set; }
+ public class ConfiguredCancelTransaction
+ {
+ internal CancelTransaction CancelTransaction { get; set; }
- public ConfiguredCancelTransaction(CancelTransaction cancelTransaction)
- {
- this.CancelTransaction = cancelTransaction;
- }
+ public ConfiguredCancelTransaction(CancelTransaction cancelTransaction)
+ {
+ this.CancelTransaction = cancelTransaction;
+ }
- ///
+ ///
/// Execute the request, a post to the Buckaroo Payment Engine is prepared and send.
///
/// General TransactionResponse object is returned
@@ -21,5 +21,5 @@ public RequestResponse Execute()
{
return Connection.Connector.SendRequest(this.CancelTransaction.Request.Request, this.CancelTransaction.CancelTransactionBase, HttpRequestType.Post).Result;
}
- }
+ }
}
diff --git a/BuckarooSdk/Transaction/ConfiguredServiceTransaction.cs b/BuckarooSdk/Transaction/ConfiguredServiceTransaction.cs
index e1a4a48..02744fa 100644
--- a/BuckarooSdk/Transaction/ConfiguredServiceTransaction.cs
+++ b/BuckarooSdk/Transaction/ConfiguredServiceTransaction.cs
@@ -6,14 +6,14 @@
namespace BuckarooSdk.Transaction
{
- ///
- /// The transaction that is configured for execution
- ///
+ ///
+ /// The transaction that is configured for execution
+ ///
public class ConfiguredServiceTransaction
{
internal TransactionRequest BaseTransaction { get;}
- internal ConfiguredServiceTransaction(TransactionRequest transactionRequest)
+ internal ConfiguredServiceTransaction(TransactionRequest transactionRequest)
{
this.BaseTransaction = transactionRequest;
}
@@ -24,14 +24,14 @@ internal ConfiguredServiceTransaction(TransactionRequest transactionRequest)
/// General TransactionResponse object is returned
public RequestResponse Execute()
{
- return this.ExecuteAsync().GetAwaiter().GetResult();
+ return this.ExecuteAsync().GetAwaiter().GetResult();
- //var response = Connection.Connector.SendRequest(this.BaseTransaction.AuthenticatedRequest.Request, this.BaseTransaction.TransactionBase, HttpRequestType.Post).GetAwaiter().GetResult();
+ //var response = Connection.Connector.SendRequest(this.BaseTransaction.AuthenticatedRequest.Request, this.BaseTransaction.TransactionBase, HttpRequestType.Post).GetAwaiter().GetResult();
- // relocate logger from request to response
- //response.BuckarooSdkLogger = this.BaseTransaction.AuthenticatedRequest.Request.BuckarooSdkLogger;
+ // relocate logger from request to response
+ //response.BuckarooSdkLogger = this.BaseTransaction.AuthenticatedRequest.Request.BuckarooSdkLogger;
- //return response;
+ //return response;
}
///
@@ -41,7 +41,7 @@ public RequestResponse Execute()
public async Task ExecuteAsync()
{
var response = await Connection.Connector.SendRequest(this.BaseTransaction.AuthenticatedRequest.Request, this.BaseTransaction.TransactionBase, HttpRequestType.Post)
- .ConfigureAwait(false);
+ .ConfigureAwait(false);
// relocate logger from request to response
response.BuckarooSdkLogger = this.BaseTransaction.AuthenticatedRequest.Request.BuckarooSdkLogger;
@@ -63,4 +63,4 @@ public ILogger GetLogger()
return this.BaseTransaction.AuthenticatedRequest.Request.BuckarooSdkLogger;
}
}
-}
\ No newline at end of file
+}
diff --git a/BuckarooSdk/Transaction/ConfiguredTransaction.cs b/BuckarooSdk/Transaction/ConfiguredTransaction.cs
index f5d283b..16f35dc 100644
--- a/BuckarooSdk/Transaction/ConfiguredTransaction.cs
+++ b/BuckarooSdk/Transaction/ConfiguredTransaction.cs
@@ -1,4 +1,4 @@
-using BuckarooSdk.Services.Afterpay;
+using BuckarooSdk.Services.Afterpay;
using BuckarooSdk.Services.BuckarooVoucher;
using BuckarooSdk.Services.BuckarooWallet;
using BuckarooSdk.Services.Capayable;
@@ -32,353 +32,353 @@
namespace BuckarooSdk.Transaction
{
- ///
- /// The configuredTransaction is a transaction where the basic fields are set.
- ///
- public class ConfiguredTransaction
- {
- internal TransactionRequest BaseTransaction { get; private set; }
-
- ///
- /// ConfiguredTransaction primary constructor.
- ///
- ///
- public ConfiguredTransaction(TransactionRequest transaction)
- {
- this.BaseTransaction = transaction;
- }
-
- #region CreditCards
- ///
- /// The instanciation of the specific Dankort Service transaction.
- ///
- /// An Dankort
- public CreditCardTransaction Dankort()
- {
- return new CreditCardTransaction(this, Constants.Services.ServiceNames.Dankort);
- }
-
- ///
- /// The instanciation of the specific Visa Service transaction.
- ///
- /// A Visa
- public CreditCardTransaction Visa()
- {
- return new CreditCardTransaction(this, Constants.Services.ServiceNames.Visa);
- }
-
- ///
- /// The instanciation of the specific MasterCard Service transaction.
- ///
- /// A MasterCard
- public CreditCardTransaction MasterCard()
- {
- return new CreditCardTransaction(this, Constants.Services.ServiceNames.MasterCard);
- }
-
- ///
- /// The instanciation of the specific CarteBleueVisa Service transaction.
- ///
- /// A CarteBleueVisa
- public CreditCardTransaction CarteBleueVisa()
- {
- return new CreditCardTransaction(this, Constants.Services.ServiceNames.CarteBleueVisa);
- }
-
-
- ///
- /// The instanciation of the specific VisaElectron Service transaction.
- ///
- /// A VisaElectron
- public CreditCardTransaction VisaElectron()
- {
- return new CreditCardTransaction(this, Constants.Services.ServiceNames.VisaElectron);
- }
-
- ///
- /// The instanciation of the specific VPay Service transaction.
- ///
- /// A VPay
- public CreditCardTransaction VPay()
- {
- return new CreditCardTransaction(this, Constants.Services.ServiceNames.VPay);
- }
-
- ///
- /// The instanciation of the specific Maestro Service transaction.
- ///
- /// A Maestro
- public CreditCardTransaction Maestro()
- {
- return new CreditCardTransaction(this, Constants.Services.ServiceNames.Maestro);
- }
-
- ///
- /// The instanciation of the specific American Express Service transaction.
- ///
- /// An AmericanExpress
- public AmericanExpressTransaction AmericanExpress()
- {
- return new AmericanExpressTransaction(this);
- }
-
- ///
- /// The instanciation of the specific Nexi Service transaction.
- ///
- /// A Nexi
- public CreditCardTransaction Nexi()
- {
- return new CreditCardTransaction(this, Constants.Services.ServiceNames.Nexi);
- }
-
- ///
- /// The instanciation of the specific Carte Bancaire Service transaction.
- ///
- /// A CarteBancaire
- public CreditCardTransaction CarteBancaire()
- {
- return new CreditCardTransaction(this, Constants.Services.ServiceNames.CarteBancaire);
- }
-
- ///
- /// The instanciation of the specific Bancontact Service transaction.
- ///
- /// A Bancontact
- public BancontactTransaction Bancontact()
- {
- return new BancontactTransaction(this);
- }
-
- #endregion
-
- #region iDeal
- ///
- /// The instanciation of the specific Ideal Service transaction.
- ///
- /// An ideal
- public IdealTransaction Ideal()
- {
- return new IdealTransaction(this);
- }
-
- ///
- /// The instanciation of the specific Ideal Service transaction.
- ///
- /// An ideal
- public IdealProcessingTransaction IdealProcessing()
- {
- return new IdealProcessingTransaction(this);
- }
-
- #endregion
-
- /// An INGHomePay
- public INGHomePayRequestObject INGHomePay()
- {
- return new INGHomePayRequestObject(this);
- }
-
- ///
- /// The instanciation of the specific Afterpay Service transaction.
- ///
- public AfterpayRequestObject Afterpay()
- {
- return new AfterpayRequestObject(this);
- }
-
- #region customgiftcard
- ///
- /// The instantiation of the specific CustomGiftcard service transaction.
- ///
- public CustomGiftcardRequestObject CustomGiftcard()
- {
- return new CustomGiftcardRequestObject(this, Constants.Services.ServiceNames.CustomGiftcard);
- }
-
- /// The instantiation of the specific CustomGiftcard2 service transaction.
- ///
- public CustomGiftcardRequestObject CustomGiftcard2()
- {
- return new CustomGiftcardRequestObject(this, Constants.Services.ServiceNames.CustomGiftcard2);
- }
-
- /// The instantiation of the specific CustomGiftcard3 service transaction.
- ///
- public CustomGiftcardRequestObject CustomGiftcard3()
- {
- return new CustomGiftcardRequestObject(this, Constants.Services.ServiceNames.CustomGiftcard3);
- }
-
- #endregion
- /// The instantiation of the specific Ippies service transaction.
- public IppiesRequestObject Ippies()
- {
- return new IppiesRequestObject(this);
- }
-
-
- ///
- /// The instantiation of the specific BuckarooWallet service transaction.
- ///
- public BuckarooWalletRequestObject BuckarooWallet()
- {
- return new BuckarooWalletRequestObject(this);
- }
+ ///
+ /// The configuredTransaction is a transaction where the basic fields are set.
+ ///
+ public class ConfiguredTransaction
+ {
+ internal TransactionRequest BaseTransaction { get; private set; }
+
+ ///
+ /// ConfiguredTransaction primary constructor.
+ ///
+ ///
+ public ConfiguredTransaction(TransactionRequest transaction)
+ {
+ this.BaseTransaction = transaction;
+ }
+
+ #region CreditCards
+ ///
+ /// The instanciation of the specific Dankort Service transaction.
+ ///
+ /// An Dankort
+ public CreditCardTransaction Dankort()
+ {
+ return new CreditCardTransaction(this, Constants.Services.ServiceNames.Dankort);
+ }
+
+ ///
+ /// The instanciation of the specific Visa Service transaction.
+ ///
+ /// A Visa
+ public CreditCardTransaction Visa()
+ {
+ return new CreditCardTransaction(this, Constants.Services.ServiceNames.Visa);
+ }
+
+ ///
+ /// The instanciation of the specific MasterCard Service transaction.
+ ///
+ /// A MasterCard
+ public CreditCardTransaction MasterCard()
+ {
+ return new CreditCardTransaction(this, Constants.Services.ServiceNames.MasterCard);
+ }
+
+ ///
+ /// The instanciation of the specific CarteBleueVisa Service transaction.
+ ///
+ /// A CarteBleueVisa
+ public CreditCardTransaction CarteBleueVisa()
+ {
+ return new CreditCardTransaction(this, Constants.Services.ServiceNames.CarteBleueVisa);
+ }
+
+
+ ///
+ /// The instanciation of the specific VisaElectron Service transaction.
+ ///
+ /// A VisaElectron
+ public CreditCardTransaction VisaElectron()
+ {
+ return new CreditCardTransaction(this, Constants.Services.ServiceNames.VisaElectron);
+ }
+
+ ///
+ /// The instanciation of the specific VPay Service transaction.
+ ///
+ /// A VPay
+ public CreditCardTransaction VPay()
+ {
+ return new CreditCardTransaction(this, Constants.Services.ServiceNames.VPay);
+ }
+
+ ///
+ /// The instanciation of the specific Maestro Service transaction.
+ ///
+ /// A Maestro
+ public CreditCardTransaction Maestro()
+ {
+ return new CreditCardTransaction(this, Constants.Services.ServiceNames.Maestro);
+ }
+
+ ///
+ /// The instanciation of the specific American Express Service transaction.
+ ///
+ /// An AmericanExpress
+ public AmericanExpressTransaction AmericanExpress()
+ {
+ return new AmericanExpressTransaction(this);
+ }
+
+ ///
+ /// The instanciation of the specific Nexi Service transaction.
+ ///
+ /// A Nexi
+ public CreditCardTransaction Nexi()
+ {
+ return new CreditCardTransaction(this, Constants.Services.ServiceNames.Nexi);
+ }
+
+ ///
+ /// The instanciation of the specific Carte Bancaire Service transaction.
+ ///
+ /// A CarteBancaire
+ public CreditCardTransaction CarteBancaire()
+ {
+ return new CreditCardTransaction(this, Constants.Services.ServiceNames.CarteBancaire);
+ }
+
+ ///
+ /// The instanciation of the specific Bancontact Service transaction.
+ ///
+ /// A Bancontact
+ public BancontactTransaction Bancontact()
+ {
+ return new BancontactTransaction(this);
+ }
+
+ #endregion
+
+ #region iDeal
+ ///
+ /// The instanciation of the specific Ideal Service transaction.
+ ///
+ /// An ideal
+ public IdealTransaction Ideal()
+ {
+ return new IdealTransaction(this);
+ }
+
+ ///
+ /// The instanciation of the specific Ideal Service transaction.
+ ///
+ /// An ideal
+ public IdealProcessingTransaction IdealProcessing()
+ {
+ return new IdealProcessingTransaction(this);
+ }
+
+ #endregion
+
+ /// An INGHomePay
+ public INGHomePayRequestObject INGHomePay()
+ {
+ return new INGHomePayRequestObject(this);
+ }
+
+ ///
+ /// The instanciation of the specific Afterpay Service transaction.
+ ///
+ public AfterpayRequestObject Afterpay()
+ {
+ return new AfterpayRequestObject(this);
+ }
+
+ #region customgiftcard
+ ///
+ /// The instantiation of the specific CustomGiftcard service transaction.
+ ///
+ public CustomGiftcardRequestObject CustomGiftcard()
+ {
+ return new CustomGiftcardRequestObject(this, Constants.Services.ServiceNames.CustomGiftcard);
+ }
+
+ /// The instantiation of the specific CustomGiftcard2 service transaction.
+ ///
+ public CustomGiftcardRequestObject CustomGiftcard2()
+ {
+ return new CustomGiftcardRequestObject(this, Constants.Services.ServiceNames.CustomGiftcard2);
+ }
+
+ /// The instantiation of the specific CustomGiftcard3 service transaction.
+ ///
+ public CustomGiftcardRequestObject CustomGiftcard3()
+ {
+ return new CustomGiftcardRequestObject(this, Constants.Services.ServiceNames.CustomGiftcard3);
+ }
+
+ #endregion
+ /// The instantiation of the specific Ippies service transaction.
+ public IppiesRequestObject Ippies()
+ {
+ return new IppiesRequestObject(this);
+ }
+
+
+ ///
+ /// The instantiation of the specific BuckarooWallet service transaction.
+ ///
+ public BuckarooWalletRequestObject BuckarooWallet()
+ {
+ return new BuckarooWalletRequestObject(this);
+ }
///
- /// The instantiation of the specific BuckarooVoucher service transaction.
- ///
- public BuckarooVoucherRequestObject BuckarooVoucher()
- {
- return new BuckarooVoucherRequestObject(this);
- }
+ /// The instantiation of the specific BuckarooVoucher service transaction.
+ ///
+ public BuckarooVoucherRequestObject BuckarooVoucher()
+ {
+ return new BuckarooVoucherRequestObject(this);
+ }
- ///
- /// The instantiation of the specific Notification service transaction.
- ///
- public NotificationRequestObject Notification()
- {
- return new NotificationRequestObject(this);
- }
-
- ///
- /// The instantiation of the specific OnlineGiro service transaction.
- ///
- public CapayableRequestObject Capayable()
- {
- return new CapayableRequestObject(this);
- }
-
- ///
- /// The instantiation of the specific OnlineGiro service transaction.
- ///
- public OnlineGiroRequestObject OnlineGiro()
- {
- return new OnlineGiroRequestObject(this);
- }
-
- ///
- /// The instantiation of the specific OnlineGiroLite service transaction.
- ///
- public OnlineGiroLiteRequestObject OnlineGiroLite()
- {
- return new OnlineGiroLiteRequestObject(this);
- }
-
- ///
- /// The instantiation of the specific Paypermail service transaction.
- ///
- public PayPerEmailTransaction PayPerEmail()
- {
- return new PayPerEmailTransaction(this);
- }
-
- ///
- /// The instanciation of the specific Transfer Service transaction.
- ///
- public TransferTransaction Transfer()
- {
- return new TransferTransaction(this);
- }
-
- ///
- /// The instanciation of the specific PayPal Service transaction.
- ///
- public PayPalTransaction PayPal()
- {
- return new PayPalTransaction(this);
- }
-
- ///
- /// The instanciation of the specific EMandate Service transaction.
- ///
- public EMandateRequestObject EMandate()
- {
- return new EMandateRequestObject(this);
- }
-
- ///
- /// The instanciation of the specific Simple SEPA Direct debit Service transaction.
- ///
- public SimpleSepaDirectDebitTransaction SimpleSepaDirectDebit()
- {
- return new SimpleSepaDirectDebitTransaction(this);
- }
-
- public PayconiqTransaction Payconiq()
- {
- return new PayconiqTransaction(this);
- }
-
- public P24Transaction P24()
- {
- return new P24Transaction(this);
- }
-
- public KlarnaRequestObject Klarna()
- {
- return new KlarnaRequestObject(this);
- }
-
- public KbcPaymentButtonRequestObject KbcPaymentButton()
- {
- return new KbcPaymentButtonRequestObject(this);
- }
-
- public EPSRequestObject EPS()
- {
- return new EPSRequestObject(this);
- }
-
- ///
- /// The instanciation of the specific PaysafeCard Service transaction.
- ///
- /// An PaysafeCard
- public PaysafeCardRequestObject PaysafeCard()
- {
- return new PaysafeCardRequestObject(this);
- }
-
- ///
- /// The instanciation of the specific Sofort Service transaction.
- ///
- /// An Sofort
- public SofortTransaction Sofort()
- {
- return new SofortTransaction(this);
- }
-
- ///
- /// The instanciation of the specific Sofort Service transaction.
- ///
- /// A Giropay transaction
- public GiropayTransaction Giropay()
- {
- return new GiropayTransaction(this);
- }
-
- public Services.KlarnaKP.KlarnaRequestObject KlarnaKP()
- {
- return new Services.KlarnaKP.KlarnaRequestObject(this);
- }
-
- public HuisTuinTransaction HuisEnTuinGiftcard()
- {
- return new HuisTuinTransaction(this);
- }
+ ///
+ /// The instantiation of the specific Notification service transaction.
+ ///
+ public NotificationRequestObject Notification()
+ {
+ return new NotificationRequestObject(this);
+ }
+
+ ///
+ /// The instantiation of the specific OnlineGiro service transaction.
+ ///
+ public CapayableRequestObject Capayable()
+ {
+ return new CapayableRequestObject(this);
+ }
+
+ ///
+ /// The instantiation of the specific OnlineGiro service transaction.
+ ///
+ public OnlineGiroRequestObject OnlineGiro()
+ {
+ return new OnlineGiroRequestObject(this);
+ }
+
+ ///
+ /// The instantiation of the specific OnlineGiroLite service transaction.
+ ///
+ public OnlineGiroLiteRequestObject OnlineGiroLite()
+ {
+ return new OnlineGiroLiteRequestObject(this);
+ }
+
+ ///
+ /// The instantiation of the specific Paypermail service transaction.
+ ///
+ public PayPerEmailTransaction PayPerEmail()
+ {
+ return new PayPerEmailTransaction(this);
+ }
+
+ ///
+ /// The instanciation of the specific Transfer Service transaction.
+ ///
+ public TransferTransaction Transfer()
+ {
+ return new TransferTransaction(this);
+ }
+
+ ///
+ /// The instanciation of the specific PayPal Service transaction.
+ ///
+ public PayPalTransaction PayPal()
+ {
+ return new PayPalTransaction(this);
+ }
+
+ ///
+ /// The instanciation of the specific EMandate Service transaction.
+ ///
+ public EMandateRequestObject EMandate()
+ {
+ return new EMandateRequestObject();
+ }
+
+ ///
+ /// The instanciation of the specific Simple SEPA Direct debit Service transaction.
+ ///
+ public SimpleSepaDirectDebitTransaction SimpleSepaDirectDebit()
+ {
+ return new SimpleSepaDirectDebitTransaction(this);
+ }
+
+ public PayconiqTransaction Payconiq()
+ {
+ return new PayconiqTransaction(this);
+ }
+
+ public P24Transaction P24()
+ {
+ return new P24Transaction(this);
+ }
+
+ public KlarnaRequestObject Klarna()
+ {
+ return new KlarnaRequestObject(this);
+ }
+
+ public KbcPaymentButtonRequestObject KbcPaymentButton()
+ {
+ return new KbcPaymentButtonRequestObject(this);
+ }
+
+ public EPSRequestObject EPS()
+ {
+ return new EPSRequestObject(this);
+ }
+
+ ///
+ /// The instanciation of the specific PaysafeCard Service transaction.
+ ///
+ /// An PaysafeCard
+ public PaysafeCardRequestObject PaysafeCard()
+ {
+ return new PaysafeCardRequestObject(this);
+ }
+
+ ///
+ /// The instanciation of the specific Sofort Service transaction.
+ ///
+ /// An Sofort
+ public SofortTransaction Sofort()
+ {
+ return new SofortTransaction(this);
+ }
+
+ ///
+ /// The instanciation of the specific Sofort Service transaction.
+ ///
+ /// A Giropay transaction
+ public GiropayTransaction Giropay()
+ {
+ return new GiropayTransaction(this);
+ }
+
+ public Services.KlarnaKP.KlarnaRequestObject KlarnaKP()
+ {
+ return new Services.KlarnaKP.KlarnaRequestObject(this);
+ }
+
+ public HuisTuinTransaction HuisEnTuinGiftcard()
+ {
+ return new HuisTuinTransaction(this);
+ }
public VVVGiftcardTransaction VVVGiftcard()
{
return new VVVGiftcardTransaction(this);
}
- ///
- /// The instantiation of a general transaction without a service.
- ///
- /// A general transaction without any service selected
- public GeneralTransaction NoServiceSelected()
- {
- return new GeneralTransaction(this);
- }
- }
+ ///
+ /// The instantiation of a general transaction without a service.
+ ///
+ /// A general transaction without any service selected
+ public GeneralTransaction NoServiceSelected()
+ {
+ return new GeneralTransaction(this);
+ }
+ }
}
diff --git a/BuckarooSdk/Transaction/InvoiceInfo/TransactionInvoiceInfo.cs b/BuckarooSdk/Transaction/InvoiceInfo/TransactionInvoiceInfo.cs
index 1c68966..3cca208 100644
--- a/BuckarooSdk/Transaction/InvoiceInfo/TransactionInvoiceInfo.cs
+++ b/BuckarooSdk/Transaction/InvoiceInfo/TransactionInvoiceInfo.cs
@@ -3,32 +3,32 @@
namespace BuckarooSdk.Transaction.InvoiceInfo
{
- public class TransactionInvoiceInfo
- {
- internal AuthenticatedRequest Request { get; set; }
- internal TransactionInvoiceInfoBase TransactionInvoiceInfoBase { get; set; }
- public TransactionInvoiceInfo(AuthenticatedRequest request)
- {
- this.Request = request;
- }
+ public class TransactionInvoiceInfo
+ {
+ internal AuthenticatedRequest Request { get; set; }
+ internal TransactionInvoiceInfoBase TransactionInvoiceInfoBase { get; set; }
+ public TransactionInvoiceInfo(AuthenticatedRequest request)
+ {
+ this.Request = request;
+ }
- public ConfiguredTransactionInvoiceInfo SpecificInvoiceInfo(string transactionKey)
- {
- this.Request.Request.Endpoint += $"{Constants.Settings.GatewaySettings.TransactionRequestEndPoint}" +
- $"{Constants.Settings.GatewaySettings.InvoiceInfoEndPoint}" +
- $"{transactionKey}";
+ public ConfiguredTransactionInvoiceInfo SpecificInvoiceInfo(string transactionKey)
+ {
+ this.Request.Request.Endpoint += $"{Constants.Settings.GatewaySettings.TransactionRequestEndPoint}" +
+ $"{Constants.Settings.GatewaySettings.InvoiceInfoEndPoint}" +
+ $"{transactionKey}";
- return new ConfiguredTransactionInvoiceInfo(this);
- }
+ return new ConfiguredTransactionInvoiceInfo(this);
+ }
- public ConfiguredTransactionInvoiceInfo MultipleInvoicesInfo(TransactionInvoiceInfoBase transactionInvoiceInfoBase)
- {
- this.Request.Request.Endpoint += $"{Constants.Settings.GatewaySettings.TransactionRequestEndPoint}" +
- $"{Constants.Settings.GatewaySettings.InvoiceInfosEndPoint}";
+ public ConfiguredTransactionInvoiceInfo MultipleInvoicesInfo(TransactionInvoiceInfoBase transactionInvoiceInfoBase)
+ {
+ this.Request.Request.Endpoint += $"{Constants.Settings.GatewaySettings.TransactionRequestEndPoint}" +
+ $"{Constants.Settings.GatewaySettings.InvoiceInfosEndPoint}";
this.TransactionInvoiceInfoBase = transactionInvoiceInfoBase;
- return new ConfiguredTransactionInvoiceInfo(this);
- }
+ return new ConfiguredTransactionInvoiceInfo(this);
+ }
- }
+ }
}
diff --git a/BuckarooSdk/Transaction/RefundInfo/TransactionRefundInfo.cs b/BuckarooSdk/Transaction/RefundInfo/TransactionRefundInfo.cs
index 50dbf70..863db95 100644
--- a/BuckarooSdk/Transaction/RefundInfo/TransactionRefundInfo.cs
+++ b/BuckarooSdk/Transaction/RefundInfo/TransactionRefundInfo.cs
@@ -1,34 +1,38 @@
-using BuckarooSdk.Base;
+using System;
+using BuckarooSdk.Base;
using BuckarooSdk.DataTypes.RequestBases;
namespace BuckarooSdk.Transaction.RefundInfo
{
- public class TransactionRefundInfo
- {
- internal AuthenticatedRequest AuthenticatedRequest { get; set; }
- internal TransactionRefundInfoBase TransactionRefundInfoBase { get; set; }
+ public class TransactionRefundInfo
+ {
+ internal AuthenticatedRequest AuthenticatedRequest { get; set; }
- public TransactionRefundInfo(AuthenticatedRequest request)
- {
- this.AuthenticatedRequest = request;
- }
+ internal TransactionRefundInfoBase TransactionRefundInfoBase { get; set; }
- public ConfiguredTransactionRefundInfo SpecificConfiguredTransactionRefundInfo(string transactionKey)
- {
- this.AuthenticatedRequest.Request.Endpoint += ($"{Constants.Settings.GatewaySettings.TransactionRequestEndPoint}" +
- $"{Constants.Settings.GatewaySettings.RefundInfoEndPoint}" +
- $"{transactionKey}");
+ public TransactionRefundInfo(AuthenticatedRequest request)
+ {
+ AuthenticatedRequest = request;
+ }
- return new ConfiguredTransactionRefundInfo(this);
- }
+ public ConfiguredTransactionRefundInfo SpecificConfiguredTransactionRefundInfo(string transactionKey)
+ {
+ AuthenticatedRequest.Request.Endpoint += $"{Constants.Settings.GatewaySettings.TransactionRequestEndPoint}{Constants.Settings.GatewaySettings.RefundInfoEndPoint}{transactionKey}";
- public ConfiguredTransactionRefundInfo MultipleConfiguredTransactionRefundInfo(
- TransactionRefundInfoBase transactionRefundInfoBase)
- {
- this.AuthenticatedRequest.Request.Endpoint += ($"{Constants.Settings.GatewaySettings.TransactionRequestEndPoint}" +
- $"{Constants.Settings.GatewaySettings.RefundInfosEndPoint}");
+ return new ConfiguredTransactionRefundInfo(this);
+ }
+
+ public ConfiguredTransactionRefundInfo MultipleConfiguredTransactionRefundInfo()
+ {
+ AuthenticatedRequest.Request.Endpoint += $"{Constants.Settings.GatewaySettings.TransactionRequestEndPoint}{Constants.Settings.GatewaySettings.RefundInfosEndPoint}";
- return new ConfiguredTransactionRefundInfo(this);
- }
- }
+ return new ConfiguredTransactionRefundInfo(this);
+ }
+
+ [Obsolete("Parameter transactionRefundInfoBase is no longer needed.")]
+ public ConfiguredTransactionRefundInfo MultipleConfiguredTransactionRefundInfo(TransactionRefundInfoBase transactionRefundInfoBase)
+ {
+ return MultipleConfiguredTransactionRefundInfo();
+ }
+ }
}
diff --git a/BuckarooSdk/Transaction/Status/ConfiguredTransactionStatus.cs b/BuckarooSdk/Transaction/Status/ConfiguredTransactionStatus.cs
index 00c7185..900642e 100644
--- a/BuckarooSdk/Transaction/Status/ConfiguredTransactionStatus.cs
+++ b/BuckarooSdk/Transaction/Status/ConfiguredTransactionStatus.cs
@@ -1,41 +1,33 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
using BuckarooSdk.DataTypes;
using BuckarooSdk.DataTypes.RequestBases;
using BuckarooSdk.DataTypes.Response.StatusRequest;
namespace BuckarooSdk.Transaction.Status
{
- public class ConfiguredTransactionStatus
- {
- internal TransactionStatus TransactionStatus { get; set; }
- internal TransactionReference TransactionReference { get; set; }
+ public class ConfiguredTransactionStatus
+ {
+ internal TransactionStatus TransactionStatus { get; set; }
+ internal TransactionReference TransactionReference { get; set; }
- internal ConfiguredTransactionStatus(TransactionStatus transactionStatus)
- {
- this.TransactionStatus = transactionStatus;
- const string qwe = "";
+ internal ConfiguredTransactionStatus(TransactionStatus transactionStatus)
+ {
+ TransactionStatus = transactionStatus;
+ }
- var list = new List();
- var list2 = list.ToList();
- }
-
+ public StatusesRequestResponse GetMultipleStatuses()
+ {
+ if (TransactionStatus.Request.Request == null)
+ {
+ throw new Exception("This function is a POST method and should therefore contain a message body");
+ }
- public StatusesRequestResponse GetMultipleStatuses()
- {
- if (this.TransactionStatus.Request.Request == null)
- {
- throw new Exception("This function is a POST method and should therefore contain a message body");
- }
- return Connection.Connector.SendRequest
- (this.TransactionStatus.Request.Request, this.TransactionStatus.TransactionStatusBase, HttpRequestType.Post).Result;
- }
+ return Connection.Connector.SendRequest(TransactionStatus.Request.Request, TransactionStatus.TransactionStatusBase, HttpRequestType.Post).Result;
+ }
- public DataTypes.Response.StatusRequest.TransactionStatus GetSingleStatus()
- {
- return Connection.Connector.SendRequest
- (this.TransactionStatus.Request.Request, this.TransactionStatus.TransactionStatusBase, HttpRequestType.Get).Result;
- }
- }
+ public DataTypes.Response.StatusRequest.TransactionStatus GetSingleStatus()
+ {
+ return Connection.Connector.SendRequest(TransactionStatus.Request.Request, TransactionStatus.TransactionStatusBase, HttpRequestType.Get).Result;
+ }
+ }
}
diff --git a/BuckarooSdk/Transaction/TransactionRequest.cs b/BuckarooSdk/Transaction/TransactionRequest.cs
index 13cb9b9..9021081 100644
--- a/BuckarooSdk/Transaction/TransactionRequest.cs
+++ b/BuckarooSdk/Transaction/TransactionRequest.cs
@@ -5,34 +5,34 @@
namespace BuckarooSdk.Transaction
{
- ///
- /// The actual transaction, that can only be obtained by defining a transaction request.
- ///
+ ///
+ /// The actual transaction, that can only be obtained by defining a transaction request.
+ ///
public class TransactionRequest
- {
+ {
internal AuthenticatedRequest AuthenticatedRequest { get; set; }
- ///
- /// The base transaction info
- ///
+ ///
+ /// The base transaction info
+ ///
internal TransactionBase TransactionBase { get; private set; }
- ///
- /// Setter for the basic fields of the transaction.
- ///
- ///
- /// A configured transaction
+ ///
+ /// Setter for the basic fields of the transaction.
+ ///
+ ///
+ /// A configured transaction
public ConfiguredTransaction SetBasicFields(TransactionBase basicFields)
{
this.TransactionBase = basicFields;
return new ConfiguredTransaction(this);
}
- ///
- /// Primary constructor
- ///
- ///
- internal TransactionRequest(AuthenticatedRequest authenticatedRequest)
+ ///
+ /// Primary constructor
+ ///
+ ///
+ internal TransactionRequest(AuthenticatedRequest authenticatedRequest)
{
authenticatedRequest.Request.Endpoint = Constants.Settings.GatewaySettings.TransactionRequestEndPoint;
this.AuthenticatedRequest = authenticatedRequest;
@@ -52,18 +52,18 @@ internal void AddService(string serviceName, List parameters,
this.TransactionBase.Services.ServiceList.Add(service);
}
- internal void AddAdditionalService(string serviceName, List parameters, string action, string version = "1")
- {
- var service = new Service()
- {
- Name = serviceName,
- Action = action,
- Version = version,
- Parameters = parameters
- };
+ internal void AddAdditionalService(string serviceName, List parameters, string action, string version = "1")
+ {
+ var service = new Service()
+ {
+ Name = serviceName,
+ Action = action,
+ Version = version,
+ Parameters = parameters
+ };
- this.TransactionBase.Services.ServiceList.Add(service);
- }
- #endregion
- }
+ this.TransactionBase.Services.ServiceList.Add(service);
+ }
+ #endregion
+ }
}