cancel
Showing results for 
Search instead for 
Did you mean: 

API response is 302 Moved Temporarily

I'm sending requests to https://apitest.authorize.net/xml/v1/request.api

 

In response, sometimes I'm getting the following response:

  

HTTP/1.1 302 Moved Temporarily
Location: /Error.htm?
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
Content-Length: 128
Date: Mon, 14 Mar 2016 21:25:50 GMT
Connection: keep-alive

<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="/Error.htm?">here</a>.</h2>
</body></html>

 

If I keep sending the same request, then it will sometimes return normally.

 

The request:

<createCustomerPaymentProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name>xxxxx</name>
<transactionKey>xxxxx</transactionKey>
</merchantAuthentication>
<customerProfileId>xxxxx</customerProfileId>
<paymentProfile>
<billTo>
<firstName>Johsn</firstName>
<lastName>Doeq</lastName>
</billTo>
<payment>
<creditCard>
<cardNumber>4111111111111111</cardNumber>
<expirationDate>0122</expirationDate>
</creditCard></payment>
</paymentProfile>
<validationMode>testMode</validationMode>
</createCustomerPaymentProfileRequest>

Obviously the authentication/profile id are actual values.

 

The response I eventually get is that the profile is a duplicate, so the first requests must be working because I've changed the card details so that it will make a new profile. 

 

HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Content-Type: application/xml; charset=utf-8
Expires: -1
Server: Microsoft-IIS/7.5
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: PUT,OPTIONS,POST,GET
Access-Control-Allow-Headers: x-requested-with,cache-control,content-type,origin,method,SOAPAction
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
X-Powered-By: ASP.NET
Content-Length: 870
Date: Mon, 14 Mar 2016 21:31:04 GMT
Connection: keep-alive

<?xml version="1.0" encoding="utf-8"?>
<createCustomerPaymentProfileResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<messages>
<resultCode>Error</resultCode>
<message>
<code>E00039</code>
<text>A duplicate customer payment profile already exists.</text>
</message>
</messages>
<customerProfileId>xxx</customerProfileId>
<customerPaymentProfileId>xxx</customerPaymentProfileId>
<validationDirectResponse>xxxx</validationDirectResponse>
</createCustomerPaymentProfileResponse>

 

Any ideas what's going on?

calebpitman1
Contributor
6 REPLIES 6

 

FIRST REQUEST
<?xml version="1.0" encoding="utf-8"?> <createCustomerPaymentProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"><merchantAuthentication><name>79RN74gZzYG9</name><transactionKey>xxxxxxxxxx</transactionKey></merchantAuthentication><customerProfileId>39925837</customerProfileId><paymentProfile><billTo><firstName>Roger</firstName><lastName>Doe</lastName></billTo><payment><creditCard><cardNumber>370000000000002</cardNumber><expirationDate>1222</expirationDate></creditCard></payment></paymentProfile><validationMode>testMode</validationMode></createCustomerPaymentProfileRequest>
FIRST RESPONSE
<?xml version="1.0" encoding="utf-8"?><createCustomerPaymentProfileResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"><messages><resultCode>Error</resultCode><message><code>E00039</code><text>A duplicate customer payment profile already exists.</text></message></messages><customerProfileId>39925837</customerProfileId><customerPaymentProfileId>36218639</customerPaymentProfileId><validationDirectResponse>1,1,1,(TESTMODE) This transaction has been approved.,000000,P,0,none,Test transaction for ValidateCustomerPaymentProfile.,1.00,CC,auth_only,none,Roger,Doe,,,,,,,,,email@example.com,,,,,,,,,0.00,0.00,0.00,FALSE,none,AAB3621CE0823FEF51ACB66A2B2BD9F9,,,,,,,,,,,,,XXXX0002,American Express,,,,,,,,,,,,,,,,</validationDirectResponse></createCustomerPaymentProfileResponse>
SECOND REQUEST
<?xml version="1.0" encoding="utf-8"?>
<createCustomerPaymentProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"><merchantAuthentication><name>79RN74gZzYG9</name><transactionKey>xxxxx</transactionKey></merchantAuthentication><customerProfileId>39925837</customerProfileId><paymentProfile><billTo><firstName>Roger</firstName><lastName>Doe</lastName></billTo><payment><creditCard><cardNumber>370000000000002</cardNumber><expirationDate>1222</expirationDate></creditCard></payment></paymentProfile><validationMode>testMode</validationMode></createCustomerPaymentProfileRequest>
SECOND RESPONSE
<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="/Error.htm?">here</a>.</h2>
</body></html>

 

This is also occurring with createCustomerProfileRequest. When the response is the 302 Object Moved error, I know the request was received and processed because if I send it again I'll either receive "duplicate submitted" or get the error again. I'll never get a response that it was successful on createCustomerPaymentProfileRequest; however, I'll sometimes get a successful request on createCustomerProfileRequest, but it will occasionally return the error as well. 

 

I've also now encountered this on createCustomerProfileTransactionRequest as well.

 

:(

calebpitman1
Contributor

So I turned on FOLLOW REDIRECTS for CURL, and it went to an error page that says "An unanticipated error occurred while processing this request. Please click your browsers Back button to return to the previous page.". 

 

Upon searching this error, I found the following thread:

 

https://community.developer.authorize.net/t5/Integration-and-Testing/Sandbox-environment-is-down/td-...

 

 

It appears the sandbox is just having issues.

 

calebpitman1
Contributor

Hello @calebpitman1

We don't currently have any outages reported with our sandbox environment.  I've reported your issue to the product team for analysis.

I'd recommend subscribing to this topic so that you'll be alerted via email if there are updates. To subscribe, click Topic Options at the top of this thread and then select Subscribe. You'll then receive an email once anyone replies to your post.

Thanks,

Richard

see that too just by putting that in browser url address https://apitest.authorize.net/xml/v1/request.api

sometime I get

the correct respone

{"messages":{"resultCode":"Error","message":[{"code":"E00003","text":"Root element is missing."}]}}

sometime it redirect to

https://apitest.authorize.net/Error.htm?

and the screen show

Error

An unanticipated error occurred while processing this request. Please click your browser’s Back button to return to the previous page.

Issue seem to went away.

Hello @RaynorC1emen7 @calebpitman1

 

We've identifed the problem and are working on a solution.  

 

Richard