Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Thu, 29 May 2008 12:57:12 -0700,    group: microsoft.public.dotnet.framework.aspnet.announcements        back       


Please help with authorize.net SIM in ASP.net   
Does anyone have any experience using Authorize.net SIM in ASP.net?  I
downloaded their classic ASP example and after some work finally got it
to hit their site.  But it kept returning error 103 which indicates
something wrong with the fingerprint or transaction id.  I used the
login and transaction id they gave me when I set up the test user
account.  So I emailed them for help but no response after a week.  I
tried my exact same code again and this time error 97 which they say
indicates the transaction id is no longer valid.  What?  It says that
transaction ids only last for so long.  This is supposed to be a test
one.  Does that mean I need to get a new one?  I have heard nothing from
Authorize.net.   I'm pretty disappointed in their lack of support.  Does
anyone have an suggestions?  


Thanks,
Jennifer

*** Sent via Developersdex http://www.developersdex.com ***
date: Thu, 29 May 2008 12:57:12 -0700   author:   jmorgret

Re:Please help with authorize.net SIM in ASP.net   
Here are some functions that I wrote to make it work...

'call this function to get the fingerprint.
'Parameters are SequenceNumber, UTC, and Total Amount
'The API Login is assumed to be in the web.config
Public Shared Function GetFingerPrint(ByVal SequenceNumber As Integer, ByVal 
UTCDate As String, ByVal TotalAmount As String) As String
        Dim _APILogin As String = ConfigurationManager.AppSettings("API 
Login")
        Dim _UTC As String = GetUTC.ToString

        Dim _FPString As String = GenerateFingerPrint(_APILogin & "^" & 
SequenceNumber.ToString & "^" & UTCDate & "^" & TotalAmount & "^")

        Return _FPString
End Function

Private Shared Function GenerateFingerPrint(ByVal StringValue As String) As 
String
'The encoding type must be ASCII if reading from the web.config
        Dim _Key() As Byte = Encoding.ASCII.GetBytes(ConfigurationManager.
AppSettings("Transaction Key"))
        Dim _StringToHash() As Byte = Encoding.ASCII.GetBytes(StringValue)
        Dim _HMAC_MD5 As New System.Security.Cryptography.HMACMD5(_Key)
        Dim _HashedString() As Byte = _HMAC_MD5.ComputeHash(_StringToHash)
'Convert the byte array back into a string...
        Dim _return As String = System.BitConverter.ToString(_HashedString)

'The bitconverter returns the string with "-" between the byte elements.  
example: C9-85-92-44....
        Return _return.Replace("-", "")
End Function

'This is a simple function to get the UTC in seconds
Public Shared Function GetUTC() As Integer
        Dim _TimeSpan As TimeSpan = (Now.ToUniversalTime - Date.
Parse("1/1/1970"))

        Return _TimeSpan.TotalSeconds
End Function

I hope this helps...

url:http://www.ureader.com/msg/1418433.aspx
date: Tue, 3 Jun 2008 11:35:47 +0800   author:   Michael Heckman

Re:Please help with authorize.net SIM in ASP.net   
Hi Jennifer ,
 Please guide me how to integrate Authrize.net (SIM) into asp.net 2.0 (C#)... 
It will be great helpfull for me .... 

Thanks in advance..
Deepak.C.G


"jmorgret" wrote:

> Michael,
> Thanks for your response.
> 
> Please forgive my ignorance if this is obvious.  I am used to working
> with just VB.net and ASP.net so I am not that familiar with html
> controls and javascript but what do you do with your fingerprint after
> you generate it.  Don't you have to set the value of the hidden input
> control to the fingerprint?  I'm not sure how to go about this.  
> 
> Also, you have _UTC but it is never used anywhere.  Did you mean for it
> to be used in _FPString instead of UTCDate?
> 
> Thanks for any help you can give.  I have gotten zero response from
> authorize.net.
> 
> -Jennifer
> 
> 
> 
> *** Sent via Developersdex http://www.developersdex.com ***
>
date: Fri, 27 Jun 2008 02:55:00 -0700   author:   Deepak CG Deepak

Re: Re:Please help with authorize.net SIM in ASP.net   
Ask again here news://microsoft.public.dotnet.languages.csharp and/or here 
news://microsoft.public.dotnet.general



"Deepak CG" <Deepak CG@discussions.microsoft.com> wrote in message 
news:7204A568-2E51-493C-9B79-D71990B0320A@microsoft.com...
> Hi Jennifer ,
> Please guide me how to integrate Authrize.net (SIM) into asp.net 2.0 
> (C#)...
> It will be great helpfull for me ....
>
> Thanks in advance..
> Deepak.C.G
>
>
> "jmorgret" wrote:
>
>> Michael,
>> Thanks for your response.
>>
>> Please forgive my ignorance if this is obvious.  I am used to working
>> with just VB.net and ASP.net so I am not that familiar with html
>> controls and javascript but what do you do with your fingerprint after
>> you generate it.  Don't you have to set the value of the hidden input
>> control to the fingerprint?  I'm not sure how to go about this.
>>
>> Also, you have _UTC but it is never used anywhere.  Did you mean for it
>> to be used in _FPString instead of UTCDate?
>>
>> Thanks for any help you can give.  I have gotten zero response from
>> authorize.net.
>>
>> -Jennifer
>>
>>
>>
>> *** Sent via Developersdex http://www.developersdex.com ***
>>
date: Fri, 27 Jun 2008 11:41:23 -0500   author:   clintonG

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us