TwoCheckout System.ArgumentNullException : Value cannot be null Parameter name: s

↘锁芯ラ 提交于 2019-12-12 03:28:51

问题


I'm trying to integrate my code with 2checkout payment SDK available here: https://github.com/2Checkout/2checkout-dotnet

This below code throws the following error:

System.ArgumentNullException : Value cannot be null. Parameter name: s

[Test]
public void _004_TestSaleStop()
{

    TwoCheckoutConfig.ApiUsername = "username";
    TwoCheckoutConfig.ApiPassword = "password";
    TwoCheckoutConfig.Sandbox = true;


    try
    {

        var ServiceObject = new SaleService();
        var ArgsObject = new SaleStopServiceOptions();
        ArgsObject.sale_id = 9093729066354;
        var result = ServiceObject.Stop(ArgsObject);
        Assert.IsInstanceOf<TwoCheckoutResponse>(result);
    }
    catch (TwoCheckoutException e)
    {
        Assert.IsInstanceOf<TwoCheckoutException>(e);
    }
}

The error is internal to their code, so it's hard to know why this is thrown.

I've seen some articles suggest that the ASP.NET process does not have write permission. So I right-clicked the solution and added "IIS_IUSRS" with all perms. This doesn't help either.

Any help would be greatly appreciated.


回答1:


i also got the same error.

then i created new project and everything working fine now.



来源:https://stackoverflow.com/questions/36640280/twocheckout-system-argumentnullexception-value-cannot-be-null-parameter-name

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!