However I just cannot get their description field (PBX_CMD) data to get sent.
I tried to put this code in the payment processor section at the end of nopcart.js:
- Code: Select all
} else if ( PaymentProcessor == 'pb') {
//Process this for Paybox
strOutput += "<input type=hidden name=\"PBX_CMD\" value=\""+ strPP + "\">";
I also tried inserting similar code higher up in the checkoutcart section:
- Code: Select all
if ( PaymentProcessor != '' ) {
//Process description field for payment processors instead of hidden values.
//Format Description of product as:
// ID, Name, Qty X
strPP += fields[0] + ", " + fields[3];
if ( fields[5] != "" )
strPP += " - " + fields[5];
strPP += ", Qty. " + fields[1] + "\n";
} else {
strOutput += "<input type=hidden name=\"" + OutputItemId + strFooter + "\" value=\"" + fields[0] + "\">";
strOutput += "<input type=hidden name=\"" + OutputItemQuantity + strFooter + "\" value=\"" + fields[1] + "\">";
strOutput += "<input type=hidden name=\"" + OutputItemPrice + strFooter + "\" value=\"" + fields[2] + "\">";
strOutput += "<input type=hidden name=\"" + OutputItemName + strFooter + "\" value=\"" + fields[3] + "\">";
strOutput += "<input type=hidden name=\"" + OutputItemShipping + strFooter + "\" value=\"" + fields[4] + "\">";
strOutput += "<input type=hidden name=\"" + OutputItemAddtlInfo + strFooter + "\" value=\"" + fields[5] + "\">";
if (i == iNumberOrdered)
{
var finalcenttotal = centFormat((fTotal + fShipping + fTax));
strOutput += "<input type=hidden name=\"PBX_TOTAL\" value=\"" + finalcenttotal + "\">";
[color=red]strOutput += "<input type=hidden name=\"PBX_CMD\" value=\""+ strPP + "\">";[/color]
}
The whole system works if I put a hidden PBX_TOTAL input in my checkout.html form but here only if I put fixed data and not dynamic data generated by nopcart.js.
What am I doing wrong, or am I just dumb?
NC
