Paypal buy it now button not doing anything - html

Im sure this is obvious but I can't seem to get the auto-generated paypal code to work with my site. I see no debug errors. The button just does nothing when it is clicked. Any help would be appreciated
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
<div class="background_subpages">
<div id="shirtsBG" class="RoundBorder">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="xxxx#gmail.com">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="Green">
<input type="hidden" name="button_subtype" value="services">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHostedGuest">
<table>
<tr><td><input type="hidden" name="on0" value="Sizes">Sizes</td></tr><tr><td><select name="os0">
<option value="Small">Small $11.99 USD</option>
<option value="Medium">Medium $11.99 USD</option>
<option value="Large">Large $11.99 USD</option>
</select> </td></tr>
</table>
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="option_select0" value="Small">
<input type="hidden" name="option_amount0" value="11.99">
<input type="hidden" name="option_select1" value="Medium">
<input type="hidden" name="option_amount1" value="11.99">
<input type="hidden" name="option_select2" value="Large">
<input type="hidden" name="option_amount2" value="11.99">
<input type="hidden" name="option_index" value="0">
<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>
</div>

It was because I was using a form within a form. This code in my page load did the trick
if (!IsPostBack)
{ }
else { }
Form.Action = "https://www.paypal.com/cgi-bin/webscr";
Form.Method = "post";

Related

How do I add extra "values" to a PayPal button

I have the following code, which works fine as is. It shows the price at checkout, but I also need it to include a size in the description. How do I add this extra value please?
EDIT: Also, would need to add different shipping costs depending on which size is ordered.
<form id="for-sale-form" target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post" style="margin: 0px;">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="paypal#your-web-domain.com">
<input type="hidden" name="item_name" value="<?php echo $artwork; ?>">
<input type="hidden" name="custom" value="">
<input type="hidden" name="return" value="http://your-web-domain.com/thanks-payment.htm">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="quanity" value="1">
<input type="hidden" name="add" value="1">
<select name="amount">
<option value="499.99">Large £499.99</option>
<option value="49.99">Medium £49.99</option>
<option value="4.99">Small £4.99</option>
</select><br>
<input name="bn" type="hidden" value="PP-BuyNowBF">
<input type="hidden" name="add" value="1">
<input type="hidden" name="currency_code" value="GBP">
<input type="image" name="submit" src="https://www.paypalobjects.com/en_US/i/btn/btn_cart_LG.gif" alt="Add to Cart">
<img alt="" width="1" height="1" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif">
</form>

Why does the donate button displays space above it?

I am using the following donate button on a website and it seems to take a lot of space. Please tell me why is this happening.
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="business" value="bla#bla.com">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="Naya Jeevan Foundation">
<input type="hidden" name="item_number" value="26-0551721">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest">
<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>
Thanks.
Try inputting this instead:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"><input type="hidden" name="cmd" value="_donations"><input type="hidden" name="business" value="bla#bla.com"><input type="hidden" name="lc" value="US"><input type="hidden" name="item_name" value="Naya Jeevan Foundation"><input type="hidden" name="item_number" value="26-0551721"><input type="hidden" name="no_note" value="0"><input type="hidden" name="currency_code" value="USD"><input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest"><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>
It is because of the numerous <br> tags
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_donations">
<br>
<input type="hidden" name="business" value="nayajeevan#njfk.org">
<br>
<input type="hidden" name="lc" value="US">
<br>
<input type="hidden" name="item_name" value="Naya Jeevan Foundation">
<br>
<input type="hidden" name="item_number" value="26-0551721">
<br>
<input type="hidden" name="no_note" value="0">
<br>
<input type="hidden" name="currency_code" value="USD">
<br>
<input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest">
<br>
<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!">
<br>
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
<br>
</form>
http://www.inspuratesystems.com/nayajeevan/?page_id=3377
I checked your url and find that u you have put 'br' tag after all input hiddens.
Remove that 'br' tags. Donate button will automatically appear on top.
When you place code in WordPress text editor, it takes a new line as a .
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="business" value="bla#bla.com">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="Naya Jeevan Foundation">
<input type="hidden" name="item_number" value="26-0551721">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest">
<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>
Becomes,
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<br>
<input type="hidden" name="cmd" value="_donations">
<br>
<input type="hidden" name="business" value="bla#bla.com">
<br>
<input type="hidden" name="lc" value="US">
<br>
<input type="hidden" name="item_name" value="Naya Jeevan Foundation">
<br>
<input type="hidden" name="item_number" value="26-0551721">
<br>
<input type="hidden" name="no_note" value="0">
<br>
<input type="hidden" name="currency_code" value="USD">
<br>
<input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest">
<br>
<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!">
<br>
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
<br>
</form>
To avoid this, remove all the new lines from the code.

Make paypal form buy now form wider

Im trying to make a buy it now form with paypal. I cannot figure out how to widen a text input field.
This is my code currently:
<h1>Simply fill in the info below</h1>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="277G8E79U9AX6">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="One week of Animal Photos">
<input type="hidden" name="item_number" value="1">
<input type="hidden" name="amount" value="7.95">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="button_subtype" value="services">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHosted">
<table>
<tr><td><input style="width: 300px;" type="hidden" name="on0" value="Your Email">Your Email</td></tr><tr><td><input type="text" name="os0" maxlength="200"></td></tr>
<tr><td><input style="width: 600px; height = 200px;" type="hidden" name="on1" value="Address of Recipient">Address of Recipient</td></tr><tr><td><input type="text" name="os1" maxlength="300"></td></tr>
</table>
<tr><td><input style="width: 600px; height = 200px;" type="hidden" name="on2" value="Message">Message</td></tr><tr><td><input type="text" name="os2" maxlength="300"></td></tr>
</table>
<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>
I tried adding a style = "width:300px" or simply width: "300px" but it doesn't reflect it.
You are styling the wrong inputs, look for the ones that doesn't have:
type="hidden"
And go for the ones that has type="text". Here is a version of it I made from your code:
<h1>Simply fill in the info below</h1>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="277G8E79U9AX6">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="One week of Animal Photos">
<input type="hidden" name="item_number" value="1">
<input type="hidden" name="amount" value="7.95">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="button_subtype" value="services">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHosted">
<table>
<tr><td><input style="width: 300px;" type="hidden" name="on0" value="Your Email">Your Email</td></tr><tr><td><input type="text" name="os0" maxlength="200" style="width: 500px;"></td></tr>
<tr><td><input style="width: 600px; height = 200px;" type="hidden" name="on1" value="Address of Recipient">Address of Recipient</td></tr><tr><td><input type="text" name="os1" maxlength="300" style="width: 500px;"></td></tr>
</table>
<tr><td><input style="width: 600px; height = 200px;" type="hidden" name="on2" value="Message">Message</td></tr><tr><td><input type="text" name="os2" maxlength="300" style="width: 500px;"></td></tr>
</table>
<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>
I hope it help, just in case, here is a pen: Pen
Use this and do style width in input.
<style>
input:focus::placeholder {
color: transparent;
margin-bottom: 0px;
}
</style>

PayPal Cart Shipping option not working

<form style="float:right" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" >
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="business" value="shivram#gmail.com">
<input type="hidden" name="item_name_1" value="Paper">
<input type="hidden" name="amount_1" value="20">
<input type="hidden" name="shipping" value="3.99">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="button_subtype" value="services">
<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="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHosted">
<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>
The shipping value is set to 3.99 .It does not add up to the invoice.
JS Fiddle http://jsfiddle.net/34ZfY/ click on the buy now button(the shipping rate does not show up)
Its because it has to be this way:
<input type="hidden" name="shipping_1" value="3.99">
So if you have more products then ..
<input type="hidden" name="shipping_2" value="4.99">
<input type="hidden" name="shipping_3" value="7.99">
And so on..

Paying for multiple items (at once) via paypal

I have a list of products that I'd like to add a "pay now" button to so that I can allow my customers to pay via Paypal.
I've gone through the documentation and can't find how to do this.
I can add multiple items, but this is not going to be handy as I already have the list of items to process.
I also need the checkout process to itemize the order, so a "buy now" with 1 price is no good either.
Any help appreciated guys, I tried (with no luck):
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="email#domain.com">
<input type="hidden" name="lc" value="GB">
<input type="hidden" name="item_name" value="test 1">
<input type="hidden" name="item_number" value="1">
<input type="hidden" name="item_name2" value="test 2">
<input type="hidden" name="item_number2" value="2">
<input type="hidden" name="item_name3" value="test 3">
<input type="hidden" name="item_number3" value="3">
<input type="hidden" name="amount" value="99.00">
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="button_subtype" value="products">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="add" value="1">
<input type="hidden" name="bn" value="PP-ShopCartBF:btn_cart_LG.gif:NonHostedGuest">
<input type="image" src="https://www.paypal.com/en_GB/i/btn/btn_cart_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_GB/i/scr/pixel.gif" width="1" height="1">
</form>
See this sample and make the changes to yours accordingly. Basically add underscore to item name before number and give unique name to amount also with underscore and number.
You have to give amount to each item based on your carts totals.
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="business" value="youremail#mail.com">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="item_name_1" value="beach ball">
<input type="hidden" name="amount_1" value="15">
<input type="hidden" name="item_name_2" value="towel">
<input type="hidden" name="amount_2" value="20">
<input type="image" src="http://www.paypal.com/en_US/i/btn/x-click-but01.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>
Specify Quantity(optional)
<input type="hidden" name="quantity_1" value="1">
for more reference about cart: Paypal Cart
it will not work in
<input type="hidden" name="cmd" value="_xclick-subscriptions">
please update me if you know multiple item payment option in recurrent payment method or in any ways i can add tax in this method.
PayPal Add to Cart button helps you to accept payment for multiple items. The button HTML will like the following.
<form target="_self" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="business" value="paypal#email.com">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="add" value="1">
<input type="hidden" name="item_name" value="PHP Book">
<input type="hidden" name="item_number" value="PB123">
<input type="hidden" name="amount" value="25">
<input type="hidden" name="currency_code" value="USD">
<input type='hidden' name='cancel_return' value='http://www.example.com/cancel.php'>
<input type='hidden' name='return' value='http://www.example.com/success.php'>
<input type="image" name="submit"
src="https://www.paypalobjects.com/webstatic/en_US/i/btn/png/btn_addtocart_120x26.png"
alt="Add to Cart">
<img alt="" width="1" height="1" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif">
</form>