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
14 REPLIES 14

Yes, I added breakpoint to the payBtnHandler function, it is invoked, and finishes without any error, and then I get the resizeWindow event - and nothing else.

javaduke
Contributor

I also added breakpoint to the callServer function and I see that this.httpService.post(n) response is E00001 An error occurred during processing. Please try again. So this means javascript is working correctly and the remote service returns E00001.

javaduke
Contributor

Thats good, your integration is working, something wrong with the token, it is rejecting. send me the apikey on my email.

Regards,
Dipesh
Please DONOT submit any sensitive data

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!

 

javaduke
Contributor

Glad, that you found the issue in request and able to resolve.

 

Thank you,

Dipesh Patel

Regards,
Dipesh
Please DONOT submit any sensitive data