Re: [WebDNA] Credit card processing
This WebDNA talk-list message is from 2012
It keeps the original formatting.
numero = 109086
interpreted = N
texte = Okay here's my authnet code. It was derived from something else originally, Storebuilder I guess, but I think the part about parsing out the results may have been mine. Not sure about that though. The incoming variables are specific to my setup, like [sitename] but at least you have the proper variable names going to authnet and the tcpconnect part. I use the same code for two clients besides myself, and the authnetkey and authnetid come from a list of text variables in a settings include on their sites. you can get the authnet field names from their site at http://developer.authorize.net/guides/AIM/[text]content=x_version=3.0&[!][/!]x_Test_Request=[x_Test_Request]&[!][/!]x_Method=CC&[!][/!]x_Tran_Key=[AuthnetKey]&[!][/!]x_login=[AuthnetID]&[!][/!]x_Type=AUTH_CAPTURE&[!][/!]x_First_Name=[Name]&[!][/!]x_Last_Name=[Name]&[!][/!]x_email=[email]&[!][/!]x_Address=[Address1] [address2]&[!][/!]x_City=[City]&[!][/!]x_State=[State]&[!][/!]x_Zip=[Zip]&[!][/!]x_Country=[Country]&[!][/!]x_amount=[grandtotal]&[!][/!]x_CARD_NUM=[AccountNum]&[!][/!]x_Exp_Date=[ExpMonth][expYear]&[!][/!]x_card_code=[secCode]&[!][/!]x_ADC_Relay_Response=FALSE&[!][/!]x_Cust_ID=[name]&[!][/!]x_Invoice_Num=[cart]&[!][/!]x_Description=[sitename]&[!][/!]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]-- Terry Wilson | terry@terryfic.com | http://terryfic.comhttp://WhosComing.com - a simplified, affordable online reservation systemiStockPhoto portfolio - http://www.istockphoto.com/Terryfic3D?refnum=Terryfic3D--------------------------------------------------------------------------Attitude is the only difference between ordeal and adventure.
Associated Messages, from the most recent to the oldest:
Okay here's my authnet code. It was derived from something else originally, Storebuilder I guess, but I think the part about parsing out the results may have been mine. Not sure about that though. The incoming variables are specific to my setup, like [sitename] but at least you have the proper variable names going to authnet and the tcpconnect part. I use the same code for two clients besides myself, and the authnetkey and authnetid come from a list of text variables in a settings include on their sites. you can get the authnet field names from their site at http://developer.authorize.net/guides/AIM/
[text]content=x_version=3.0&
[!][/!]x_Test_Request=[x_Test_Request]&
[!][/!]x_Method=CC&
[!][/!]x_Tran_Key=[AuthnetKey]&
[!][/!]x_login=[AuthnetID]&
[!][/!]x_Type=AUTH_CAPTURE&
[!][/!]x_First_Name=[Name]&
[!][/!]x_Last_Name=[Name]&
[!][/!]x_email=[email]&
[!][/!]x_Address=[Address1] [address2]&
[!][/!]x_City=[City]&
[!][/!]x_State=[State]&
[!][/!]x_Zip=[Zip]&
[!][/!]x_Country=[Country]&
[!][/!]x_amount=[grandtotal]&
[!][/!]x_CARD_NUM=[AccountNum]&
[!][/!]x_Exp_Date=[ExpMonth][expYear]&
[!][/!]x_card_code=[secCode]&
[!][/!]x_ADC_Relay_Response=FALSE&
[!][/!]x_Cust_ID=[name]&
[!][/!]x_Invoice_Num=
[cart]&
[!][/!]x_Description=[sitename]&
[!][/!]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]-- Terry Wilson | terry@terryfic.com | http://terryfic.comhttp://WhosComing.com - a simplified, affordable online reservation systemiStockPhoto portfolio - http://www.istockphoto.com/Terryfic3D?refnum=Terryfic3D--------------------------------------------------------------------------Attitude is the only difference between ordeal and adventure.
Terry Wilson
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:
[OT] Trying to steal databases on our server (2003)
[cart] tag (2000)
MacAuthorize order data fields WAS:How To question... (1997)
Siteedit (1999)
Lookup within a Search (2005)
WebCat with WebTen (1998)
NetSplat and WebCat2 (1997)
my price won't move (1997)
NetSplat and WebCat2 (1997)
orderfile and setlineitems (1998)
Wanted: More Math Functions (or, Can You Solve This?) (1997)
Test (2003)
[WebDNA] search by range of dates (2009)
A question on sub-categories (1997)
Sorting Numbers (1997)
[showif] with ! (2000)
Hyperboard users wanting a quoted message (1998)
Emailer errors (2000)
Keep away (1997)
WebCat2b12 forgets serial # (1997)