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

Error when including both issuer and pricing. #119

Closed
martijnmelchers opened this issue Apr 14, 2019 · 0 comments
Closed

Error when including both issuer and pricing. #119

martijnmelchers opened this issue Apr 14, 2019 · 0 comments

Comments

@martijnmelchers
Copy link

When using the method GetPaymentMethodListAsync() the function gives an error when you both request the issuers and the pricing.

The following error appears:

ArgumentException: An item with the same key has already been added. Key: include
System.Collections.Generic.Dictionary<TKey, TValue>.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
Mollie.Api.Client.PaymentMethodClient.AddIncludeParameters(Dictionary<string, string> parameters, Nullable<bool> includeIssuers, Nullable<bool> includePricing)
Mollie.Api.Client.PaymentMethodClient.GetPaymentMethodListAsync(Nullable<SequenceType> sequenceType, string locale, Amount amount, Nullable<bool> includeIssuers, Nullable<bool> includePricing, string profileId, Nullable<bool> testmode)
BracketDevelopment.Controllers.MollieController.GetMethods() in MollieController.cs
+
            ListResponse<PaymentMethodResponse> paymentMethodList = await _paymentMethodClient.GetPaymentMethodListAsync(Mollie.Api.Models.Payment.SequenceType.OneOff, "nl_NL", null, true, true);
lambda_method(Closure , object )
Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable+Awaiter.GetResult()
Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor+AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, object controller, object[] arguments)
System.Threading.Tasks.ValueTask<TResult>.get_Result()
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync()
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync()
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
Microsoft.AspNetCore.Routing.EndpointMiddleware.Invoke(HttpContext httpContext)
Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.Invoke(HttpContext httpContext)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

This is because it adds the "include" key and doesn't append to it.

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

1 participant