cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

AIM Integration Help Using Sandbox and Auhorize.net

Hi,I have created sandbox account and tested with my sandbox credential using below code:

*********************************************************************

Dim ApiLogin As String = System.Configuration.ConfigurationManager.AppSettings("ApiLogin")
Dim TransactionKey As String = System.Configuration.ConfigurationManager.AppSettings("TransactionKey")

Dim post_url As [String] = "https://test.authorize.net/gateway/transact.dll"

Dim post_values As New Dictionary(Of String, String)()

post_values.Add("x_login", ApiLogin)
post_values.Add("x_tran_key", TransactionKey)
post_values.Add("x_delim_data", "TRUE")
post_values.Add("x_delim_char", "|")
post_values.Add("x_relay_response", "FALSE")

post_values.Add("x_type", "AUTH_CAPTURE")
post_values.Add("x_method", "CC")
post_values.Add("x_card_num", txtCardno.Text)
post_values.Add("x_card_code", txtcvv.Text)
post_values.Add("x_exp_date", "1016")

post_values.Add("x_amount", "100")
post_values.Add("x_description", "")


post_values.Add("x_first_name", "Sud")
post_values.Add("x_last_name", "Mandola")
post_values.Add("x_address", "")
post_values.Add("x_state", "")
post_values.Add("x_zip", "")

Dim post_string As [String] = ""

For Each post_value As KeyValuePair(Of String, String) In post_values
post_string += post_value.Key + "=" + HttpUtility.UrlEncode(post_value.Value) + "&"
Next
post_string = post_string.TrimEnd("&"c)

'Create an HttpWebRequest object to communicate with Authorize.net
Dim objRequest As HttpWebRequest = DirectCast(WebRequest.Create(post_url), HttpWebRequest)
objRequest.Method = "POST"
objRequest.ContentLength = post_string.Length
objRequest.ContentType = post_url

'post data is sent as a stream
Dim myWriter As StreamWriter = Nothing
myWriter = New StreamWriter(objRequest.GetRequestStream())
myWriter.Write(post_string)
myWriter.Close()

'returned values are returned as a stream, then read into a string
Dim post_response As [String]
Dim objResponse As HttpWebResponse = DirectCast(objRequest.GetResponse(), HttpWebResponse)
Using responseStream As New StreamReader(objResponse.GetResponseStream())
post_response = responseStream.ReadToEnd()
responseStream.Close()
End Using

Dim details As String() = post_response.Split("|"c)

************************************************************************

I got email Merchant Email Receipt and it seems its working ok,Now i want to switch to live mode

for real transaction,Please tell me what changes i need to do in my code,1 change will be putting auhorize.net apilogin and transactionkey,What else it may be(may be in https://test.authorize.net/gateway/transact.dll).Please help

su_smart
Contributor
6 REPLIES 6

Yup, just the post URL, loginID and transactionKey

RaynorC1emen7
Expert

 Thanks for reply,But is there any setting change needed on Authrize.net account,I am using payment by Credit Card. Please provide me things which needs to
be handled carefully on production environment because I start actual money transaction.

On your real production account? Shouldn't need any change. but can't tell until you try doing a transaction.

Hi, On webresponse object,I am getting this message
"1|1|1|This transaction has been approved.|GOWPO1|Y|2256635797|||300.00|CC|auth_capture||Sud|Mandola|||||||||||||||||||||||6ECBBE744612FF26D728175CD0DD221B|
P|2|||||||||||XXXX0027|Visa||||||||||||||||"

Here 1|1|1| indicates that successful transaction.but Which 1 is right one to look for successfull transaction. Please help.

Hi, Also I want to know that Can i implement ARB through coding?I see the video that throught Authrize.net account we can add many subscriptions under ARB,But can it be done throught asp.net coding like adding new subscription for Recurring billing? Please help.

That response look it is from a card present, not the card not present(think web) transaction.

read the AIM CP doc

http://developer.authorize.net/api/upgrade_guide/


and about the ARB, read the api reference

https://developer.authorize.net/api/reference/