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

TestApplication does not work #33

Open
Abrissirba opened this issue Feb 13, 2025 · 1 comment
Open

TestApplication does not work #33

Abrissirba opened this issue Feb 13, 2025 · 1 comment

Comments

@Abrissirba
Copy link

I am trying the test appliation and can't get it to work. I just cloned the repo and started the test application. It seems to be related to the certificates but I am not sure.

Has anyone else the same problem with the Merchant Swish Simulator environment?

Running on Windows 11d. Stack strace below

MakePaymentRequest - ERROR: System.AggregateException: One or more errors occurred. (An error occurred while sending the request.)
 ---> System.Net.Http.HttpRequestException: An error occurred while sending the request.
 ---> System.IO.IOException: The decryption operation failed, see inner exception.
 ---> System.ComponentModel.Win32Exception (0x80090326): The message received was unexpected or badly formatted.
   --- End of inner exception stack trace ---
   at System.Net.Security.SslStream.ReadAsyncInternal[TIOAdapter](Memory`1 buffer, CancellationToken cancellationToken)
   at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
   at System.Net.Http.HttpConnection.InitialFillAsync(Boolean async)
   at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at SwishApi.LoggingHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in A:\Kombispel\swish-api-csharp\SwishApi\LoggingHandler.cs:line 32
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at SwishApi.ECommerceClient.MakePaymentRequest(String swishNumberToPay, Decimal amount, String message, String instructionUUID) in A:\Kombispel\swish-api-csharp\SwishApi\ECommerceClient.cs:line 117
@Abrissirba
Copy link
Author

I managed to get it to work by changing UseMachineKeySet to false which will add the CA certificates to the Certificate Store. However, I am not sure if this will work in a linux container app running in Azure. Will investigate further

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