Re: [BULK] Re: [WebDNA] Authorize.net SIM, Server Integration Method

This WebDNA talk-list message is from

2011


It keeps the original formatting.
numero = 106602
interpreted = N
texte = Actually, I've always wanted to know if its possible to do hash encodings with webDNA. I know you can do base64 (which is all you need for some types of authentication), but I haven't seen hash. I've sometimes used AJAX to return hash encodings that are generated by PHP scripts to then bring back into a webDNA tcp send. (I would prefer not to) Anyway Marc, I think everyone else here is spot on and has provided fabulous code. You're likely to find plenty of perl, ruby, and php scripts for these types of things, but I've been able to use webDNA with most mainstream APIs such as what's provided by Google and Amazon with fairly simple coding. In fact (as you might expect), MUCH simpler than any other language. Authorize.net is even easier to work with relative to say the Google Calendar data API. I haven't worked with perl before, but your code seems like its more complex than need be. I would suggest using the "tried-and-true" and work out your own custom forms to do what you want using the scripts that have been provided, they work. On 5/5/11 8:16 PM, Terry Wilson wrote: > I don't know about that hash stuff; it always confused me. The method > we're showing you doesn't require it. Maybe that's why we do it with a > tcpconnect and tcpsend? > > > > > > On Thu, 05 May 2011 18:14:01 -0600 > Marc Thompson wrote: > Thanks for the input. I'm getting close, just hung up on a small > detail I think? > I an going to be using the SIM (Server Intergration Method) and as > such won't be collecting credit card info from the user. > Also, it says in the documentation that the following fields are > required: > x_fp_hash > x_fp_sequence > x_fp_timestamp > > Not sure if I'm doing these correctly though? Here's what I've got: > [text]timestamp=[shell]/usr/bin/perl -e 'printf "%d", > time;'[/shell][/text] > [text]timestamp=[grep > search==[^0-9]&replace=][timestamp][/grep][/text] > [writefile temp]MYLOGINID^[SKU]^[timestamp]^[amount][/writefile] > [shell]digest -v -a md5 temp > stdout[/shell] > [text]hash=[GetChars start=14][INCLUDE file=stdout][/GetChars][/text] > [text show=t]hash=[grep > search=[^A-Za-z0-9]&replace=][hash][/grep][/text] > > x_fp_hash=[hash] > x_fp_sequence=[SKU] > x_fp_timestamp=[timestamp] > > I'm getting a response code of 99: > "Applicable only to SIM API. The server-generated fingerprint does > not match the merchant-specified fingerprint in the x_fp_hash field." > > So it's either the timestamp or the md5 hash????? > > Marc > > On 5/5/2011 4:20 PM, Terry Wilson wrote: >> Okay, here's mine (the first part is like Scott's). The values are >> pulled from the form the customer fills out, and I left out the code >> you'd put in later on the page when the sale goes through, like >> confirmation emails. This also shows how you parse out the results >> like the AVS code; it took some playing around to figure out which >> 'words' were which. This is one of several versions for different >> sites that are all patterned after the same idea, just some >> differences depending on the form submitted. >> >> [text]content=x_version=3.0&[!] >> [/!]x_Test_Request=[x_Test_Request]&[!] >> [/!]x_Method=CC&[!] >> [/!]x_Tran_Key=XdZwd1nZJqKVTwmV&[!] >> [/!]x_login=lecyt5m&[!] >> [/!]x_Type=AUTH_CAPTURE&[!] >> [/!]x_First_Name=[ccname]&[!] >> [/!]x_Last_Name=[ccname]&[!] >> [/!]x_email=[email]&[!] >> [/!]x_Phone=[phone]&[!] >> [/!]x_Address=[Address]&[!] >> [/!]x_City=[City]&[!] >> [/!]x_State=[State]&[!] >> [/!]x_Zip=[Zip]&[!] >> [/!]x_Country=[Country]&[!] >> [/!]x_amount=[price]&[!] >> [/!]x_CARD_NUM=[cc]&[!] >> [/!]x_Exp_Date=[expMonth][ExpYear]&[!] >> [/!]x_ADC_Relay_Response=FALSE&[!] >> [/!]x_Cust_ID=[id]&[!] >> [/!]x_Invoice_Num=[invoice]&[!] >> [/!]x_Description=[plan]&[!] >> [/!]x_ADC_URL=FALSE&[!] >> [/!]x_Delim_Data=TRUE&[!] >> [/!]x_ADC_Delim_Character=|[/text] >> >> [text]response=[tcpconnect host=secure.authorize.net&port=443&ssl=T][!] >> [/!][tcpsend]POST /gateway/transact.dll HTTP/1.0[UnURL]%0D%0A[/UnURL][!] >> [/!]User-Agent: StoreBuilder[UnURL]%0D%0A[/UnURL][!] >> [/!]Content-type: >> application/x-www-form-urlencoded[UnURL]%0D%0A[/UnURL][!] >> [/!]Content-length: >> [CountChars][content][/CountChars][UnURL]%0D%0A[/UnURL][!] >> [/!][UnURL]%0D%0A[/UnURL][!] >> [/!][content][UnURL]%0D%0A[/UnURL][!] >> [/!][/TCPSend][/tcpconnect][/text] >> >> [text]response=[unurl][middle >> startafter=[url]%0D%0A%0D%0A[/url]&endbefore=][url][response][/url][/middle][/unurl][/text] >> >> >> [text multi=t][listwords words=[response]&delimiters=|][!] >> [/!][showif [index]=1]an_Response=[showif >> [word]=1]Approved[/showif][showif [word]=2]Declined[/showif][showif >> [word]=3]Error[/showif][/showif][!] >> [/!][showif [index]=2]&an_SubCode=[word][/showif][!] >> [/!][showif [index]=3]&an_ReasonCode=[word][/showif][!] >> [/!][showif [index]=4]&an_ReasonText=[word][/showif][!] >> [/!][showif [index]=5]&an_ApprovalCode=[word][/showif][!] >> [/!][showif [index]=6]&an_AVS=[word][/showif][!] >> [/!][showif [index]=7]&an_TransID=[word][/showif][!] >> [/!][showif [index]=10]&an_amount=[word][/showif][!] >> [/!][/listwords][/text] >> >> [showif [an_avs]=[raw][an_avs][/raw]] >> [!]Failed to make the connection with Authorize.net. Put appropriate >> code here, like maybe an email to yourself.[/!] >> [/showif] >> >> [showif [an_response]=approved] >> [!]Everything's fine. Put appropriate code here.[/!] >> [/showif] >> >> [showif [an_response]=declined] >> [text]cardfailed=t[/text] >>

This card was declined or there was some error, >> such as incorrect expiration date.
[listvariables >> name=an_&exact=f] >> [name] = [value]
>> [/listvariables] >> >> [text]showform=T[/text] >> [/showif] >> >> [showif [an_response]=error] >> [text]cardfailed=t[/text] >>

This card was declined or there was some error, >> such as incorrect expiration date.
[listvariables >> name=an_&exact=f] >> [name] = [value]
>> [text]showform=T[/text] >> [/showif] >> >>> I am re-engineering a couple of donation forms that currently use >>> our own credit card processing server to use Authorize.net Server >>> Integration Method. http://developer.authorize.net/api/sim/ >>> They have development kits for php, Ruby and Java. Anyone got >>> something I could see in WebDNA? >>> >>> >>> Marc >>> -- >>> ------------------------------------------- >>> Marc Thompson >>> Software Engineer >>> Media Solutions >>> University Information Technology >>> University of Utah >>> 801.585.9264 >>> marc.thompson@utah.edu >>> ------------------------------------------- >>> --------------------------------------------------------- >>> This message is sent to you because you are subscribed to >>> the mailing list. >>> To unsubscribe, E-mail to: >>> archives: http://mail.webdna.us/list/talk@webdna.us >>> Bug Reporting: support@webdna.us >> >> > > -- > ------------------------------------------- > Marc Thompson > Software Engineer > Media Solutions > University Information Technology > University of Utah > 801.585.9264 > marc.thompson@utah.edu > ------------------------------------------- > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us Associated Messages, from the most recent to the oldest:

    
Actually, I've always wanted to know if its possible to do hash encodings with webDNA. I know you can do base64 (which is all you need for some types of authentication), but I haven't seen hash. I've sometimes used AJAX to return hash encodings that are generated by PHP scripts to then bring back into a webDNA tcp send. (I would prefer not to) Anyway Marc, I think everyone else here is spot on and has provided fabulous code. You're likely to find plenty of perl, ruby, and php scripts for these types of things, but I've been able to use webDNA with most mainstream APIs such as what's provided by Google and Amazon with fairly simple coding. In fact (as you might expect), MUCH simpler than any other language. Authorize.net is even easier to work with relative to say the Google Calendar data API. I haven't worked with perl before, but your code seems like its more complex than need be. I would suggest using the "tried-and-true" and work out your own custom forms to do what you want using the scripts that have been provided, they work. On 5/5/11 8:16 PM, Terry Wilson wrote: > I don't know about that hash stuff; it always confused me. The method > we're showing you doesn't require it. Maybe that's why we do it with a > tcpconnect and tcpsend? > > > > > > On Thu, 05 May 2011 18:14:01 -0600 > Marc Thompson wrote: > Thanks for the input. I'm getting close, just hung up on a small > detail I think? > I an going to be using the SIM (Server Intergration Method) and as > such won't be collecting credit card info from the user. > Also, it says in the documentation that the following fields are > required: > x_fp_hash > x_fp_sequence > x_fp_timestamp > > Not sure if I'm doing these correctly though? Here's what I've got: > [text]timestamp=[shell]/usr/bin/perl -e 'printf "%d", > time;'[/shell][/text] > [text]timestamp=[grep > search==[^0-9]&replace=][timestamp][/grep][/text] > [writefile temp]MYLOGINID^[SKU]^[timestamp]^[amount][/writefile] > [shell]digest -v -a md5 temp > stdout[/shell] > [text]hash=[GetChars start=14][INCLUDE file=stdout][/GetChars][/text] > [text show=t]hash=[grep > search=[^A-Za-z0-9]&replace=][hash][/grep][/text] > > x_fp_hash=[hash] > x_fp_sequence=[SKU] > x_fp_timestamp=[timestamp] > > I'm getting a response code of 99: > "Applicable only to SIM API. The server-generated fingerprint does > not match the merchant-specified fingerprint in the x_fp_hash field." > > So it's either the timestamp or the md5 hash????? > > Marc > > On 5/5/2011 4:20 PM, Terry Wilson wrote: >> Okay, here's mine (the first part is like Scott's). The values are >> pulled from the form the customer fills out, and I left out the code >> you'd put in later on the page when the sale goes through, like >> confirmation emails. This also shows how you parse out the results >> like the AVS code; it took some playing around to figure out which >> 'words' were which. This is one of several versions for different >> sites that are all patterned after the same idea, just some >> differences depending on the form submitted. >> >> [text]content=x_version=3.0&[!] >> [/!]x_Test_Request=[x_Test_Request]&[!] >> [/!]x_Method=CC&[!] >> [/!]x_Tran_Key=XdZwd1nZJqKVTwmV&[!] >> [/!]x_login=lecyt5m&[!] >> [/!]x_Type=AUTH_CAPTURE&[!] >> [/!]x_First_Name=[ccname]&[!] >> [/!]x_Last_Name=[ccname]&[!] >> [/!]x_email=[email]&[!] >> [/!]x_Phone=[phone]&[!] >> [/!]x_Address=[Address]&[!] >> [/!]x_City=[City]&[!] >> [/!]x_State=[State]&[!] >> [/!]x_Zip=[Zip]&[!] >> [/!]x_Country=[Country]&[!] >> [/!]x_amount=[price]&[!] >> [/!]x_CARD_NUM=[cc]&[!] >> [/!]x_Exp_Date=[expMonth][ExpYear]&[!] >> [/!]x_ADC_Relay_Response=FALSE&[!] >> [/!]x_Cust_ID=[id]&[!] >> [/!]x_Invoice_Num=[invoice]&[!] >> [/!]x_Description=[plan]&[!] >> [/!]x_ADC_URL=FALSE&[!] >> [/!]x_Delim_Data=TRUE&[!] >> [/!]x_ADC_Delim_Character=|[/text] >> >> [text]response=[tcpconnect host=secure.authorize.net&port=443&ssl=T][!] >> [/!][tcpsend]POST /gateway/transact.dll HTTP/1.0[unurl]%0D%0A[/UnURL][!] >> [/!]User-Agent: StoreBuilder[unurl]%0D%0A[/UnURL][!] >> [/!]Content-type: >> application/x-www-form-urlencoded[unurl]%0D%0A[/UnURL][!] >> [/!]Content-length: >> [countchars][content][/CountChars][unurl]%0D%0A[/UnURL][!] >> [/!][unurl]%0D%0A[/UnURL][!] >> [/!][content][unurl]%0D%0A[/UnURL][!] >> [/!][/TCPSend][/tcpconnect][/text] >> >> [text]response=[unurl][middle >> startafter=[url]%0D%0A%0D%0A[/url]&endbefore=][url][response][/url][/middle][/unurl][/text] >> >> >> [text multi=t][listwords words=[response]&delimiters=|][!] >> [/!][showif [index]=1]an_Response=[showif >> [word]=1]Approved[/showif][showif [word]=2]Declined[/showif][showif >> [word]=3]Error[/showif][/showif][!] >> [/!][showif [index]=2]&an_SubCode=[word][/showif][!] >> [/!][showif [index]=3]&an_ReasonCode=[word][/showif][!] >> [/!][showif [index]=4]&an_ReasonText=[word][/showif][!] >> [/!][showif [index]=5]&an_ApprovalCode=[word][/showif][!] >> [/!][showif [index]=6]&an_AVS=[word][/showif][!] >> [/!][showif [index]=7]&an_TransID=[word][/showif][!] >> [/!][showif [index]=10]&an_amount=[word][/showif][!] >> [/!][/listwords][/text] >> >> [showif [an_avs]=[raw][an_avs][/raw]] >> [!]Failed to make the connection with Authorize.net. Put appropriate >> code here, like maybe an email to yourself.[/!] >> [/showif] >> >> [showif [an_response]=approved] >> [!]Everything's fine. Put appropriate code here.[/!] >> [/showif] >> >> [showif [an_response]=declined] >> [text]cardfailed=t[/text] >>

This card was declined or there was some error, >> such as incorrect expiration date.
[listvariables >> name=an_&exact=f] >> [name] = [value]
>> [/listvariables] >> >> [text]showform=T[/text] >> [/showif] >> >> [showif [an_response]=error] >> [text]cardfailed=t[/text] >>

This card was declined or there was some error, >> such as incorrect expiration date.
[listvariables >> name=an_&exact=f] >> [name] = [value]
>> [text]showform=T[/text] >> [/showif] >> >>> I am re-engineering a couple of donation forms that currently use >>> our own credit card processing server to use Authorize.net Server >>> Integration Method. http://developer.authorize.net/api/sim/ >>> They have development kits for php, Ruby and Java. Anyone got >>> something I could see in WebDNA? >>> >>> >>> Marc >>> -- >>> ------------------------------------------- >>> Marc Thompson >>> Software Engineer >>> Media Solutions >>> University Information Technology >>> University of Utah >>> 801.585.9264 >>> marc.thompson@utah.edu >>> ------------------------------------------- >>> --------------------------------------------------------- >>> This message is sent to you because you are subscribed to >>> the mailing list. >>> To unsubscribe, E-mail to: >>> archives: http://mail.webdna.us/list/talk@webdna.us >>> Bug Reporting: support@webdna.us >> >> > > -- > ------------------------------------------- > Marc Thompson > Software Engineer > Media Solutions > University Information Technology > University of Utah > 801.585.9264 > marc.thompson@utah.edu > ------------------------------------------- > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us Aaron Michael Kaczmarek

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Location of Browser Info.txt file (1997) More on the email templates (1997) Searching Multiple DBs (1997) CSV import suggestions (2007) OFF-TOPIC...list serve software for newsletter? (1998) Bug (feature) in v6 listfiles shows hidden files ... (2004) Nav. 4 probs with cart - Serious problem (1997) Menu to select product variations (1997) Multiple catalog databases and showcart (1997) Cookies and webcat (1997) Re:Help name our technology! (1997) Physical Proximity searches (2000) Setting up shop (1997) sendmail error (2001) Physical Security for WebCatalog Directories (1997) Sending E-mail (1997) WebCat consulting $ (1998) OT: Version Control (2007) WebCatalog and WebTen (1997) SPAM (OT) (2004)