going to add confirm-transaction endpoint and cleanup with .gitignore
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection.Metadata;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@@ -242,9 +243,22 @@ namespace Creditcall.ChipDna.Client
|
||||
Response response = chipDnaClientLib.StartTransaction(parameters);
|
||||
|
||||
string errors;
|
||||
if (response.GetValue(ParameterKeys.Errors, out errors))
|
||||
if (response.GetValue(ParameterKeys.Errors, out errors) && !string.IsNullOrEmpty(errors))
|
||||
{
|
||||
var result = new Dictionary<string, string>
|
||||
{
|
||||
{ "ERROR", errors },
|
||||
{ "REFERENCE", reference },
|
||||
{ "TRANSACTION_RESULT", "ERROR" }
|
||||
};
|
||||
|
||||
if (TransactionCompletionSource != null && !TransactionCompletionSource.Task.IsCompleted)
|
||||
{
|
||||
TransactionCompletionSource.TrySetResult(result);
|
||||
}
|
||||
|
||||
Console.WriteLine(ErrorsString("StartTransaction Errors", errors));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -621,7 +635,7 @@ namespace Creditcall.ChipDna.Client
|
||||
}
|
||||
}
|
||||
|
||||
private void PerformConfirmTransaction()
|
||||
public void PerformConfirmTransaction()
|
||||
{
|
||||
var reference = GetReference(true, "");
|
||||
var amount = GetAmount(false);
|
||||
|
||||
Reference in New Issue
Block a user