Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with BarionClient.ExecuteAsync - Error converting value "BankTransfer" #11

Open
Msirkovsky opened this issue Mar 16, 2021 · 3 comments

Comments

@Msirkovsky
Copy link

Hello,

I have a problem with BarionClient version 2.0.0.6.
After checking payment state using the code:

var getPaymentState = new GetPaymentStateOperation
{
PaymentId = paymentId;
}
using var barionClient = new BarionClient(barionSetting);
var result = await barionClient.ExecuteAsync(getPaymentState);

I get the error:

Newtonsoft.Json.JsonSerializationException: Error converting value \"BankTransfer\" to type 'System.Nullable`1[BarionClientLibrary.Operations.Common.FundingSourceType]'. Path 'FundingSource', line 1, position 318. 
 ---> System.ArgumentException: Requested value 'BankTransfer' was not found.\r\n at 

 Newtonsoft.Json.Utilities.EnumUtils.ParseEnum(Type enumType, String value, Boolean disallowNumber)\r\n at 
 Newtonsoft.Json.Converters.StringEnumConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)\r\n   
   --- End of inner exception stack trace ---\r\n at 
   Newtonsoft.Json.Converters.StringEnumConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)\r\n at 
   Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)\r\n  at 
   Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)\r\n at 
   Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)\r\n at 
   Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)\r\n at 
   Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)\r\n at 
   Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)\r\n at 
   Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)\r\n at 
   Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)\r\n at 
   BarionClientLibrary.BarionClient.CreateResultFromResponseMessage(HttpResponseMessage responseMessage, BarionOperation operation)\r\n at BarionClientLibrary.BarionClient.SendWithRetry(BarionOperation operation, CancellationToken cancellationToken)\r\n at 
   BarionClientLibrary.BarionClient.ExecuteAsync(BarionOperation operation, CancellationToken cancellationToken)\r\n at 
   BarionClientLibrary.BarionClient.ExecuteAsync(BarionOperation operation)\r\n at 

Could you please look into it? Thank you.

Marek

@martonx
Copy link
Collaborator

martonx commented Jun 9, 2022

uh, this is my issue too!

@martonx
Copy link
Collaborator

martonx commented Jun 12, 2022

I started a PR for this fix. #13 please merge it into master!

@martonx
Copy link
Collaborator

martonx commented Nov 5, 2022

Hey, I finally finished the forked Barion .Net SDK v2. https://github.com/martonx/barion-dotnet-v2
It solved bank transfer issue, finally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants