RickardPettersson / swish-api-csharp

Swish For Merchant API Client .Net Standard Library
MIT License
28 stars 13 forks source link

Load payouts certificate as stream does not work #21

Closed ludvigbartholdsson closed 1 year ago

ludvigbartholdsson commented 1 year ago

ClientCertificate looks like this:

       var clientCertificate = new SwishApi.Models.ClientCertificate()
        {
            CertificateAsStream = ms,
            Password = "password"
        };

I always get: No Signing Certificate found!

I tried to trace your code:

MakePayoutsRequest run: https://github.com/RickardPettersson/swish-api-csharp/blob/0cfde537722bffb9c6d58c3e9665c5231adb4f0d/SwishApi/Models/PayoutRequestEnvelope.cs#L47

In the function you run: https://github.com/RickardPettersson/swish-api-csharp/blob/0cfde537722bffb9c6d58c3e9665c5231adb4f0d/SwishApi/Models/PayoutRequestEnvelope.cs#L49

With signingCertificate.CertificateFilePath. You never use CertificateAsStream.

RickardPettersson commented 1 year ago

Code fix pushed and new nuget uploaded waiting for approval so check for nuget version 2.0.3 in a hour or something