The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
![]() |
Paypal form - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: Installation (https://forums.formtools.org/forumdisplay.php?fid=4) +--- Thread: Paypal form (/showthread.php?tid=649) |
Paypal form - filch - Apr 11th, 2010 I am creating a PayPal payment form and have been following the paypla form tutorial. I have been stumped by, what appears to be a very silly error. Every time I add the code to use the included library.php file, it stops the php on the page from rendering. See the attached image. I have the following code, which all looks OK. (note that there is more code after this snippet but it renders fine, as long as I do not have the formtools code in there. I also have to keep the formtools code in ints own php block ... otherwise, the rest of the code will not render either. PHP Code: <?php Really appreciate if you could have a look at this as I need to get this live by tomorrow AM. Dave RE: Paypal form - filch - Apr 12th, 2010 Ben, OK .. I have figured out what was wrong with the way I was adding the PHP Code: action="<?php echo $_SERVER["PHP_SELF"]?>" Now, the only thing I can think of is that there is something in the way that I am putting this form together that is interfering with the proper execution. There are three files involved in this page. There is file1.php, which basically houses some JavaScript functions and the form code (built dynamically). This file also calls file2.php, which has some php functions and also calls the html template I use to place the form into. So perhaps the separate require_once calls are stopping the api from functioning? Dave (Apr 11th, 2010, 2:29 PM)filch Wrote: I am creating a PayPal payment form and have been following the paypla form tutorial. I have been stumped by, what appears to be a very silly error. Every time I add the code to use the included library.php file, it stops the php on the page from rendering. See the attached image. RE: Paypal form - filch - Apr 12th, 2010 OK ... well I am beyond frustrated with trying to get this form working with PayPal. I have either become suddenly stupid (possible) or I am missing something obvious ... or it simply will not work. Because I am assuming that something in the way I have constructed this form, I have now decided on a different approach. I am pointing the first part of the form to a second page with a form on it and populating hidden fields in that form with the data from the first, thus allowing the user to confirm before submitting. I am trying to add the code from the PayPal tutorial on the site so it is on this second form that I am adding the links to the library and conf files. I have set this up as a multipage form in Formtools but perhaps I should be treating it as a single page form? At any rate, even though it is properly calling the library files and I can echo out the proper form id and mode ... the damn thing will not initialize. I really could use a second or third pair of eyes on this before I go MAD! Any help would be really appreciated. Dave RE: Paypal form - martin_undefined - Apr 15th, 2010 Hi Dave, Having recently worked through the Paypal stuff, I can sympathise! Just a thought, would it be easier (possible even?) to confirm before submitting to Paypal i.e. just use the second page? That might simplify the whole process for you. I'm only guessing, but I'd bet that the form is being thrown because of the first page. Martin (Apr 12th, 2010, 1:28 PM)filch Wrote: OK ... well I am beyond frustrated with trying to get this form working with PayPal. I have either become suddenly stupid (possible) or I am missing something obvious ... or it simply will not work. Because I am assuming that something in the way I have constructed this form, I have now decided on a different approach. I am pointing the first part of the form to a second page with a form on it and populating hidden fields in that form with the data from the first, thus allowing the user to confirm before submitting. I am trying to add the code from the PayPal tutorial on the site so it is on this second form that I am adding the links to the library and conf files. I have set this up as a multipage form in Formtools but perhaps I should be treating it as a single page form? At any rate, even though it is properly calling the library files and I can echo out the proper form id and mode ... the damn thing will not initialize. RE: Paypal form - filch - Apr 15th, 2010 Well, the problem with that is that if you send a confirmation to the client BEFORE the payment has been cleared ... and then ... it does not clear, you are hooped. You pretty well have to get the confirmation back after Paypal. So, you must depend on PP to get this info back to you. I have used IPN in the past but it does not seem to be working the way it is supposed to with formtools. I am now using the files from the Paypal tutorial, which includes a file to forward the submission on to PP and the IPN script to make sure everything went well. But this time ... it does not seem to work. This is the first time I have tried using formtools with PayPal. Dave (Apr 15th, 2010, 12:53 PM)martin_undefined Wrote: Hi Dave, |