The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
![]() |
Passing transaction info back to thank you page after Paypal transaction - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: Passing transaction info back to thank you page after Paypal transaction (/showthread.php?tid=655) |
Passing transaction info back to thank you page after Paypal transaction - filch - Apr 14th, 2010 I am trying to get the transaction data available to my success/thankyou page but am not having luck. I have tried turning Pass thru on in the admin but do not get what I have turned on. I have tried the unique_key stuff but also get nothing. How can I get the PayPal transaction id and various other things like the amount and data and time etc and can the transaction id be saved to the database with the rest of the form submission data? I read somewhere in the tutorials that the database gets uploaded with some indication that the transaction was successful or paid but cannot find out where or how to do it. Dave RE: Passing transaction info back to thank you page after Paypal transaction - jkeisers - Apr 15th, 2010 The transaction data have to come form PayPal, because you don't know whether or not an order resulted in a transaction until you know that the customer has paid for the order. PayPal's PDT is something you could use for your Thank You page. The code below displays the transaction data on a page, and sends you an e-mail. PDT, however, does not always work. It depends on certain ccount settings, and with certain settings the mechanism is triggered by a customer clicking the 'Return to My Site' button, which doesn't always happen. PayPal's IPN is normally used to update the inventory and transactions database. It is often too slow to be used in real time. PHP Code: <?php RE: Passing transaction info back to thank you page after Paypal transaction - kduncan - May 22nd, 2010 I'm not a top level programmer but I was able to get back data on my thank you/success page by making the following modification to my success.php file. (it is included in the files you download for a paypal form) <?php $curr_folder = dirname(__FILE__); require_once("$curr_folder/includes/library.php"); require_once("../path to your/global/api/api.php"); //change this to point to your api.php file in the global folder. $fields = ft_api_init_form_page(); $submission_id = $fields["form_tools_submission_id"]; //pulls in the submission id. $submission_info = ft_get_submission_info(your form id, $submission_id); //replace this with the value of your form id. You can find this in formtools. //pull in your form fields $yourfieldname = $submission_info["yourfieldname"]; // use this construct to get all the field names you wish to display to the user. ft_api_clear_form_sessions(); ?> Hope this helps. Any improvements to the code is more than welcome. RE: Passing transaction info back to thank you page after Paypal transaction - kduncan - May 27th, 2010 Hello All, After some testing I revised the code to the following. <?php $curr_folder = dirname(__FILE__); require_once("$curr_folder/includes/library.php"); $fields = ft_api_init_form_page(); $firstname = $fields["firstname"]; // first name $transid = $fields["form_tools_submission_id"]; // userid $city = $fields["city"]; // city $state = $fields["state"]; // state $zip = $fields["zip"]; // zip $amount = $fields["amount"]; // amount ft_api_clear_form_sessions(); ?> (May 22nd, 2010, 11:00 PM)kduncan Wrote: I'm not a top level programmer but I was able to get back data on my thank you/success page by making the following modification to my success.php file. (it is included in the files you download for a paypal form) RE: Passing transaction info back to thank you page after Paypal transaction - martine4161 - Jun 1st, 2010 I think Paypal have facility of display everything about the transaction. And if you can't get that then you can make changes in coding that all the data of the transaction will be displayed on the site and only final amount goes to the paypal. That can helps you a lot. RE: Passing transaction info back to thank you page after Paypal transaction - Desy231 - Dec 4th, 2017 Hello. I am new to these issues, I will be happy with any information. RE: Passing transaction info back to thank you page after Paypal transaction - Tysonlleher - Sep 3rd, 2021 General discussion is about the passing transaction information ck to thanks you page after PayPal transaction. I am trying to get the best transaction at that is available o my success that is a essayontime thank you page that is not having the luck in nature. |