Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-13-2008, 12:42 PM
dolphin678 dolphin678 is offline
 
Join Date: Aug 2008
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default PayPal button within post - Security Token Error

I have a problem - when a user is trying to put the PayPal button and payment code within a post, on preview the button links OK but once the post is up on the forum, people clicking it get the dreaded security token error. (Of course the HTML is enabled in the forum/section he is posting in)

From reading the previous questions on this I assume I need to edit one or more templates - where do I find them? All the ones I have found so far have the extra Security Token line of HTML code within them.

(I am assuming that in principle it is possible to have a linked PayPal button within a post)

I am using ver 3.7.3 PL1 so all the regular templates that used to have this problem ahould be up to date...I have no custom skins and no hacks installed.
Reply With Quote
  #2  
Old 10-13-2008, 05:45 PM
Hex_legend Hex_legend is offline
 
Join Date: May 2007
Posts: 750
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just a suggestion / thought, not sure how well it would work.

How about having a profile field in the User CP for the paypal button and editing postbit / postbit_legacy template to include the profile field ID if its filled in.

That will then put the paypal button on a users postbit that has the paypal field filled out.

Just an idea.
Reply With Quote
  #3  
Old 10-13-2008, 05:56 PM
SEOvB's Avatar
SEOvB SEOvB is offline
 
Join Date: May 2007
Location: Indianapolis
Posts: 2,451
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i dont see what the paypal code would have to do with security token mismatch error but maybe you'll have to add

Code:
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
some where in the paypal code then, as i think thats the only solution
Reply With Quote
  #4  
Old 10-13-2008, 06:01 PM
dolphin678 dolphin678 is offline
 
Join Date: Aug 2008
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Hex_legend View Post
Just a suggestion / thought, not sure how well it would work.

How about having a profile field in the User CP for the paypal button and editing postbit / postbit_legacy template to include the profile field ID if its filled in.

That will then put the paypal button on a users postbit that has the paypal field filled out.

Just an idea.
Thanks for that but this is a specific thread based need rather one for a user to use all the time...we have the donate button in our footer on each page and it works no problem - just when it's inside a post itself the security token error happens.

Quote:
Originally Posted by FRDS View Post
i dont see what the paypal code would have to do with security token mismatch error but maybe you'll have to add

Code:
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
some where in the paypal code then, as i think thats the only solution
Thanks - I'll try that. I'll report back success or failure.

--------------- Added [DATE]1223925323[/DATE] at [TIME]1223925323[/TIME] ---------------

Quote:
Originally Posted by FRDS View Post
i dont see what the paypal code would have to do with security token mismatch error but maybe you'll have to add

Code:
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
some where in the paypal code then, as i think thats the only solution
No unfortunately that didn't work. Same problem.

Quote:
Your submission could not be processed because a security token was invalid.

If this occurred unexpectedly, please inform the administrator and describe the action you performed before you received this error.
This is the source code - maybe someone can see an inbuilt reason why this would happen inside a post:

Quote:
<center>
<p></p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="Paypal">
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="business" value="XXXXXXX">
<input type="hidden" name="item_name" value="XXXX Donation Welcome!">
<input type="hidden" name="no_shipping" value="0">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="tax" value="0">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="bn" value="PP-DonationsBF">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
<p></p>
</center>
note the extra code you suggested inserting is there.
Reply With Quote
  #5  
Old 10-14-2008, 08:52 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A post is already a HTML form (at least when a staff member is viewing the thread). You can not embed a form inside another form (i think).
Reply With Quote
  #6  
Old 10-14-2008, 03:36 PM
dolphin678 dolphin678 is offline
 
Join Date: Aug 2008
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for taking the time to answer - I should have remembered that form nesting is a no-no with HTML. Ooops.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:24 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04829 seconds
  • Memory Usage 2,216KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete