swish-api-csharp icon indicating copy to clipboard operation
swish-api-csharp copied to clipboard

Path to certificate file doesn't work on Linux (WSL)

Open izaxon opened this issue 2 years ago • 1 comments

The path now contains backslashes (). This only works on Windows, but not on Linux. It is proposed to use System.IO.Path.Combine() on line 17 in Program.cs (project SwishApiConsoleTest)..

string certificatePath = Path.Combine(Environment.CurrentDirectory, "TestCert", "Swish_Merchant_TestCertificate_1234679304.p12");

izaxon avatar Jul 12 '22 17:07 izaxon

ok, looking into it

RickardPettersson avatar Jul 12 '22 18:07 RickardPettersson

I have now updated the code and the NuGet package version 2.0 is on the way, Microsoft doing stuff with the package before it come available public but the code is in this repository from now.

RickardPettersson avatar Sep 22 '22 16:09 RickardPettersson

I missed to say that there is in the new clients like eCommerceClient you can now have parameter for the ClientCertificate where you can put a stream so you can use your own code to get the certificate how you like and then make it as a Stream to the library to read.

RickardPettersson avatar Sep 22 '22 16:09 RickardPettersson