cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP GET vs HTTP POST

Greetings-

 

We have received an email that Authorize.net will no longer allow HTTP GET methods for transaction requests.  Does this mean that we simply need to update the transact.dll URL in our code or does it mean I need to do a complete payment system revamp?

chrisdrzal
Member
18 REPLIES 18

The URL would be the same, it how you passing the param.

RaynorC1emen7
Expert

I'm sorry, but this will be my first time working with the Authorize.net API.  Could you provide an example of what is and is not correct?

 

Thanks.

@chrisdrzal It's hard to get into specifics without knowing much more about your development environment, scripting languages, etc.

But, I hope this link helps explain the difference:

http://www.w3schools.com/tags/ref_httpmethods.asp

 

In brief: You shouldn't use parameterized URLs to submit API information to Transact. Instead, you should use the HTTP body of the request to submit that information.

If you do have some details to share about your integration, the community may be able to assist you with the specific changes you need to make.

--
"Move fast and break things," out. "Move carefully and fix what you break," in.

@Lilith thanks for your response.  A little background; this is a legacy asp.net web application.  I say legacy, but in truth its just old - very old.  After a little investigating today, it looks like Authorize.net wants me to use WebClient.OpenWrite as opposed to WebClient.OpenRead.  Below is the code in question:

StringBuilder uri = new StringBuilder("?x_delim_data=True");
string gatewayUrl = "https://secure.authorize.net/gateway/transact.dll";
string versionNumber = "3.1";

BankResponse br = new BankResponse( _payment );

/*
  Some code to build the uri string
*/

WebClient wc = new WebClient();  

// Build the uRI
string Uri = gatewayUrl  + uri.ToString();			

try
    {
        // Perform the web GET operation
        StreamReader sr  = new StreamReader(wc.OpenRead(Uri));
		
	br.GenericResponseCode = GenericResponseTypes.MAPError;

	br.BankData = sr.ReadToEnd();
/*
  Code to interpret the response
*/
    } catch (Exception e) {....}
    
return br;

My question now is, how can I implement OpenWrite and still get the response code this method requires?

I've been struggling with this as well.

 

When I pass the parameters as an array via cURL to https://test.authorize.net/gateway/transact.dll, I get a "merchant login id or password invalid" error. However, if I switch it back to sending a url encoded string, it works.

 

I can't seem to piece any of the documentation together to get the right combination of sandbox urls and correct cURL settings. Any ideas?

Yes, I remember going through that article as well. However, if this is the model you use, I will try it again and follow it exactly.

there are sample on php curl site to

http://php.net/manual/en/curl.examples.php