The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
Custom PayPal form, IPN Works but FT DB not populated - 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: Custom PayPal form, IPN Works but FT DB not populated (/showthread.php?tid=1144) |
Custom PayPal form, IPN Works but FT DB not populated - Scott - Mar 24th, 2011 Hi Ben, I've have a new install of Formtools (2.0.5) and a custom single page PayPal form as form_id 1. Configuration of the new form went well with no issues. All fields are represented in the Formtools back end. After a test submission in live mode I'm taken to PayPal's sandbox as expected. Accepting the payment takes me to the success.php page correctly with the correct details. Also, I get an email response when adding mail("myemail@mydomain.com", "Test of IPN", "message"); to the IPN.php file. Unfortunately, the FormTools database is not populated with the form content. Any advice on how to troubleshoot this would be greatly appreciated. By the way, last year you provided me with really helpful information on customizing the donations form for another project and this was immensely helpful. Thanks very much for that and for creating this awesome tool. Cheers, Scott RE: Custom PayPal form, IPN Works but FT DB not populated - Scott - Mar 24th, 2011 Okay so I created a basic form using the process.php method and that worked fine. FT is being populated there. I then added a vanilla donate form with only the changes to the library.php file for my site and PP sandbox. This submits to PayPal correctly and returns to the success.php page but does not populate the FT db! Any help is greatly appreciated. RE: Custom PayPal form, IPN Works but FT DB not populated - Ben - Mar 25th, 2011 Hi Scott, Thanks for the email about the spam. As mentioned, I'll revisit this this weekend and see if I can find another way to keep it under control with these forums. So... Paypal integration! It sounds like you have it mostly in hand, just that the submissions aren't being marked as "finalized" by the ipn.php script. If it's been integrated properly, the ipn.php script should be called by PayPal to send details of successful payments. In theory, that script should then mark the submission as finalized (i.e. to tell Form Tools to show it in the interface). Two things: 1. Check the database via phpmyadmin to locate the actual records. You *should* see a record in the ft_form_X table (where X is your form ID) that has "is_finalized" == "no" but has all the values from your form submission. Let's first confirm that that data is there. 2. How's your PHP? If I were debugging this myself, I'd add this line to the ipn.php script on your site: PHP Code: mail("youremail@site.com", "ipn.php is called!", "content"); Then put through another payment through the form. If the ipn.php script is called, you *should* receive an email. If it's not, we know that that's the reason. Let me know how it goes - Ben RE: Custom PayPal form, IPN Works but FT DB not populated - Scott - Mar 25th, 2011 Hi Ben, Thanks for your speedy response. Yes, I do see the records in phpmyadmin and in all cases "is_finalized" == "no". I did previously (mentioned above) add the mailer to my IPN file and successfully got responses. In addition the success.php file is correctly populated. Cheers, Scott RE: Custom PayPal form, IPN Works but FT DB not populated - Ben - Mar 25th, 2011 Hey Scott, Sorry! I'm at work, so I rather skimmed the issue. Mind emailing me your ipn.php script? ben.keen@gmail.com - just want to look at the exact code you have. - Ben RE: Custom PayPal form, IPN Works but FT DB not populated - Scott - Mar 27th, 2011 Hi Ben, I am most grateful for your work in identifying the issue in a timely fashion. The system is working perfectly after setting up a new PayPal developers account. I've now transferred it to the organization's true PayPal account and they are now receiving registrations to their event and are happy with the results. Thank you! I've setup their registration system as a volunteer and have requested that they make a donation to FormTools for the trouble you went through. I'll check back with them in a week and if they have not made a donation then I will make a donation myself. Your tool is awesome and I fully support your plan to provide a paid version. I look forward to 2.1 and, again, offer my help (documentation, beta-testing, whatever). You know how to contact me and perhaps a beer is in order! As to the issue, something funky was going on with my old PayPal dev account that allowed it to accept a payment but pass on an UNVERIFIED response to FormTools. Checking the database via phpmyadmin indicated the records were there but "is_finalized" was set to "no". Adding a mailer to the last else statement in ipn.php shed light on the situation. PHP Code: // oh-oh, something either went wrong, the payment didn't go through ... Hopefully this will relieve pressure on you and help others to troubleshoot their issues. Cheers, Scott |