cancel
Showing results for 
Search instead for 
Did you mean: 

getHostedPaymentPageRequest error on https://test.authorize.net/payment/payment

I can successfully get a token using getHostedPaymentPageRequest, however when I try to post the form to https://test.authorize.net/payment/payment I get the generic:

"Error

An unanticipated error occurred while processing this request. Please click your browser’s Back button to return to the previous page."
 
I'm following the instructions here: https://github.com/AuthorizeNet/accept-sample-app/blob/master/README-AcceptHosted.md and can't figure out where I'm going wrong. Here is the form that I set up to try and send the data to https://test.authorize.net/payment/payment:
 
<form id="send_hptoken" action="https://test.authorize.net/payment/payment" method="post">
<input type="hidden" name="token" value="<?php echo $response->getToken(); ?>" />
<input type="submit" />
</form>
 
And I can confirm that the "token" input is getting the correct token value. Anyone else encounter this issue?
thomas_dca
Member
1 ACCEPTED SOLUTION

Accepted Solutions

Turns out the problem was using an "&" in the cancel URL. Once I removed that everything started working again.

 

This post helped clue me into the problem: https://community.developer.authorize.net/t5/Integration-and-Testing/using-CDATA-tags-in-name-fields...

View solution in original post

3 REPLIES 3

Are you are using your sandbox credentials to obtain the token, when posting to: https://test.authorize.net/payment/payment ?

 

If you can copy the token, we have a sandbox token tester at: https://nexwebsites.com/authorize.net-token-tester/

 

 

Powered by NexWebSites.com -
Certified Authorize.net developers
NexusSoftware
Trusted Contributor

Yup, I'm using my sandbox credentials to obtain the token. And when I use your sandbox token tester I get the same generic error message. Searching online I saw an issue where if you didn't have a Signature Key generated it could cause issues (and I didn't have one), but even after generating a Signature Key I'm getting the same error.

 

However, when I generate the token from here: http://developer.authorize.net/api/reference/#payment-transactions-get-an-accept-payment-page

 

It works correctly... So something must be off with the token I am receiving despite getting the Ok result code/token...

Turns out the problem was using an "&" in the cancel URL. Once I removed that everything started working again.

 

This post helped clue me into the problem: https://community.developer.authorize.net/t5/Integration-and-Testing/using-CDATA-tags-in-name-fields...