move 

```c#
param.Add ("signature", "");
```

after

```c#
String querystring = buildComplexQuery(param) + shared_secret;
```

by doing so you can remove 

```c#
if (entry.Key != "signature")
```

when iterating through the params dictionary later