Dear experts,
I'm using x.process() function in order to process Autorize.net transactions in my web application. Before application goes to production I'm using testing values for x.login_id and x.tran_key I've received from Autorize.net. However, the result x.process() function (with valid CC details) is always 3 that stands for Error ( Authorize.Net defines response code 3 as "Error").
Here is the code:
Can you please advise what is going on? Is it OK that for testing Autorize.net accounts the result is always 3 (Error)? May be I have some errors in my code? Or these are login_id and transaction_key values to blame?
Any help will be highly appreciated,
Thank you in advance,
Olga
I'm using x.process() function in order to process Autorize.net transactions in my web application. Before application goes to production I'm using testing values for x.login_id and x.tran_key I've received from Autorize.net. However, the result x.process() function (with valid CC details) is always 3 that stands for Error ( Authorize.Net defines response code 3 as "Error").
Here is the code:
Code:
dim x as AuthorizeNet_transaction dim tbl as P tbl=table.open("[PathAlias.ADB_Path]\company_data") tbl.fetch_first() x.login =convert_type( tbl.Login_id,"C") x.tran_key =convert_type( tbl.Transaction_key,"C") tbl.close() x.amount =convert_type( CurrentForm.Controls.subs_amount.value,"C") x.shipaddress =convert_type( CurrentForm.Controls.ShipAddress.value,"C") x.billaddress =convert_type( CurrentForm.Controls.BillAddress.value,"C") x.card_num =convert_type( CurrentForm.Controls.cc_num.value,"C") x.exp_date =convert_type( CurrentForm.Controls.exp_date.value,"D") x.type = "AUTH_CAPTURE" x.first_name = convert_type( CurrentForm.Controls.fname,"C") x.last_name = convert_type( CurrentForm.Controls.lname,"C") x.car_code = convert_type( CurrentForm.Controls.ccv,"C") dim result_msg as C result_msg = "" 'code to process payment if x.process()then dim y as P y = x.result result_msg = y.Response_Reason_Text if (y.response_code = "1") ' Authorize.Net defines response code 1 as "Approved" session.transStatus = 1 elseif (y.response_code = "2") 'Authorize.Net defines response code 2 as "Declined" session.transStatus = 2 elseif (y.response_code = "3") 'Authorize.Net defines response code 3 as "Error" session.transStatus = 3 end if else session.transStatus = 0 end if 'session.transStatus = 1 delete x ' remove AuthorizeNet object dim URL as c URL="result.a5w?msg="+result_msg Response.redirect(URL)
Any help will be highly appreciated,
Thank you in advance,
Olga
Comment