Integration with Paybox

Get help with nopcart's interaction with payment provider gateways like Authorize.net, Worldpay, etc.

Moderators: Koibito, Stefko, Randy

Integration with Paybox

Postby nickc » Fri Sep 30, 2005 8:04 am

I am trying to integrate Nopcart with French Paybox payment gateway. I resolved the problem of sending amounts in cents (eurocents) with a centformat function.
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
nickc
WebMaster
 
Posts: 9
Joined: Fri Sep 30, 2005 7:52 am
Location: south west france

Return to Help: Payment Gateways

Who is online

Users browsing this forum: Google [Bot] and 1 guest