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:
<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>
Solved! Go to Solution.
07-27-2017 07:12 AM - edited 07-27-2017 07:15 AM
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...
07-27-2017 02:38 PM
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/
07-27-2017 11:02 AM - edited 07-27-2017 11:12 AM
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...
07-27-2017 02:20 PM
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...
07-27-2017 02:38 PM