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

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!

Related

How to add more information to PayPal button?

I created a paypal subscription button, but I do not know how to add id number for every product.
The 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="PULBECSY5HQ2W">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_subscribeCC_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>
Any help with this is much appreciated.
This is a hosted button. You will not be able to add additional fields directly to the HTML for a hosted button. Instead, you'll need to make a non-hosted button by unchecking the box for Save at PayPal during the button creation procedure.
This will allow you to add as many standard variables as you want, but would not be as secure as a hosted button.
If you want full flexibility plus security you'll need to switch to using the APIs.

URL instead of Paypal Form ( Installment Plan)

I have a Paypal produced code for installment plan and i want to turn it to a signle url for direct linking.
Here's the 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="SOME VALUE HERE">
<input type="hidden" name="return" value="http://www.mysite.com/thanks.html"/>
<table>
<tr><td><input type="hidden" name="on0" value="plan"></td></tr>
<tr><td><input type="hidden" name="os0" value ="option_0"></td><td><strong>Beginner - £137.50 every month for 4 months</strong></td></tr>
<tr><td></td><td>Number of payments 4</td></tr><tr><td></td><td>Start payments At checkout</td></tr>
<tr><td></td><td>
<table>
<tr><th align="left">Due*</th><th align="right">Amount</th></tr>
<tr><td>At checkout</td><td align="right">£137.50 GBP</td></tr><tr><td>Every 1 month (x 3)</td><td align="right">£137.50 GBP</td></tr><tr><td COLSPAN="2" ALIGN="right">Total £550.00 GBP</td></tr></table></td></tr>
<tr><td colspan="3"><i>* We calculate payments from the date of checkout.</i></td></tr> </table>
<table><tr><td align=center><i>Sign up for</i></td></tr><tr><td><input type="image" src="https://www.paypalobjects.com/en_US/GB/i/btn/btn_installment_plan_LG.gif" border="0" name="submit" alt="PayPal – The safer, easier way to pay online."></td></tr></table>
<img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1">
</form>
I have ready the Paypal developer documentation but couldn't find anyhting useful.
Can you please help me out with this ?
Please note that this is for installment plan (recurring payments)
You can simply append them as GET parameters after https://www.paypal.com/cgi-bin/webscr.
For example, https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=SOME-VALUE-HERE&return=moredatahere&etc=etc
SOLVED !!
After several days and multiple emails and calls to Paypal here is the story.
We have a Pricing Table on our WordPress site that only allows for an email link to be inserted. Since we have installment payment option button and did not want to use the tacky old Paypal button.
Problem: The issue is that PP was not getting all of the parameters because it set as a link rather than HTML. Please make sure you encode your parameters appropriately to avoid issues with the URL string losing parameters due to unencoded characters.
SOLUTION: Basically you need to add the variables as GET parameters to your URL string. So the link would look something like this
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id= insert button value here&on0=&os0=option_0&currency_code=USD
Place your assigned button value ID in the section"insert button value here".
watch your spacing!!!!
I feel like I solved one the of greatest mysteries of man kind. Enjoy!

Inserting HTML Form using CKeditor does not work

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"

PayPal Button As Text Link

Can anyone please tell me how to change a PayPal buy button to a text link? Thanks. Here is the 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="XXX">
<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>
Did you try this?
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XXX
You need to replace XXX of course.
The HTML-Code would look like this:
Your Text
For example one with working button id:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7865
Paypal has a builder for doing this. Login to your paypal account. Click on 'Merchant Services'. Choose the button type you want (payment, subscription, etc). Run through the rest of the options. It will generate the button as a form but there is a tab at the top to have it generated as a link. The tab is titled "Email".
After you have created a button, there will be an email link. You can use this as an href="https://www.paypal.com/examplecode/ExampleButtonID".
Check out this Paypal Link Generator.
http://www.blogbyben.com/2009/04/paypal-link-generator-build-your-own-1.html
It does appear that PayPal basically forces you to use an image as the link because it allows them to encrypt some of the data that is sent. Check out "Protecting HTML Code for Payment Buttons" on page 90 of https://www.paypalobjects.com/webstatic/en_US/developer/docs/pdf/pp_websitepaymentsstandard_integrationguide.pdf
The code you need is:
Text goes here
Replace XXX with whatever your button code is and replace Text goes here with whatever text you wish to show.
The XXX is the hosted button ID, which is usually a 13 character value such as H6C28LJRV72J2.
One solution that has not been posted is for the donate link. Hopefully someone finds this helpful. In addition to what #1' OR 1 -- provided, you can use the below for a text link for donations:
https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=INFO#EMAIL.COM&lc=US&item_name=Donation+to+YOUR+BUSINESS+NAME&no_note=0&cn=&curency_code=USD&bn=PP-DonationsBF:btn_donateCC_LG.gif:NonHosted
You'll want to replace INFO#EMAIL.com and Donation+to+YOUR+BUSINESS+NAME with your own information, as well as possibly change currency code.
What about this:
<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="XXX">
<input type="submit" value="submit" 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>
This will give you a button with text.

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/