I have a PayPal enabled registration form. Can I display a "receipt" on the thankyou page, in other words, the fields that they submitted after they return from PayPal?
Thread Rating:
List the fields submitted on the thankyou page when submitting through PayPal?
|
Feb 3rd, 2010, 7:13 PM
Sure! Here's how it would work.
First off, not everyone that pays via PayPal clicks the "Return to merchant", so this would only be relevant for those users that do. If memory serves, there's a setting with the PayPal integration script called "custom" that is used to pass the unique submission ID to PayPal. The neat thing about that variable is that PayPal is nice enough to pass it BACK. And that's all you need to locate and display the info that's been stored in Form Tools for that submission. What you can do is use the Form Tools API on your receipt page and use the ft_api_show_submission function to display the data. But this raises security concerns... any hacker worth his mettle can fool a POST request from a particular source, so if you were worried about security you'd need to perhaps check sessions prior to displaying the information to ensure that the person submitting the form was the same one at the receipt page. Ah, HTTP... Sorry for the rather high-level advice. Ideally, you'd have a programmer stashed away in a closet somewhere that could take this on... I won't fib, it is a little fiddly. - Ben
Feb 4th, 2010, 7:30 AM
Right now I'm pressed on time, so I'll deal with the hacking issue after... I got the ft_api_show_submission working somewhat. I got it to display a submission, but I had to input a submission number. What I'd like, is for it to pass the actual submission_id. What is the code to display that? Am I missing something in the docs?
I tried to follow the paypal demo example showing the submitted fields, but cant get the fields to show.
I also found this post: http://forums.formtools.org/showthread.p...how+fields And what I have now, is a thank you page with ALL the submissions separated by: - new page - At the top of the page, I have an error: "Notice: Undefined variable: submission_id in /home/ex/public_html/register/thankyou.php on line 110" and where I wanted my info to show, Still shows: {$ANSWER_Make} What am I doing wrong? I have the code in there: Quote:if (isset($_GET["submission_id"]) && is_numeric($_GET["submission_id"])) {
Feb 6th, 2010, 2:20 PM
Hi Gediweb,
I know I just emailed you, but I thought I'd make a comment to close this thread. I got it all set up on your server - it worked just described! The one thing you really need to know is that PayPal sends back the unique Form Tools submission ID in the $_POST["custom"] key. So we needed to extract that value to pass to the ft_api_show_submission() function. All the best! - Ben
Feb 8th, 2010, 6:25 AM
You're the best!
|
« Next Oldest | Next Newest »
|
Users browsing this thread: 2 Guest(s)