PayPal Pro – Sending a Custom Product Label and Description

PayPal Pro – Sending a Custom Product Label and Description

If you need to define a custom product name and description within PayPal using the PayPal Pro add-on, this snippet will allow you to do so:
12345678910111213141516add_filter( 'gform_paypalpro_query_1', 'add_additional_information', 10, 3 );function add_additional_information( $query_string, $form, $entry ) {     // break the query string into an array after removing the initial '&' character    parse_str( ltrim( $query_string, '&' ), $query );     // Set your custom values    $query['L_NAME0'] = 'Your custom product name here';    $query['L_DESC0'] = 'Your custom description here';     // put it all back together again    $query_string = '&' . http_build_query( $query );     // return the query string    return $query_string;}
In this snippet change gform_paypalpro_query_1 to the ID of your form.

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注