JavaScript
var hpciCCFrameHost = "https://cci.framehpci.com";
var hpciCCFrameFullUrl = "https://cci.framehpci.com/iSynSApp/showPxyPage!ccFrame.action?pgmode1=prod&locationName=newTestCheckout2&sid=528160 &reportCCType=Y&reportCCDigits=Y&enableEarlyToken=Y&formatCCDigits=Y&formatCCDigitsDelimiter=-&reportInit=Y&formatCCMaskMode=S6X6&formatCCMaskChar=*&fullParentHost=https://www.hostedpci.com&fullParentQStr=/iframe-demo-interactive/";
var hpciCCFrameName = "ccframe" + (iframeCounter + 1); // use the name of the frame containing the credit card
var hpciSiteErrorHandler = function(errorCode, errorMsg) {
// Place the following alert to properly display the error message
hpciStatusReset();
hpciPageReset();
}
var hpciSiteSuccessHandlerV7 = function(hpciMsgSrcFrameName, hpciMappedCCValue, hpciMappedCVVValue, hpciCCBINValue, hpciGtyTokenValue, hpciCCLast4Value, hpciReportedFormFieldsObj,
hpciGtyTokenAuthRespValue, hpciTokenRespEncrypt, threeDSValuesObj){
console.log("=================Start hpciSiteSuccessHandlerV7=================");
var data = [
{ name: "hpciCVVLengthValue", value: hpciCVVLengthValue },
{ name: "hpciCVVValidValue", value: hpciCVVValidValue },
{ name: "hpciMappedCCValue", value: hpciMappedCCValue },
{ name: "hpciMappedCVVValue", value: hpciMappedCVVValue },
{ name: "hpciCCBINValue", value: hpciCCBINValue },
{ name: "hpciGtyTokenValue", value: hpciGtyTokenValue },
{ name: "hpciCCLast4Value", value: hpciCCLast4Value },
{ name: "hpciGtyTokenAuthRespValue", value: hpciGtyTokenAuthRespValue },
{ name: "hpciTokenRespEncrypt", value: hpciTokenRespEncrypt }
];
console.table(data);
var ccNumInput = document.getElementById("cc-token"+ (iframeCounter + 1));
ccNumInput.value = hpciMappedCCValue;
var ccCVVInput = document.getElementById("cvv-token" + (iframeCounter + 1));
ccCVVInput.value = hpciMappedCVVValue;
var ccBINInput = document.getElementById("cc-bin" + (iframeCounter + 1));
ccBINInput.value = hpciCCBINValue;
iframeCounter++;
}
var hpciCCPreliminarySuccessHandlerV4 = function (hpciCCTypeValue, hpciCCBINValue, hpciCCValidValue, hpciCCLengthValue, hpciCCEnteredLengthValue,
hpciMappedCCValue, hpciMappedCVVValue, hpciGtyTokenValue, hpciCCLast4Value, hpciReportedFormFieldsObj, hpciGtyTokenAuthRespValue, hpciTokenRespEncrypt){
console.log("=================Start hpciCCPreliminarySuccessHandlerV4=================");
var data = [
{ name: "hpciMappedCCValue", value: hpciMappedCCValue },
{ name: "hpciMappedCVVValue", value: hpciMappedCVVValue },
{ name: "hpciCCBINValue", value: hpciCCBINValue },
{ name: "hpciGtyTokenValue", value: hpciGtyTokenValue },
{ name: "hpciCCLast4Value", value: hpciCCLast4Value },
{ name: "hpciGtyTokenAuthRespValue", value: hpciGtyTokenAuthRespValue },
{ name: "hpciTokenRespEncrypt", value: hpciTokenRespEncrypt }
];
console.table(data);
console.log("=================End hpciCCPreliminarySuccessHandlerV4=================");
}
var hpciCVVPreliminarySuccessHandlerV4 = function (hpciCVVLengthValue, hpciCVVValidValue,
hpciMappedCCValue, hpciMappedCVVValue, hpciCCBINValue, hpciGtyTokenValue, hpciCCLast4Value, hpciReportedFormFieldsObj, hpciGtyTokenAuthRespValue, hpciTokenRespEncrypt){
console.log("=================Start hpciCVVPreliminarySuccessHandlerV4=================");
var data = [
{ name: "hpciCVVLengthValue", value: hpciCVVLengthValue },
{ name: "hpciCVVValidValue", value: hpciCVVValidValue },
{ name: "hpciMappedCCValue", value: hpciMappedCCValue },
{ name: "hpciMappedCVVValue", value: hpciMappedCVVValue },
{ name: "hpciCCBINValue", value: hpciCCBINValue },
{ name: "hpciGtyTokenValue", value: hpciGtyTokenValue },
{ name: "hpciCCLast4Value", value: hpciCCLast4Value },
{ name: "hpciGtyTokenAuthRespValue", value: hpciGtyTokenAuthRespValue },
{ name: "hpciTokenRespEncrypt", value: hpciTokenRespEncrypt }
];
console.table(data);
var ccNumInput = document.getElementById("cc-token"+ (iframeCounter + 1));
ccNumInput.value = hpciMappedCCValue;
var ccCVVInput = document.getElementById("cvv-token" + (iframeCounter + 1));
ccCVVInput.value = hpciMappedCVVValue;
var ccBINInput = document.getElementById("cc-bin" + (iframeCounter + 1));
ccBINInput.value = hpciCCBINValue;
document.getElementById("error-label").style.display = "none";
iframeCounter++;
console.log("iframeCounter: " + iframeCounter);
}
else{
if(hpciCVVValidValue != "Y"){
document.getElementById("error-label").style.color = "red";
}
}
console.log("=================End hpciCVVPreliminarySuccessHandlerV4=================");
//alert("hello " + hpciMappedCCValue);
}
var hpciCCDigitsSuccessHandlerV2 = function (hpciCCTypeValue, hpciCCBINValue, hpciCCValidValue, hpciCCLengthValue, hpciCCEnteredLengthValue){
console.log("=================Start hpciCCDigitsSuccessHandlerV2=================");
console.log("=================End hpciCCDigitsSuccessHandlerV2=================");
}
var hpciCVVDigitsSuccessHandler = function(hpciCVVLengthValue, hpciCVVValidValue){
console.log("=================Start hpciCVVDigitsSuccessHandler 8989 =================");
console.log("=================End hpciCVVDigitsSuccessHandler=================");
}
var hpciInitCompleteSuccessHandler = function(){
console.log("=================Start hpciInitCompleteSuccessHandler=================");
console.log("=================End hpciInitCompleteSuccessHandler=================");
}