Okay, here's the function I have. Bear in mind that this is being handled the way I'm storing records internally within Flash; you'll very likely have to loop through your cart differently.
Code:
function checkout() {
checkMC = new LoadVars();
checkMC.rand = random(99999);
checkMC.cmd = "_cart";
checkMC.upload = "1";
checkMC.business = "sendto@email.com";
checkMC.currency_code = "USD";
checkMC.amount = total.text.substr(1, total.text.length-1); //amount in decimal (eg 32.45)
for (var i = 0; i<cartRef.records.length; i++) {
var num = i+1;
checkMC["item_name_"+num] = cartRef.records[ i].part; // part name
checkMC["quantity_"+num] = cartRef.records[ i].quantity; // part quantity
checkMC["amount_"+num] = cartRef.records[ i].price; // part price
checkMC["on0_"+num] = "Unit price: $"+cartRef.records[ i].price; // optional field 1
checkMC["on1_"+num] = "Count: "+cartRef.records[ i].count; // optional field 2
}
checkMC.send("https://www.paypal.com/cgi-bin/webscr", "_blank", "POST");
}
Basically, item_name_X, quantity_X, and amount_X are the important things for each item. X
must start at 1 and increase sequentially.