MultiSafepay/.Net

Possibility to set MultiSafepayClient to test api

Closed this issue · 3 comments

I would suggest adding a property to MultiSafepayClient so that it is easy to switch between test and live api, without having to provide the api url manually.

I have passed on this request to our .NET developer.
DNTMINT-14

Sorry for Late answer, maybe is not relevant anymore, but I point out a usage example in case helps so someone else.
As an example in "Integration Tests" https://github.com/MultiSafepay/.Net/tree/master/Tests/MultiSafepay.IntegrationTests
This can be handled by App.config see

var url = ConfigurationManager.AppSettings["MultiSafepayAPI"];
var apiKey = ConfigurationManager.AppSettings["MultiSafepayAPIKey"];
var client = new MultiSafepayClient(apiKey, url);

This solutions is indeed the one we allready used. But this requires providing the api url manually, where it would be a lot more practical to simply have a test flag to switch from live to test.