Paypal button shows empty shopping cart - html

Why does this give me an empty shopping cart ? A single item works just fine.
Any ideas anyone, if it helps (or doesnt) PayPal support could not help either.
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="xxxx.xxxx#xxxx.net">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="My Shopping Cart">
<input type="hidden" name="currency_code" value="GBP" />
<input type="hidden" name="display" value="1" />
<input type="hidden" name="upload" value="1" />
<input type="hidden" name="amount_1" value="12.00" />
<input type="hidden" name="amount_2" value="45.00" />
<input type="hidden" name="amount_3" value="6.00" />
<input type="hidden" name="amount_4" value="17.00" />
<input type="hidden" name="amount_5" value="98.00" />
<input type="hidden" name="item_name_1" value="ADCDE" />
<input type="hidden" name="item_name_2" value="DEFGH" />
<input type="hidden" name="item_name_3" value="KLMNO" />
<input type="hidden" name="item_name_4" value="PQRST" />
<input type="hidden" name="item_name_5" value="STUVW" />
<input type="hidden" name="image_url" value="http://xxxxxxx.co.uk/images/50x50.jpg" />
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynow_LG.gif:NonHostedGuest">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif" border="0" name="submit" alt="">
<input type="hidden" name="return" value="http://xxxxxxx.co.uk">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

You specified two conflicting actions (display and upload). Remove the display command and it should work fine.

Try adding a method to your first form tag as in action="https://PayPal.com/blBlabla " 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>

PayPal checkout html form not working

i have some difficulties with defining html form for PayPal checkout,
i always use the same code but this time something go wrong,
i'm trying to send the user for paypal page to pay the all cart at once and
i'm getting an error:
We cannot process this transaction because there is a problem with the PayPal email address supplied by the seller. Please contact the seller to resolve the problem. If this payment is for an eBay listing, you can contact the seller via the "Ask Seller a Question" link on the listing page. When you have the correct email address, payment can be made at www.paypal.com.
i checked the account setting and it seems to be ok, Account Type: Business Status: Verified, i also add the ipn address in the account and turn it to ON
this is my code:
<form method="post" action="https://www.paypal.com/cgi-bin/webscr" id="paypal" name="paypal">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="business" value="business#email.com‏">
<input type="hidden" name="currency_code" value="ILS">
<input type="hidden" name="rm" value="2" />
<input type="hidden" name="return" value="http://www.example.com/orderSubmited.php" />
<input type="hidden" name="notify_url" value="http://www.example.com/paid.php" />
<input type="hidden" name="cancel_return" value="http://www.example.com" />
<input type="hidden" name="shipping" value="0" />
<input type="hidden" name="charset" value="utf-8">
<input type="hidden" name="item_name" value="payment>
<input type="hidden" name="item_number" value="123456" />
<input type="hidden" name="amount" value="250" />
<input type="hidden" name="quantity" value="1" />
<input type="hidden" name="address1" value="Address" />
<input type="hidden" name="city" value="City" />
<input type="hidden" name="zip" value="Zip" />
<input type="hidden" name="email" value="customer#email.com" />
<input type="hidden" name="first_name" value="CustomerFirstName" />
<input type="hidden" name="last_name" value="CustomerLastName"/>
</form>

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..

imagezilla api Failed

I'm trying to create a page that uploads an image to imagezilla using their api, but having no luck. Below is the code i'm using, but without the apikey, username and password for obvious reasons
<html>
<body>
<form action="http://imagezilla.net/api.php" method="post">
<input type="file" name="file" accept="image/x-png, image/gif, image/jpeg" />
<input type="hidden" name="apikey" value="..." />
<input type="hidden" name="username" value="..." />
<input type="hidden" name="passwordmd5" value="..." />
<input type="hidden" name="testmode" value="1" />
<input type="submit" />
</form>
</body>
</html>
All I keep getting in return is no file uploaded, even if I take the testmode out it still does it.
The website is not very helpful http://imagezilla.net/api-docs.php
Any help would be Great. Jamie
Although I have no experience of working with Imagezilla, I suspect that you need to correctly set the enctype of your form:
<form action="http://imagezilla.net/api.php" method="post" enctype="multipart/form-data">
<input type="file" name="file" accept="image/x-png, image/gif, image/jpeg" />
<input type="hidden" name="apikey" value="..." />
<input type="hidden" name="username" value="..." />
<input type="hidden" name="passwordmd5" value="..." />
<input type="hidden" name="testmode" value="1" />
<input type="submit" />
</form>

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>