cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to get Accept form js and css files to open

I am currently trying to integrate ANET into a java app, I can get the token created, but when I open the actual form from the JSP page my browser console shows that all the JS and CSS files that are to be used on the payment form cannot download cause of error 550.

So I am guessing that its the CSS and JS not being there to interpret what is to be displayed.

I have verified that it has the correct URL (formUrl) and token (token) when it hits the form before the submit. The auto submit works fine and opens the ANET url page.

I am doing this from the MyEclipse internal Tomcat server without SSL and into an iframe, does not having SSL in the test env cause these to fail?

Any help would be greatly appreciated,
Ed

The html I am using is:

<script type="text/javascript">
function onAfterLoad()
{
document.getElementById("ppSubmit").submit();
}
</script>
<BODY onload="setTimeout(function(){onAfterLoad();}, 500);">
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%= formUrl %><br/>
<%= token %><br/>
<form id="ppSubmit" action="<%= formUrl %>" method="POST">
<input type="hidden" name="token" value="<%= token %>">
</form>
</BODY>

The accept page shows the form like the following sample section:
Order Summary
Description{{orderDescription}}Invoice Number{{orderInvoiceNumber}}PO Number{{poNumber}}Shipping${{shippingAmount}}

synconnv1
Contributor
5 REPLIES 5

Hi @synconnv1,

 

In what could be good or bad news for you, someone else is working through the same things:

 

https://community.developer.authorize.net/t5/Integration-and-Testing/Accept-Hosted-Form-problems/m-p...

 

I'm not yet able to duplicate anything on my end, but with luck I'll be able to use your info as well to figure out exactly what's going on.

Aaron
All Star

A couple of things to note right away:

 

1. SSL shouldn't be an issue here. There's two connections being made: First from your server to ours for the token request. In that request, your server is acting as the HTTP client. If your server couldn't negotiate a secure connection there, you'd never get the request sent or the token back.

 

The second connection is between your browser and our server. Your browser obviously can handle a secure connection, and if it couldn't, you wouldn't even get the central html page.

 

2. Thanks for posting your page code. Can you possibly capture the actual token request (as sent to our API) that your code or the SDK is actually creating?

One more question: Any difference if you post the token and load the results not in an iframe?

Hi @synconnv1,

 

An update from the other thread: Make sure you double-check that form URL you're submitting to and make sure there's no trailing slash on the end. Adding a trailing slash to the end will indeed break the form in the way you're seeing.

Hey Aaron,

Thanks for that tip as that was the issue.  The payment form comes up now and I can proceed with our testing.

Thanks again,

Ed