We are using the hosted form solution for integration, and at first I had good luck with the iframe communication when a transaction was submitted, the example javascript code supplied on the authorize.net github account worked well, allowing us to respond to a completed transaction with our own code and update our database. Now, we never see a finished transaction and I don't know why. Here is our code.
(function () {
window.CommunicationHandler = {};
window.CommunicationHandler.onReceiveCommunication = function (querystr) {
console.log('receive');
var params = parseQueryString(querystr.qstr);
console.log(params);
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 data = params['response'];
$.post('receive.php?donation_id=<?php print $donation_id; ?>', data, function(response) {
});
var ifrm = document.getElementById("add_payment");
}
};We never see the transactResponse action any more, only the resizeWindow action, and I have no idea why. Anyone have any idea how to troubleshoot this?
โ01-27-2021 02:54 PM
As a follow up, I set the showReceipt to false when generating my form token and that has solved the general problem, I now see the transactReponse come through, but it does absolutely nothing for declined transactions, anyone know why declined wouldn't trigger this action in the iframe communications?
โ01-27-2021 03:30 PM
Sorry one more, with showReceipt set to false the Submit button gets stuck on Processing... even though the transaction goes through, anyone know about that?
โ01-27-2021 03:32 PM
I'm seeing the same issue, showReceipt set to false, Submit button gets stuck on Processing, no transactResponse received in params action.
โ08-22-2023 08:46 AM