Showing results for 
Search instead for 
Did you mean: 

iframe transactResponse intermittent issue

I use the iframe drop in UI thing and I'm having an issue where a small percentage of users are getting authorized, but I'm not successfully going to the next page to mark them as paid in my database.  MOST of the users are going through fine.  It's just a few every now and then, but it's a problem.  And I have no idea where the error is.  I contacted support and they said the transaction went through okay and send a reponse.  And I put in some code on my side to try to catch any javascript errors and email me the issue, but it has never triggered. 


Basically, it appears as if the transactReponse is never triggering on a random very small percentage of transactions.


Let me show you what I'm doing.


Here is my javascript on the page.  I won't bother putting in the comm code or the token request as those are just ye standard and the code is working... it's just these intermittent issues.


function receiveComm(querystr)
var params = parseQueryString(querystr);
switch (params["action"])
case "successfulSave":
case "cancel":
case "resizeWindow":
var w = parseInt(params["width"]);
var h = parseInt(params["height"]);
var ifrm = document.getElementById("add_payment"); = w.toString() + "px"; = h.toString() + "px";
case "transactResponse":
var ifrm = document.getElementById("add_payment"); = 'none';

function parseQueryString(str)
var vars = [];
var arr = str.toString().split('&');
var pair;
for (var i = 0; i < arr.length; i++) {
pair = arr[i].split('=');
vars[pair[0]] = unescape(pair[1]);
return vars;



It's very simple.  I'm simply including the response into a form variable and then submitting the form.  I use server side code to parse the response on the next page and deal with it.  It's just that some people are getting authorized, but it's never making it to the next page.  If it were an error on the next page, I would get an error email from my server side code.  I even just started sending some information on the successful call of the receiveComm function above... even if it weren't a transactresponse and I just don't seem to be getting a response at all for the transactions in question.  Like I said 95% of them seem to all be happy and work correctly, it's just that small percentage that at least APPEAR to not be properly triggering the receiveComm function.


I tried wrapping the javascript above in a try catch loop and sending myself information, but it never triggered so there does not appear to be any errors happening.  I can't replicate the issue myself.  But it's happening often enough that we have to do something about it.  I'm at my wits end.  It's aweful hard to troubleshoot with no errors and not even sure where the issue is.


Just to give some more information, my process is to just authorize the transaction and then once it sends back the receivecomm transactResponse, I go to the next page, capture the transaction, then set them as paid in my database.


Any help would be appreciated.  I can provide whatever other code or information is needed.  Also any suggestions on how I could find out where the error was would also be awesome.  Anything really.  I'm unsure what to do from here, but I have to get the problem fixed.


You have a receipt url in your API call? How does the user get to the next page? Is it through this JavaScript form submission?
All Star

It's the bit of code: $("#reg_form").submit();  Just a form submission.

I don't have the specific answers you are looking for, but I did notice that this appears to be the same issue reported in another forum post: