Inserting HTML Form using CKeditor does not work - html

I'm having a big issue using Ckeditor..
I want that my customer can add a paypal donation button trough a personnalised page.
When my customer want to add a customized page they use ckeditor.
To add a paypal button, they would have to just copy / Paste the following code using the source mode:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="business" value="try#try.com">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="Try">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest">
<input type="image" src="https://www.paypalobjects.com/fr_XC/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - la solution de paiement en ligne la plus simple et la plus sécurisée !">
<img alt="" border="0" src="https://www.paypalobjects.com/fr_XC/i/scr/pixel.gif" width="1" height="1">
</form>
However when they save the, somehow the html is modifyed with this one:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
</form>
I dont know how to avoid this.
I think it's an option in CKeditor config which is replacing some html codes but i'm not sure.
Thanks a lot for your futur advices,
Anselme

What's happening here is you've for a form in the editor, with a form in the content. You cannot have nested forms in HTML. You may have to come up with some tokenized tag-replacement mechanism to get this to work.
I believe there is a form plug-in for ckeditor that may help.

check the "Text format" below the ckeditor it should be "Full HTML"

Related

I need to remove a donate image which works like button and lands a user to official paypal payment website

Paypal has an option to generate donate button if u go to this link generate donation button by entering data asked by paypal
the image used by paypal is ugly and becomes blur when zoomed so I decided to change the the image but when I tried changing the image to actual button using tags the link did not work. I also tried changing type=image to type=button still my problem was not resolved. this is how it looks enter image description here
the html code is
<div class="donate">
<form action="https://www.paypal.com/donate" method="post" target="_top">
<input type="hidden" name="cmd" value="_donations" />
<input type="hidden" name="business" value="prabcrist#gmail.com" />
<input type="hidden" name="item_name" value="Server cost and keeping site live" />
<input type="hidden" name="currency_code" value="USD" />
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" name="submit" title="safer way to apy online" alt="Donate with PayPal button" />
</form>
</div>
the html I used
<div class="donate">
<form action="https://www.paypal.com/donate" method="post" target="_top">
<input type="hidden" name="cmd" value="_donations" />
<input type="hidden" name="business" value="prabcrist#gmail.com" />
<input type="hidden" name="item_name" value="Server cost and keeping site live" />
<input type="hidden" name="currency_code" value="USD" />
<input type="button" value="submit" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" name="submit" title="safer way to apy online" alt="Donate with PayPal button" />
</form>
</div>
</li>
Remove the image 'src' attribute if you want it to be a regular, non-image button. However, it won't look very good unless your page has CSS styling.
Maybe find a different image you like better.

Setting "Note" field in PayPal Donation Form via PayPal Button

I'm trying to set the "write a note" field (which appears in the PayPal donation form) programmatically via a PayPal button. The field can be seen here.
According to the current documentation, it looks like I need to just assign a value to the item_name variable. I have the following HTML, but it doesn't seem to do the trick:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="business" value="xxx#xxxxx.com">
<input type="hidden" name="amount" value="10">
<input type="hidden" name="item_name" value="hellooo!!!">
<input alt="PayPal - The safer, easier way to pay online!" name="submit" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" type="image" />
<img src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" alt="" width="1" height="1" border="0" />
</form>
Note: this code previous worked on the older version of the Donation form. Could this be a breaking change?
With the newer version of the Website Payments Standard checkout flow the "note to seller" is no longer a supported feature.
A workaround for this would be to use an "option variable" to create a textbox in your checkout flow. An example of an option variable would be "os0" and "on0".
Here is an example on our website on how you would implement this: https://www.paypal.com/us/cgi-bin/webscr?cmd=_pdn_xclick_options_help_outside
Here is another link to HTML variable guide:
https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/
Please let me know if you have any more questions!

Is it possible to specify the PayPal fixed donation amount in the querystring parameters?

Let's suppose we have an <input> element where the user can enter a number (e.g. 500).
When clicking some button or so, I want the user to be redirected to the PayPal donation page where they can specify the ammount but to have the default value set to the number set in the input (500 in this case).
Does the PayPal url allows such an option (maybe via querystring parameters)?
Yes it is possible. You will need to create an open source Donation Button in order to have your donors add the donation amount from the form you create rather than on the PayPal Hosted page.
You need to add this to your donation button code
<input type="text" name="amount" size=10><br /><br />
Below is the complete Donation Button Sample code.
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_donations">
<!-- Update to Your PayPal Email or Merchant ID -->
<input type="hidden" name="business" value="youremail#email.com">
<input type="hidden" name="lc" value="US">
<!-- Update the Value to the Donation Name -->
<input type="hidden" name="item_name" value="Test Donations"><p>Please Enter an Amount</p>
<!-- The below will allow your customers to enter an amount and this gets passed to PayPal -->
<input type="text" name="amount" size=10><br /><br />
<!-- The rest is the normal PayPal Donation button Info -->
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="cn" value="Add special instructions to the seller:">
<input type="hidden" name="no_shipping" value="2">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHosted">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_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>
Creating Donation Buttons

How can I prevent users from modifying PayPal code?

I have a "Pay Now" button from Paypal on my website. However, anyone can easily modify the amount they have to pay.
Here's the code that PayPal generated:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="xxx">
<input type="hidden" name="lc" value="CA">
<input type="hidden" name="amount" value="**1000.00**">
<input type="hidden" name="currency_code" value="CAD">
<input type="hidden" name="button_subtype" value="services">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHostedGuest">
<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>
Anyone can change the "1000.00" to "100.00". Is there a way to prevent this or a better way to accept payments?
take a look at Securing Your Website Payments Standard Buttons it outlines some of things you can do to protect yourself from this. One of the things is to create buttons with their online tool, and save them. When a purchase is made, they compare it with the saved button and check to make sure they are the same.

How to make a .swf object link to paypal the same way as paypal buttons do?

Paypal buttons use forms, ie:
<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="xxxxxxxx">
<input type="image" src="img.jpg" border="0" name="submit" >
</form>
I'd like buyers to click on a .swf file (instead of an image) which brings them to paypal's checkout, what's the best way to accomplish this?
Thanks
check this tutorial, might help:
http://active.tutsplus.com/tutorials/tools-tips/quick-guide-creating-paypal-buttons-with-actionscript-30/