Yup. Unusual, it is.<br>
<br>
But thats how their string specification syntax is. It includes a ^ at the end.<br>
<br><br><div class="gmail_quote">On Tue, Mar 31, 2009 at 6:13 PM, andrew cooke <span dir="ltr"><<a href="mailto:andrew@acooke.org">andrew@acooke.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
have you printed msg and checked it is formatted correctly? i have node<br>
idea what the protocol is, but your use of join and string concatenation<br>
in the generation of msg looks unusual to me.<br>
<br>
andrew<br>
<div><div></div><div class="h5"><br>
Lakshman wrote:<br>
> I am trying to integrate Authorize.net SIM API into django views.<br>
><br>
> I am facing a problem in the fingerprint generation. I am repeatedly<br>
> getting that the fingerprint generated doesn't match the one the<br>
> server generates.<br>
><br>
> I have generated the md5 hash with the key provided as specified in<br>
> the SIM documentation.<br>
><br>
> Here is the code:<br>
><br>
> params = {<br>
> 'x_login' : '4ffrBT36La',<br>
> 'x_amount' : '100.00',<br>
> 'x_show_form' : 'PAYMENT_FORM',<br>
> 'x_type' : 'AUTH_CAPTURE',<br>
> 'x_method' : 'CC',<br>
> 'x_fp_sequence' : '123',<br>
> 'x_version' : '3.1',<br>
> 'x_relay_response' : 'FALSE',<br>
> }<br>
> params['x_fp_timestamp'] = int(time.time())<br>
><br>
> msg = '^'.join([params['x_login'],<br>
> str(params['x_fp_sequence']),<br>
> str(params['x_fp_timestamp']),<br>
> str(params['x_amount'])<br>
> ])+'^'<br>
><br>
> fingerprint = hmac.new('9LyEU8t87h9Hj49Y',msg).hexdigest()<br>
><br>
><br>
> I would be glad if some one that has dealt with this earlier, points<br>
> out what the glitch is. Thanks in advance.<br>
</div></div>> --<br>
> <a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
><br>
><br>
<br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>Regards,<br>Lakshman<br><a href="http://becomingguru.com">becomingguru.com</a><br><a href="http://lakshmanprasad.com">lakshmanprasad.com</a><br>