cancel
Showing results for 
Search instead for 
Did you mean: 

hosted payment page not displaying properly on webserver

When I run my code for gethostedpaymentpage from my development machine, everything is working fine. When I deploy my code onto my webserver, the hosted payment page does not look right at all. There is no error given (e.g. unable to obtain token). The fields such as Description and Invoice Number have the values {{orderDescription}} and {{orderInvoiceNumber}} instead of displaying the correct values. There are no textboxes shown to enter in values, there is a field {{errorMsg}} in red, and buttons stretch across the whole page and do not display their text just parameter names with {}. Everything is jumbled and not formatted correctly.

 

What could be the problem? It is the exact same code used in both places. Webserver is running TLS 1.2. Using same ID and transaction key.

 

Thank you. 

jmorgret
Contributor
1 ACCEPTED SOLUTION

Accepted Solutions

Make sure your form is posting to https://test.authorize.net/payment/payment instead of https://test.authorize.net/payment/payment/

Powered by NexWebSites.com -
Certified Authorize.net developers

View solution in original post

NexusSoftware
Trusted Contributor
8 REPLIES 8

Make sure your form is posting to https://test.authorize.net/payment/payment instead of https://test.authorize.net/payment/payment/

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

Thank you.

I thought this was fixed but it actually is not.  When I use

https://test.authorize.net/payment/payment

I get the problem described below and when I use

https://test.authorize.net/payment/payment/

it is even worse as no buttons show up at all just a list of text with {} on the parameter names.

 

I really need to get this fixed right away.

Any suggestions?

 

Thanks,

 

Jennifer

 

jmorgret
Contributor

If you are posting to https://test.authorize.net/payment/payment and having elements not display, then something else is going on, with either your server's content security policy (CSP) or your browser.

 

Do you have a live URL to check out?

Powered by NexWebSites.com -
Certified Authorize.net developers

When I just had this problem today and yesterday, I had to point my form to post to https://accept.authorize.net/payment/payment. Both for production on test mode and in sandbox. That's what allowed it to work for me.

The https://accept.authorize.net/payment/payment URL isn't going to work for Sandbox. The only way that URL would work correctly is if you posted a token to that URL that was requested from the production system.

I have tried it both ways, posting to the test url using sandbox credentials and posting to the production url using real credentials.  Neither has worked.

 

Hi @jmorgret,

 

How are you posting the token to the URL?  The first thing to check is that you're actually posting the token from the browser, correct? You're not actually making the HTTP connection to post the token from an application on the server, right? Sounds silly, but a few people have made that mistake, so I have to ask.

 

Beyond that, would you be able to post your token request code and the code that the browser uses to post the token?