The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/showthread.php 26 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/showthread.php 26 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/showthread.php 26 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 909 errorHandler->error
/showthread.php 26 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/showthread.php 26 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/showthread.php 26 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/showthread.php 137 forum_permissions
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1380 fetch_forum_permissions
/inc/functions.php 2909 forum_permissions
/showthread.php 621 build_forum_jump
Warning [2] Undefined array key "mybb" - Line: 1952 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1952 errorHandler->error
/inc/functions_indicators.php 41 my_set_array_cookie
/showthread.php 629 mark_thread_read
Warning [2] Undefined property: MyLanguage::$ratings_update_error - Line: 5 - File: showthread.php(732) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/showthread.php(732) : eval()'d code 5 errorHandler->error
/showthread.php 732 eval
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions_user.php 844 is_member
/inc/functions_post.php 406 purgespammer_show
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(474) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php(474) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 474 eval
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 660 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 660 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showimages" - Line: 741 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 741 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 746 - File: inc/functions_post.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions_post.php 746 errorHandler->error
/showthread.php 1070 build_postbit
Warning [2] Undefined array key "invisible" - Line: 1506 - File: showthread.php PHP 8.1.27 (Linux)
File Line Function
/showthread.php 1506 errorHandler->error
Warning [2] Undefined variable $threadnotesbox - Line: 30 - File: showthread.php(1533) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/showthread.php(1533) : eval()'d code 30 errorHandler->error
/showthread.php 1533 eval
Warning [2] Undefined variable $addremovesubscription - Line: 79 - File: showthread.php(1533) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/showthread.php(1533) : eval()'d code 79 errorHandler->error
/showthread.php 1533 eval



FORUMS


The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Paypal form
#1
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

//$curr_folder = dirname(__FILE__);
require_once("../conference/includes/library.php");

$fields ft_api_init_form_page($pp["form_id"], $pp["mode"]);

if (
$pp["mode"] == "initialize")
{
  
$params = array(
    
"submit_button" => "submit",
    
"next_page" => "thanks.php",
    
"form_data" => $_POST,
        
"finalize" => true
  
);
}
else
{
  
$params = array(
    
"submit_button" => "submit",
    
"next_page" => "paypal_submit.php",
    
"form_data" => $_POST
  
);
}
ft_api_process_form($params);

?>

Really appreciate if you could have a look at this as I need to get this live by tomorrow AM.

Dave
Reply
#2
Ben,

OK .. I have figured out what was wrong with the way I was adding the
PHP Code:
action="<?php echo $_SERVER["PHP_SELF"]?>" 
I have also verified that the library item is being called and that the $$pp(array) is available in my form page. I have also verified that the initialize mode is being called but the form will not redirect to my thanks.php page when I click the PayPal button. I have also verified that the name of the Paypal button is "submit" and that the name has been properly added to the api code at the top of my page. However, when I click the PayPal button, all it does is output all the $_POST variables to the top of my page

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.

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

//$curr_folder = dirname(__FILE__);
require_once("../conference/includes/library.php");

$fields ft_api_init_form_page($pp["form_id"], $pp["mode"]);

if (
$pp["mode"] == "initialize")
{
  
$params = array(
    
"submit_button" => "submit",
    
"next_page" => "thanks.php",
    
"form_data" => $_POST,
        
"finalize" => true
  
);
}
else
{
  
$params = array(
    
"submit_button" => "submit",
    
"next_page" => "paypal_submit.php",
    
"form_data" => $_POST
  
);
}
ft_api_process_form($params);

?>

Really appreciate if you could have a look at this as I need to get this live by tomorrow AM.

Dave
Reply
#3
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
Reply
#4
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.

I really could use a second or third pair of eyes on this before I go MAD!

Any help would be really appreciated.

Dave
Reply
#5
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,

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.

I really could use a second or third pair of eyes on this before I go MAD!

Any help would be really appreciated.

Dave
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)