This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 4
More descriptive Paypal description
Started 10 years ago by jhinkle | 6 posts |
-
We have a few different conferences going right now and the Paypal transactions are intermingled. Our financial person wanted a list of all the transactions to balance the checkbook, but the descriptions were pretty vague. Is there any way you can attach the form name to the Paypal transaction details?
Posted 10 years ago # -
You can edit the "includes/post-functions.php" file. Search around line 3851 for this code:
$paypal_params['item_name_'.$i] = $item_name; $paypal_params['amount_'.$i] = $amount; $paypal_params['quantity_'.$i] = $quantity;
Basically you only need to adjust the $item_name above.
Something like this:
if($form_id == 23){ $item_name .= "My Form Title"; } $paypal_params['item_name_'.$i] = $item_name; $paypal_params['amount_'.$i] = $amount; $paypal_params['quantity_'.$i] = $quantity;
That would add "My Form Title" at the end of the item name.
MachForm Founder
Posted 10 years ago # -
Perfect, I'll try this out.
Thanks for the quick response!
Posted 10 years ago # -
Is there a way to always add the form title to the item name? like this:
$item_name .= " - ".$form_name; $paypal_params['item_name_'.$i] = $item_name; $paypal_params['amount_'.$i] = $amount; $paypal_params['quantity_'.$i] = $quantity;
Posted 10 years ago # -
You can add the query to get the form name above that block of code. Something like this:
$query = "select form_name from ".MF_TABLE_PREFIX."forms where form_id = ?"; $params = array($form_id); $sth = mf_do_query($query,$params,$dbh); $row = mf_do_fetch_result($sth); $form_name = $row['form_name']; $item_name .= " - ".$form_name; $paypal_params['item_name_'.$i] = $item_name; $paypal_params['amount_'.$i] = $amount; $paypal_params['quantity_'.$i] = $quantity;
MachForm Founder
Posted 10 years ago # -
That worked out perfectly! Thanks a bunch yuniar!
Posted 10 years ago #
Reply
You must log in to post.