المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : LRC calculation... What did I miss?



C# Programming
11-09-2009, 02:32 AM
I need to get the LRC (longitudinal redundancy check) value of a string. This data is being sent to a credit card processing network over SSL. After I get the LRC I am coverting it to string, then to a byte, and adding it to the end of a byte[] to send through SSL. When I send the transaction I am getting a NAK response to my LRC. What am I doing wrong?

I have tried this

RequestMessage contains Message+ETX only
public static char ReturnLRC(string RequestMessage)
{
int lrcAnswer = 0;
for (int i = 0; i <span class="code-keyword">