URL instead of Paypal Form ( Installment Plan) - html

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!

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.

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!

Paypal: Make product options show after redirecting to Paypal, not on my site

This is my first time working with PayPal, so I appreciate your help and patience.
I am working with a WordPress site. I would like to customize a button with two different options. However, I don't want the dropdown options or PayPal "Buy Now" button to show on my website. I am wrapping the form in my own image (where I outline the two different options), so that takes care of hiding/customizing the submit button. Where I run into issues is with the dropdown options. Ideally, the dropdown would only appear and be selectable on PayPal's page after the user has been redirected to it.
<div class="swiper-slide" style="background-image:...buynow.jpg)"
href="#" onclick="document.getElementById('registerFrm').submit();">
<form id="registerFrm" action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="TG5...">
<table>
<tr><td><input type="hidden" name="on0" value="Pick A DAY">Pick A DAY</td></tr><tr><td><select name="os0">
<option value="1">Day 1 $10.00 USD</option>
<option value="2">Day 2 $10.00 USD</option>
</select> </td></tr>
</table>
<input type="hidden" name="currency_code" value="USD">
</form>
</div>
I am not sure if maybe I need to somehow delay submitting the form to PayPal, or even potentially split my two options up into two different images (which I'd really like to avoid) and submit the form based on which image/option the user clicks.
After a few hours of searching SO and the PayPal documentation I couldn't find anything that seemed like this, so I am probably using the wrong terminology. Any help or examples of something similar would be helpful.

What is <input type="hidden" > used for in HTML?

I want to know what <input type="hidden"> is doing in the following HTML.
<form method="post" enctype="multipart/form-data">
<table width="350" border="0" cellpadding="1" cellspacing="1" class="box">
<tr>
<td width="246">
<input type="hidden" name="MAX_FILE_SIZE" value="2000000">
<input name="userfile" type="file" id="userfile">
</td>
<td width="80"><input name="upload" type="submit" class="box" id="upload" value=" Upload "></td>
</tr>
</table>
</form>
it is specifying a form value that will including with the post, but not shown on the screen to the user, hence the hidden. In this case it is specifying the max file size that the form should allow to upload. It isn't very secure, since you can craft your own post to send.
Because it's just a bunch of data that's sent to the script, you just can guess it :)
My guessing is, that this field limits the size of the file you can upload - most likely in bytes, so it's around 2MB you can upload.
Please keep in mind, that the script, using this output does not need to handle this data. If it isn't handled in the script, it's ignored.
The file-size is may not only controlled by this hidden field ...
In general hidden input is added to send some additional info along with non-hidden data. It could be a session ID, encoded metadata, or whatever. Actually I don't see the reasons for adding MAX_FILE_SIZE cause this value could be set in php.ini file (in case of using PHP as a server-side platform).

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.