Oct 30th, 2009, 10:19 PM
Hi Jaace,
Here we go. I haven't tested this, but it *should* work...!
First, upgrade your Form Tools core to the latest version 2.0.0-beta-20091030) and in your ipn.php file (I assume you're using the zipfile from the tutorial?) add in the following line, right after the ft_finalize_submission() line.
Then, in Form Tools, create new fields for the PayPal fields you want to save. This is done through the Edit Form -> Database tab. Make sure that you make the form field name and database column name the same as the POST value (e.g. "txn_id", "payer_email" etc.).
Then it should work...
The new ft_update_submission_info function should just ignore all values in the $_POST variable, if they're not a valid form field name. But if there ARE problems, try creating a separate hash containing the new values you want stored, and pass that as the third parameter instead. e.g.
Hope this helps! :-)
- Ben
Here we go. I haven't tested this, but it *should* work...!
First, upgrade your Form Tools core to the latest version 2.0.0-beta-20091030) and in your ipn.php file (I assume you're using the zipfile from the tutorial?) add in the following line, right after the ft_finalize_submission() line.
PHP Code:
ft_update_submission_info($pp["form_id"], $_POST["custom"], $_POST);
Then, in Form Tools, create new fields for the PayPal fields you want to save. This is done through the Edit Form -> Database tab. Make sure that you make the form field name and database column name the same as the POST value (e.g. "txn_id", "payer_email" etc.).
Then it should work...
The new ft_update_submission_info function should just ignore all values in the $_POST variable, if they're not a valid form field name. But if there ARE problems, try creating a separate hash containing the new values you want stored, and pass that as the third parameter instead. e.g.
PHP Code:
$params = array(
"txn_id" => $_POST["txn_id"],
"payer_email" => $_POST["payer_email"]
);
ft_update_submission_info($pp["form_id"], $_POST["custom"], $params);
Hope this helps! :-)
- Ben