• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Security error occurred. Please press back, refresh the page, and try again.

mrchasez

Active member
#1
We use a (paid) plugin called HTML BBCODE.
It allows us to have html in threads.

So on our donate page, we have a "buy it now" button (it lets you choose what rank you want and put in your minecraft username)

Whenever someone picks there rank, puts in there name and pushes "buy it now"
(Donate page) http://kingscrafters.com/index.php?inline-mod/post/switch

It leads to a page that says
"Security error occurred. Please press back, refresh the page, and try again."
Link to page; http://kingscrafters.com/index.php?inline-mod/post/switch

Whats weird is, We have another buy it now button right below it, Only difference is it has different options, and it works.

Please help ;(
 

Jake Bunce

XenForo moderator
Staff member
#2
That is because the posts themselves are already within an HTML form (the inline moderation form). HTML forms cannot be nested. That's why your Paypal form is submitting the moderation action.

You have to use a hyperlink instead of a form. Here is BB code for a hyperlinked donation image. Put this in your post:


[URL=https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=yourpaypalemail@you.com&lc=US&item_name=donate%20to%20mysite&no_note=0&currency_code=USD][IMG]https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif[/IMG][/URL]


You just need to enter your email into the URL (yourpaypalemail@you.com).

The result:

 

mrchasez

Active member
#3
That is because the posts themselves are already within an HTML form (the inline moderation form). HTML forms cannot be nested. That's why your Paypal form is submitting the moderation action.

You have to use a hyperlink instead of a form. Here is BB code for a hyperlinked donation image. Put this in your post:


[URL=https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=yourpaypalemail@you.com&lc=US&item_name=donate%20to%20mysite&no_note=0&currency_code=USD][IMG]https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif[/IMG][/URL]


You just need to enter your email into the URL (yourpaypalemail@you.com).

The result:

Thats not possible.
There are customization requests that need to be made.
Heres an image:
http://awesomescreenshot.com/0768oowef
 

mrchasez

Active member
#5
Does your form submit to paypal? You can put any form fields into the URL as GET parameters.
Code:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="DGNHYMLSHJ2YJ">
<table>
<tr><td><input type="hidden" name="on0" value="Upgrades">Upgrades</td></tr><tr><td><select name="os0">
<option value="VIP-&gt;Builder">VIP-&gt;Builder$5.00 USD</option>
<option value="Builder-&gt;Baron">Builder-&gt;Baron$6.00 USD</option>
<option value="Baron-&gt;Knight">Baron-&gt;Knight$7.00 USD</option>
<option value="Knight-&gt;Hero">Knight-&gt;Hero$10.00 USD</option>
<option value="Hero-&gt;Supreme">Hero-&gt;Supreme$21.00 USD</option>
<option value="Supreme-&gt;Paladin">Supreme-&gt;Paladin$30.00 USD</option>
<option value="Paladin-&gt;Legend">Paladin-&gt;Legend$31.00 USD</option>
<option value="Legend-&gt;Emperor">Legend-&gt;Emperor$50.00 USD</option>
<option value="Emperor-&gt;Majesty">Emperor-&gt;Majesty$55.00 USD</option>
<option value="Majesty-&gt;King">Majesty-&gt;King$100.00 USD</option>
</select> </td></tr>
<tr><td><input type="hidden" name="on1" value="Minecraft Username:">Minecraft Username:</td></tr><tr><td><input type="text" name="os1" maxlength="200"></td></tr>
</table>
<input type="hidden" name="currency_code" value="USD">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
 

Jake Bunce

XenForo moderator
Staff member
#6
You can put those fields into the URL by using standard GET parameters:

&hosted_button_id=DGNHYMLSHJ2YJ&on0=Upgrades&os0=Knight-&gt;Hero&on1=Minecraft%20Username:

etc...

Alternatively an iframe would work. Instead of putting the form HTML or link code directly into the post, you insert the HTML for an iframe that contains the form. I assume Paypal gives iframe code.
 

mrchasez

Active member
#7
You can put those fields into the URL by using standard GET parameters:

&hosted_button_id=DGNHYMLSHJ2YJ&on0=Upgrades&os0=Knight-&gt;Hero&on1=Minecraft%20Username:

etc...

Alternatively an iframe would work. Instead of putting the form HTML or link code directly into the post, you insert the HTML for an iframe that contains the form. I assume Paypal gives iframe code.
Nope, just the code i posted ;'(

However, Why does the exact same type of thing right below it work fine?
The only difference is that it has different options
 

mrchasez

Active member
#8
You can put those fields into the URL by using standard GET parameters:

&hosted_button_id=DGNHYMLSHJ2YJ&on0=Upgrades&os0=Knight-&gt;Hero&on1=Minecraft%20Username:

etc...

Alternatively an iframe would work. Instead of putting the form HTML or link code directly into the post, you insert the HTML for an iframe that contains the form. I assume Paypal gives iframe code.
I made an iframe.. Its not working it shows up fine

<iframe src="http://kingscrafters.com/motion/donate/" name="paypal" scrolling="no" frameborder="no" align="left" height = "100%" width = "100%">
</iframe>

However, When i click buy now, Nothing happens..

It works on the real page, but not the iframe WTH!!

EDIT:
Now with the iframe, The second one dont work ;G
 

mrchasez

Active member
#9
You can put those fields into the URL by using standard GET parameters:

&hosted_button_id=DGNHYMLSHJ2YJ&on0=Upgrades&os0=Knight-&gt;Hero&on1=Minecraft%20Username:

etc...

Alternatively an iframe would work. Instead of putting the form HTML or link code directly into the post, you insert the HTML for an iframe that contains the form. I assume Paypal gives iframe code.
Uhm.. Sometimes the second one work, and sometimes it don't
I have even see teh first one work (not using iframe)
Whats going on?
 

Jake Bunce

XenForo moderator
Staff member
#10
Uhm.. Sometimes the second one work, and sometimes it don't
I have even see teh first one work (not using iframe)
Whats going on?
When using a HTML form? Inconsistent behavior is because the forms are nested. For that reason you should not use HTML forms inside of posts.
 

Jake Bunce

XenForo moderator
Staff member
#16
The target goes into the form tag:

http://www.w3schools.com/tags/att_form_target.asp

Here is the source code of your form with the target added in red:

Code:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="DGNHYMLSHJ2YJ">
<table>
<tr><td><input type="hidden" name="on0" value="Upgrades">Upgrades</td></tr><tr><td><select name="os0">
<option value="VIP-&gt;Builder">VIP-&gt;Builder$5.00 USD</option>
<option value="Builder-&gt;Baron">Builder-&gt;Baron$6.00 USD</option>
<option value="Baron-&gt;Knight">Baron-&gt;Knight$7.00 USD</option>
<option value="Knight-&gt;Hero">Knight-&gt;Hero$10.00 USD</option>
<option value="Hero-&gt;Supreme">Hero-&gt;Supreme$21.00 USD</option>
<option value="Supreme-&gt;Paladin">Supreme-&gt;Paladin$30.00 USD</option>
<option value="Paladin-&gt;Legend">Paladin-&gt;Legend$31.00 USD</option>
<option value="Legend-&gt;Emperor">Legend-&gt;Emperor$50.00 USD</option>
<option value="Emperor-&gt;Majesty">Emperor-&gt;Majesty$55.00 USD</option>
<option value="Majesty-&gt;King">Majesty-&gt;King$100.00 USD</option>
</select> </td></tr>
<tr><td><input type="hidden" name="on1" value="Minecraft Username:">Minecraft Username:</td></tr><tr><td><input type="text" name="os1" maxlength="200"></td></tr>
</table>
<input type="hidden" name="currency_code" value="USD">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
 

mrchasez

Active member
#17
The target goes into the form tag:

http://www.w3schools.com/tags/att_form_target.asp

Here is the source code of your form with the target added in red:

Code:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="DGNHYMLSHJ2YJ">
<table>
<tr><td><input type="hidden" name="on0" value="Upgrades">Upgrades</td></tr><tr><td><select name="os0">
<option value="VIP-&gt;Builder">VIP-&gt;Builder$5.00 USD</option>
<option value="Builder-&gt;Baron">Builder-&gt;Baron$6.00 USD</option>
<option value="Baron-&gt;Knight">Baron-&gt;Knight$7.00 USD</option>
<option value="Knight-&gt;Hero">Knight-&gt;Hero$10.00 USD</option>
<option value="Hero-&gt;Supreme">Hero-&gt;Supreme$21.00 USD</option>
<option value="Supreme-&gt;Paladin">Supreme-&gt;Paladin$30.00 USD</option>
<option value="Paladin-&gt;Legend">Paladin-&gt;Legend$31.00 USD</option>
<option value="Legend-&gt;Emperor">Legend-&gt;Emperor$50.00 USD</option>
<option value="Emperor-&gt;Majesty">Emperor-&gt;Majesty$55.00 USD</option>
<option value="Majesty-&gt;King">Majesty-&gt;King$100.00 USD</option>
</select> </td></tr>
<tr><td><input type="hidden" name="on1" value="Minecraft Username:">Minecraft Username:</td></tr><tr><td><input type="text" name="os1" maxlength="200"></td></tr>
</table>
<input type="hidden" name="currency_code" value="USD">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
So i upload this to another page, then iframe it?