I have an application that processes credit cards through Authorize.net. In Version 10.5 of Alpha Five the following code works flawlessly, but in version 11 I'm getting an error that says that the x.process method is not found. Any help would be appreciated.
dim x as AuthorizeNet_transaction
x.login = "[LoginID]"
x.tran_key = "[Transaction Key]"
x.version = "3.1"
x.test = "False"
x.amount = Var->vManAuthAmount 'variable comes from an xDialog
x.card_num = var->vManAuthCardNum 'variable comes from an xDialog
x.exp_date = var->vManExpDate 'variable comes from an xDialog
x.type = "AUTH_CAPTURE"
x.last_name = var->vManAuthName 'variable comes from an xDialog
x.cust_id = var->vManAuthAct 'variable comes from an xDialog
If var->vMainEmail=.t. then 'variable comes from an xDialog
x.email="[Internal Email Address]"
else
x.email = var->vManAuthEmail 'variable comes from an xDialog
end if
x.first_name = "_"
x.phone = "[Internal Phone #]"
If isblank("var->vManAuthEmail") .and. var->vMainEmail = .F. then
x.email_customer = .f.
else
x.email_customer = .t.
end if
If isnotblank("var->vManAuthCode") then
x.card_code = var->vManAuthCode
end if
if x.process() then
'x.process() will return true if the transaction server accepted the request and attempted to process the transaction
dim y as p
dim result_msg as c
dim result_title as c = ""
y = x.result
result_msg = y.Response_Reason_Text
if (y.response_code = "1")
' Authorize.Net defines response code 1 as "Approved"
result_title = "Approved"
*concat(result_msg,crlf()+ "Approval Code: " + y.Approval_Code)
elseif (y.response_code = "2")
'Authorize.Net defines response code 2 as "Declined"
result_title = "Declined"
elseif (y.response_code = "3")
'Authorize.Net defines response code 3 as "Error"
result_title = "Error"
end if
*concat(result_title," " + "Transaction " + y.Transaction_ID)
ui_msg_box(result_title,result_msg)
else
'if x.process() is false, the transaction server could not be contacted or did not respond in a timely manner
ui_msg_box("", "Transaction NOT processed", UI_ATTENTION_SYMBOL)
end if
dim x as AuthorizeNet_transaction
x.login = "[LoginID]"
x.tran_key = "[Transaction Key]"
x.version = "3.1"
x.test = "False"
x.amount = Var->vManAuthAmount 'variable comes from an xDialog
x.card_num = var->vManAuthCardNum 'variable comes from an xDialog
x.exp_date = var->vManExpDate 'variable comes from an xDialog
x.type = "AUTH_CAPTURE"
x.last_name = var->vManAuthName 'variable comes from an xDialog
x.cust_id = var->vManAuthAct 'variable comes from an xDialog
If var->vMainEmail=.t. then 'variable comes from an xDialog
x.email="[Internal Email Address]"
else
x.email = var->vManAuthEmail 'variable comes from an xDialog
end if
x.first_name = "_"
x.phone = "[Internal Phone #]"
If isblank("var->vManAuthEmail") .and. var->vMainEmail = .F. then
x.email_customer = .f.
else
x.email_customer = .t.
end if
If isnotblank("var->vManAuthCode") then
x.card_code = var->vManAuthCode
end if
if x.process() then
'x.process() will return true if the transaction server accepted the request and attempted to process the transaction
dim y as p
dim result_msg as c
dim result_title as c = ""
y = x.result
result_msg = y.Response_Reason_Text
if (y.response_code = "1")
' Authorize.Net defines response code 1 as "Approved"
result_title = "Approved"
*concat(result_msg,crlf()+ "Approval Code: " + y.Approval_Code)
elseif (y.response_code = "2")
'Authorize.Net defines response code 2 as "Declined"
result_title = "Declined"
elseif (y.response_code = "3")
'Authorize.Net defines response code 3 as "Error"
result_title = "Error"
end if
*concat(result_title," " + "Transaction " + y.Transaction_ID)
ui_msg_box(result_title,result_msg)
else
'if x.process() is false, the transaction server could not be contacted or did not respond in a timely manner
ui_msg_box("", "Transaction NOT processed", UI_ATTENTION_SYMBOL)
end if