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

Infamous "An error occurred during processing" when trying to submit a payment form

Folks, I'm getting this infamous error when trying to submit payment form. Here's the situation. I use the Accept Hosted solution, my backend code is written in PHP. I can successfully submit the getHostedPaymentPageRequest and get back the response with the token. I then see the payment form loaded in the iframe. But when I fill out the fields and click Pay, I get this error message. A lot of back and forth with Authorize.NET support was a complete waste of time. Wondering if anyone can give me any clue on how to troubleshoot it further. Forgot to mention, I'm running the website locally using MAMP and I call the test Authorize.NET environment.

Here's the log I captured in my browser, if this helps:

Summary
URL: https://test.authorize.net/Payment/Api.ashx
Status: 200 OK
Source: Network
Address: 198.241.206.25:443
Initiator: 
polyfills.bundle.js:1:83136

Request
POST /Payment/Api.ashx HTTP/1.1
Accept: application/json
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Connection: keep-alive
Content-Length: 3397
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Cookie: _ga=GA1.2.629733913.1728001835; _gid=GA1.2.1739648470.1728231730; _gat_UA-63470806-9=1; optimizelyEndUserId=oeu1728001834481r0.0010818223198179044; _ga_RJTVJSYQFN=GS1.1.1728231594.5.0.1728231603.51.0.0; cf_clearance=sUqatfFGs1sMy5bcuua2ScC__B8iDBV_J0EtS8VC208-1728231594-1.2.1.1-MWSWvevuqDNUUN6PgB7LBgDoY_IYrYoHM8SK.oVrvym54sIMR3Ab5x6ZRdslMetqv8vSoVc.EGfdtxlkMWEBBfyvyRqqmF9dgGHF5G_T0KMhgCZ1KBk07f05Te55MUzTQvAyy8h4lWQHqpJOHLpwzC0.FYIiyRyfcReXvq4Tp7NuptaghVrxCBQ4HCGEq74GYSxetNSTbt5xhJM1dsCVVKLXPZyswKkJRsHFpXyUZwuasnTkHskh7yEScHzBs9Nc7DDCuB11z33eAr1iv01TSshPk8loeEeJ7AKHnWepsAY9nMfu6sR7aThygC3nDg9i8mp02Fe.dxqC1ib_TCc1FFdgDVTshhrOb.oNilgfF4yBYaPNvX8o_c5XjQ90dTKQNrWG.iia4fgkL3xbFoMbZw; elqQs=%2C%2C%2Chttps://s986383348.t.eloqua.com/; _gcl_au=1.1.291212342.1728011365; __cfruid=a45e566cd755e4ab3206263d69793fc62f107860-1728052842; _cfuvid=H16dYt5AwapirqYL7JybjD7UZO_nioIiYg24qJfQdxs-1728052842939-0.0.1.1-604800000
Origin: https://test.authorize.net
Priority: u=3, i
Referer: https://test.authorize.net/payment/payment
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0.1 Safari/605.1.15

Response
HTTP/1.1 200 OK
Cache-Control: no-store, no-cache, private, must-revalidate
Content-Length: 2589
Content-Type: application/json; charset=utf-8
Date: Sun, 06 Oct 2024 16:22:45 GMT
Expires: 0
Pragma: no-cache
Strict-Transport-Security: max-age=31536000
X-Cnection: close
X-Content-Type-Options: nosniff

Request Data
MIME Type: application/x-www-form-urlencoded; charset=UTF-8
token: <<< REDACTED >>>
totalAmount: 125.00
paymentMethod: cc
creditCard: 4111 1111 1111 1111
expirationDate: 11/25
cardCode: 123
billingInfo[firstName]: John
billingInfo[lastName]: Doe
billingInfo[company]
billingInfo[address]: fgdfgdf
billingInfo[city]: dfgdfg
billingInfo[state]: ny
billingInfo[zip]: 12453
billingInfo[country]: US
billingInfo[phoneNumber]
billingInfo[faxNumber]
email: foo@bar.com


Response Data
{
    "resultCode": "Error",
    "messageCode": "E00001",
    "messageText": "An error occurred during processing. Please try again.",
    "token": "<<< REDACTED >>>",
    "transactionData": {}
}

 

javaduke
Contributor
1 ACCEPTED SOLUTION

Accepted Solutions

Dipesh, you were right! Thank you for pointing me to the right direction! Turns out my XML request to obtain a token was malformed, my user values were set incorrectly, and yet, the getHostedPaymentPageResponse was successful, but when the payment is submitted, the response is error. So, it is still a mystery why the response to malformed XML was still successful, but I finally was able to resolve my problem. Thank you again for your help!

 

View solution in original post

javaduke
Contributor
14 REPLIES 14

I'm using the Accept Hosted form (on the test environment) and I'm running into this error when trying to submit the payment. I'm able to successfully submit the getHostedPaymentPageRequest and get back the successful response with the token. The form is loaded correctly, but when I fill out all the fields and click Pay, I see the error "An error occurred during processing. Please try again." at the bottom of the page. I had several email exchanges with the Authorize.NET support but they were unable to come up with anything useful. Just wondering how can I troubleshoot it? I tried running it in the debugger and set some breakpoints in JavaScript and I only see the "resizeWindow" events coming back. Any suggestions?

javaduke
Contributor

UPDATE: I can see that the code successfully calls POST https://test.authorize.net/Payment/Api.ashx but the response is:

{
    "resultCode": "Error",
    "messageCode": "E00001",
    "messageText": "An error occurred during processing. Please try again.",
    "token": "<<<REDACTED>>>",
    "transactionData": {}
}

 

Hello, 

Sorry, to hear about this, I did check the log that you shared above, it seems looks correct. Could you please refer this PHP sample code and compare your implementation?  https://github.com/AuthorizeNet/accept-sample-app/blob/master/getHostedPaymentForm.php 

Regards,
Dipesh
Please DONOT submit any sensitive data
dipespat
Contributor

Dipesh, thanks for getting back to me! Yes, I compared my PHP to the sample and there are no substantial differences there. As I mentioned previously, I'm able to obtain a token successfully, the error only occurs when I fill out the payment form and click Submit.

 

javaduke
Contributor

Could you please share more details on this: 

  • Timestamp this error happened
  • Correlation Id
  • if you are doing test transaction sample Merchant id 
Regards,
Dipesh
Please DONOT submit any sensitive data

The timestamp, as you can see in the log above, is Sun, 06 Oct 2024 16:22:45 GMT. Not sure about the correlation ID and merchant ID - where do I get these values from? I have an API ID, if that's what you are looking for.

I can try again tomorrow my time and let you know. Is there any way I can contact you directly via email?

 

 

I just tried again with the same results, the timestamp is Fri Nov 22 14:49:11 2024 UTC

The request for token returns successfully and the XML is:

<?xml version="1.0" encoding="utf-8"?><getHostedPaymentPageResponse 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>Ok</resultCode><message><code>I00001</code><text>Successful.</text></message></messages><token>....</token></getHostedPaymentPageResponse>

Then I proceed to fill out the form and submitting it, and it shows this error in the form, right above the buttons: An error occurred during processing. Please try again.

 

javaduke
Contributor

One more thing - I debug the JavaScript in the browser and after clicking Pay button I do see the resizeWindow event received and processed successfully, but nothing after that.

javaduke
Contributor

Pay button should not do the resize, it should call the payBtnHandler, could you please add debug point to payBtnHandler function in main.bundle.js and see if you can debug the code?

please share your contact will connect on Monday

Regards,
Dipesh
Please DONOT submit any sensitive data