I have tried to follow the discussion and code at:
http://www.gravityhelp.com/forums/topic/sending-product-value-instead-of-label-to-paypal
and
http://www.gravityhelp.com/documentation/page/Gform_paypal_query
But, I can't seem to get the code straight in my functions.php to pass the value instead of the label.
http://gracenetworkintl.org/donation/
I tried the following code, but the form never goes to Paypal.
add_filter('gform_paypal_query', 'update_paypal_query', 6, 29);<br />
function update_paypal_query($query_string, $form, $entry){<br />
parse_str($query_string, $qs_param); //put PayPal querystring into an array<br />
if (is_array($qs_param)){<br />
$field = Donation::get_field($form, 6); //get form field, the 2nd parameter is the field id<br />
$value = Donation::get_lead_field_value($entry,$field); //get the value of the field<br />
//product fields are pipe-delimited, the value will be the first item in the string<br />
if (!empty($value)){<br />
$ary_values = explode("|",$value); //put the values into an array and grab out the first item [0]<br />
$qs_param["GNI Donation"] = $ary_values[0]; //replace the item name in the querystring with the value, the "1" is the field id<br />
$query_string = "&" . http_build_query($qs_param); //put array back into querystring form<br />
}<br />
}<br />
return $query_string;<br />
}