vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   PayPal button within post - Security Token Error (https://vborg.vbsupport.ru/showthread.php?t=193513)

dolphin678 10-13-2008 12:42 PM

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.

Hex_legend 10-13-2008 05:45 PM

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.

SEOvB 10-13-2008 05:56 PM

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

dolphin678 10-13-2008 06:01 PM

Quote:

Originally Posted by Hex_legend (Post 1644296)
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 (Post 1644304)
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 (Post 1644304)
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.

Marco van Herwaarden 10-14-2008 08:52 AM

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).

dolphin678 10-14-2008 03:36 PM

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


All times are GMT. The time now is 02:29 PM.

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.01499 seconds
  • Memory Usage 1,737KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete