Pass custom variable to Paypal

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

Moderators: Koibito, Stefko, Randy

Pass custom variable to Paypal

Postby cmod » Fri Mar 10, 2006 9:54 am

Hello,
I would like to pass the Paypal variable "custom" from the shopping cart to Paypal. In nopcart.js in line 801 there are 6 paypal variables defined. (item_number, quantity, amount, item_name, shipping, on0). I would like to add the custom variable to this list.

I have tried to add the following line of code but it does not work:
strOutput += "<input type=hidden name=\"custom_" + strFooter + "\" value=\"" + fields[4] + "\">";

This is what is in the nopcart.js
if ( PaymentProcessor == 'pp' ) {
//Process hidden values for PayPal.
strOutput += "<input type=hidden name=\"item_number_"+ strFooter + "\" value=\"" + fields[0] + "\">";
strOutput += "<input type=hidden name=\"quantity_" + strFooter + "\" value=\"" + fields[1] + "\">";
strOutput += "<input type=hidden name=\"amount_" + strFooter + "\" value=\"" + fields[2] + "\">";
strOutput += "<input type=hidden name=\"item_name_" + strFooter + "\" value=\"" + fields[3] + "\">";
if (i == iNumberOrdered) {
strOutput += "<input type=hidden name=\"shipping_" + strFooter + "\" value=\"" + strShipping + "\">";
} else {
strOutput += "<input type=hidden name=\"shipping_" + strFooter + "\" value=\"0.00\">";
}
strOutput += "<input type=hidden name=\"on0_" + strFooter + "\" value=\"" + fields[5] + "\">";
}

Has anybody got an idea on what I need to do?
Many thanks
cmod
 
Posts: 4
Joined: Thu Mar 02, 2006 10:17 am

Return to Help: Payment Gateways

Who is online

Users browsing this forum: No registered users and 0 guests

cron