Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object reference not set to an instance of an object. at Kount.Ris.Request.GetResponse(Boolean validate) in ...\kount-ris-dotnet-sdk-7.0.0\SDK\Kount\Ris\Request.cs:line 175 #11

Open
Foozinator opened this issue Jan 9, 2018 · 2 comments

Comments

@Foozinator
Copy link

Foozinator commented Jan 9, 2018

This exception we're seeing in production is difficult to reproduce, but it looks like some of our inputs into the SDK are binding a null value. The SDK doesn't check this and blindly attempts to convert it to a string. I suggest some simple boilerplate:

`// boilerplate value
string value = ( param.Key != null )
? param.Key.ToString()
: string.Empty;

post = post + HttpUtility.UrlEncode( param.Key.ToString() ) +
"=" + HttpUtility.UrlEncode( value ) + "&";

if ( param.Key.ToString().Equals( "PTOK" ) )
{
value = "payment token hidden";
}`

@sveneyem
Copy link
Contributor

Thanks for the good feedback - going to work with the devs to see what we can do!

@boyankukushev
Copy link
Contributor

Null values check added, commit 1fbed3c tagged as 7.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants