Passing product info to PayPal using Comment1 and Comment2 We need to pass information to PayPal using their Comment1 and Comment2 fields for accounting purposes.  We have several units using the cart for different fees and our finance team needs to be able to see and sort by the units in question on the PayPal Manager website.  The Comment1 and Comment2 fields seem to be the ideal place to pass this information to PayPal, but we can't figure out how to populate and pass these fields to them in the module code.

How would you recommend accomplishing this?
I've been researching this very issue myself. I spoke with PayPal and they told me the following.

First, they recommend you use the PayFlow Pro Module.

Second, to add $comment1 and $comment2 variables to your code you need to:

Create the form fields for COMMENT1 and COMMENT2 to add to the Return Array at lines 293 (of commerce_payflow.module):

‘comment1’ => $_POST[‘your_form_field_here’],
‘comment2’ => $_POST[‘your_form_field_here’],

Note: You may need to build the form fields in the function starting at line 336.

This is really a half-solution, because:

Now, I'm still trying to parse out exactly how to do this myself but I'm pretty sure it involves a custom module that uses a hook to alter a function in that module (possibly commerce_payflow_link_settings_form or commerce_payflow_link_default_settings).