stevetbeck,
Thanks for the response and the link.
Unfortunately, the fix referenced in the link you provided doesn't work for the paypal_redirect function.
The reason is that the function assigns specific form->data to a new array, $checkout_values.
Since all of the form->data elements aren't mapped to paypal variables in this new array, adding a new form->data['invoice'] element doesn't have the desired effect.
What I ended up doing was editing paypal_redirect.php to include a new "invoice" element, which I assign the cf_id.
$checkout_values = array(
//constants
'cmd' => trim($params->get('cmd')),
'business' => trim($params->get('business')),
'no_shipping' => trim($params->get('no_shipping')),
'no_note' => trim($params->get('no_note')),
'return' => trim($params->get('return')),
'currency_code' => trim($params->get('currency_code')),
//variables
'item_name' => $form->data[$params->get('item_name')],
'amount' => $form->data[$params->get('amount')],
'first_name' => $form->data[$params->get('first_name')],
'last_name' => $form->data[$params->get('last_name')],
'address1' => $form->data[$params->get('address1')],
'address2' => $form->data[$params->get('address2')],
'city' => $form->data[$params->get('city')],
'state' => $form->data[$params->get('state')],
'zip' => $form->data[$params->get('zip')],
'country' => $form->data[$params->get('country')],
'night_phone_a' => $form->data[$params->get('night_phone_a')],
//add invoice field to the post - hack by TFW
'invoice' => $form->data['chronoform_data_cf_id']
);
My hack is the last element. Now it works like a charm.
Regards,
Todd