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":
break;
case "cancel":
break;
case "resizeWindow":
var w = parseInt(params["width"]);
var h = parseInt(params["height"]);
var ifrm = document.getElementById("add_payment");
ifrm.style.width = w.toString() + "px";
ifrm.style.height = h.toString() + "px";
break;
case "transactResponse":
var ifrm = document.getElementById("add_payment");
ifrm.style.display = 'none';
$("#ar").val(params["response"]);
$("#reg_form").submit();
break;
}
}
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.push(pair[0]);
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.
โ09-30-2019 10:11 AM
โ09-30-2019 10:40 AM
It's the bit of code: $("#reg_form").submit(); Just a form submission.
โ09-30-2019 11:00 AM
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:
โ10-04-2019 10:41 PM