sveawebpay / dotnet-integration

SDK for Sveas standalone payment methods
Other
5 stars 14 forks source link

Invalid url when using HostedAdmin, SveaConfig.GetProdHostedAdminUrl() and QueryByCustomerRefNo #31

Closed henkish closed 6 years ago

henkish commented 7 years ago
var hostedAdmin = new HostedAdmin(config, countryCode);
var request = hostedAdmin.Query(new QueryByCustomerRefNo(orderId));
var sveaResponse = request.DoRequest<QueryResponse>();

When config.GetEndPoint() implementation returns SveaConfig.GetProdHostedAdminUrl() - the URL that gets queried is /rest/rest

henkish commented 7 years ago
public string GetEndPoint(PaymentType type)
{
    return _testMode 
        ? SveaConfig.GetTestPayPageUrl().Replace("/rest", "") 
        : SveaConfig.GetProdHostedAdminUrl().Replace("/rest", "");
}

Works, but is a hack

fre-sund commented 6 years ago

Fixed in https://github.com/sveawebpay/dotnet-integration/releases/tag/1.0.8

Thanks for the report!