When using the NVP Client and passing in values which are not strings the client successfully processes the transactions fine. If you enable logging then the logger fails with a type conversion error:
"Unable to cast object of type 'System.Double' to type 'System.String'."
StackTrace " at CyberSource.Base.Logger.GetLogString(MessageType type, Hashtable table)\r\n at CyberSource.Base.Logger.LogRequest(Hashtable request, Boolean demo)\r\n at CyberSource.Clients.NVPClient.RunTransaction(Configuration config, Hashtable request)\r\n
To reproduce this change the following line in the NVPSample.cs
request.Add( "item_0_unitPrice", "12.34" );
to
request.Add( "item_0_unitPrice", 12.34);
And enable logging in the config:
I would have expected either the transaction to fail when passing in non-string values OR the logger to succeed when passing in non-string values.