View Full Version : PayPal button within post - Security Token Error
dolphin678
10-13-2008, 12:42 PM
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
<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
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.
i dont see what the paypal code would have to do with security token mismatch error but maybe you'll have to add
<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 1223925323 at 1223925323 ---------------
i dont see what the paypal code would have to do with security token mismatch error but maybe you'll have to add
<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.
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:
<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.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.