function Redirect($sRelativeURL) { $sRedirectURL = RedirectURL($sRelativeURL); header("Location: " . $sRedirectURL); exit; }
accountVal = document.getElementById("Account").value; document.getElementById("Account").value = "*****" + accountVal.substr (accountVal.length-4,4); document.getElementById ("AccountVanco").value = gotPaymentRef; } else if (document.getElementById("EnableCreditCard").checked) { ccVal = document.getElementById("CreditCard").value; document.getElementById("CreditCard").value = "************" + ccVal.substr(ccVal.length-4,4) ; document.getElementById ("CreditCardVanco").value = gotPaymentRef; } } else { errorArr = errorList.split(','); errorStr = ""; for (var i = 0; i < errorArr.length; i++) errorStr += "Error " + errorArr[i] + ": " + VancoErrorString(Number(errorArr[i])) + "\n"; alert (errorStr); window.location = "<?php echo RedirectURL("AutoPaymentEditor.php") . "?AutID={$iAutID}&FamilyID={$aut_FamID}\$&linkBack={$linkBack}"; ?> "; } }, error: function (jqXHR, textStatus, errorThrown, nashuadata) { alert("ErrorThrown calling back to register payment method: " + errorThrown); alert("Error calling back to register payment method: " + textStatus); alert("Data returned calling back to register payment method: " + JSON.stringify(postbackdata)); } }); }, error: function (jqXHR, textStatus, errorThrown, vancodata) { alert("Error calling Vanco: " + errorThrown); } });
} } <?php if ($sElectronicTransactionProcessor == "Vanco") { ?> function CreatePaymentMethodsForChecked() { var checkboxes = document.getElementsByName("SelectForAction"); for(var i=0, n=checkboxes.length;i<n;i++) { if (checkboxes[i].checked) { var id = checkboxes[i].id.split("Select")[1]; var xmlhttp = new XMLHttpRequest(); xmlhttp.uniqueid = id; xmlhttp.open("GET","<?php echo RedirectURL("ConvertOnePaymentXML.php"); ?> ?autid="+id,true); xmlhttp.onreadystatechange=function() { if (this.readyState==4 && this.status==200) { var jsonresp=JSON.parse(this.response); var index; var Success = false; var ErrStr = ""; var AutID = 0; var PaymentMethod = 0; var PaymentType = ""; for (index = 0; index < jsonresp.length; ++index) { var oneResp = jsonresp[index];
<?php $VancoClientid = 'ESnnnnn'; // Replace with client ID for organization API calls will be made for $VancoUserid = 'EnnnnnWS'; // Replace with user ID provided by Vanco for API calls $VancoPassword = ''; // Replace with password provided by Vanco for API calls $VancoEnc_key = ''; // Replace with encryption key value provided by Vanco for API calls $VancoUrltoredirect = RedirectURL("CatchCreatePayment.php"); // Replace with the URL your customer's browser will be redirected to after making a TransparentRedirect API call $VancoTest = False; // Set to true when running in Vanco's test environment. Change to false when running in production