Paypal Form Checkout Group Items - paypal

when sending items via form to paypal.
For Example:
<input type="hidden" name="item_name_1" value="ball 1">
<input type="hidden" name="amount_1" value="15">
<input type="hidden" name="item_name_2" value="ball 2">
<input type="hidden" name="amount_2" value="20">
<input type="hidden" name="item_name_3" value="ball 3">
<input type="hidden" name="amount_3" value="11">
<input type="hidden" name="item_name_4" value="shirt 1">
<input type="hidden" name="amount_4" value="50">
<input type="hidden" name="item_name_5" value="shirt 2">
<input type="hidden" name="amount_5" value="80">
Is it on the resulting checkout page possible (with some hidden field) to group them visually?
thanks!

If there is two item is selected, it should be appear separately in PayPal checkout as I have listed below ;
Do you have trouble in selecting multiple item? For this sample, I've used Add To Cart Button for 2 different items.
Just a quick reminder that you can't use variable such item_name_n, amount_n ( n is any number ) without using the cart upload command.Have a look here.

Related

Paypal button failed to process some user payment

We integrated Paypal button to support our starting business. We received several user feedbacks about not being able to complete payment. They reported that they can see the payment page after clicking the Buy Now button. However they tried pay through Paypal account, pay with credit card and pay with Paypal credit. None of them work. However, no one in our team has faced such problem when checking out. So we really don't have an idea about what's going on. Here is an example Paypal button code we use:
<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="business#myticket.com">
<input type="hidden" name="env" value="www">
<input type="hidden" name="address_override" value="0">
<input type="hidden" name="item_name_1" value="演唱会">
<input type="hidden" name="amount_1" value="122">
<input type="hidden" name="discount_rate_1" value="10">
<input type="hidden" name="item_name_2" value="演唱会">
<input type="hidden" name="amount_2" value="122">
<input type="hidden" name="discount_rate_2" value="10">
<input type="hidden" name="shipping_1" value="$27.95">
<!-- Fill full name in the first_name field -->
<input type="hidden" name="first_name" value="Bruce Lee">
<input type="hidden" name="notify_url" value="https://www.myticket.com/payment/ipn">
<input type="hidden" name="address1" value="">
<input type="hidden" name="address2" value="">
<input type="hidden" name="city" value="">
<input type="hidden" name="state" value="">
<input type="hidden" name="zip" value="">
<input type="hidden" name="country" value="US">
<input type="hidden" name="email" value="">
<input type="hidden" name="custom" value="lmIvjDuZVRsCWFPDdfFsrKiNVrnAbWeTZSINiDuszZEGKjeXfhqxyqRrn">
<input type="hidden" name="paymentaction" value="authorization">
<input type="hidden" name="charset" value="utf-8">
<input type="hidden" name="return" value="https://www.myticket.com">
<input type="hidden" name="cancel_return" value="https://www.myticket.com">
<input type="image" name="submit" border="0" src="https://www.paypalobjects.com/webstatic/en_US/i/buttons/checkout-logo-large.png" alt="Check out with PayPal">
</form>
Is there any problem with this Paypal button? If not, what else could be causing the payment to fail?
Besides, is there a way we can get a message about these failures? Right now we are using IPN. However IPN doesn't seem to notify us about these payment failures.
BTW, myticket.com is a fake url in this post.
Well first, when using Website Payments Standard buttons, you don't get much back as far as the declines. Typically you are only going to get details of declines back when you are using API calls to process the payment. As for the button itself, it looks fine to me. Perhaps some of the issue is with the special characters for the item name which is leading to the failure. You could try creating 2 of the same buttons/items but without the special characters and see if those same buyers run into the issue with the second button that they did with the first one. You could also try using the "lc" variable in your button code to see if this helps. You can see the description of what the "lc" variable does here.

PayPal add to cart buttons - combined shipping

I want to set up my PayPal buttons (about 5 of them), to have combined shipping prices.
Eg first item is $10, then each additional item is $5 extra.
I know this can be done for 1 single product (eg if I buy 2 apples, shipping would be $15), but I would like it so that if I buy 1 apple and 1 lemon, shipping would be $15 (currently paypal is making this $20).
Can this be done?
Yes you can achieve this by adjusting the values for these three variables:
shipping ---> This will be added only one time for the very first item in the cart
shipping2 ---> This will be added each time additional item is added in the cart
handling_cart ---> This is common for all the items in the cart .
In your case the values for these variables will be :
shipping=5.00
shipping2=5.00
handling_cart=5.00
It should work with these settings . I have included the sample code for two buttons to demonstrate :
First button:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="paypal">
<input type="hidden" name="business" value="testing#testing123.com">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="add" value="1">
<input type="hidden" name="amount" value="2.00">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="item_name" value="Lemon">
<input type="hidden" name="item_number" value="Lemon123">
<input type="hidden" name="shipping" value="5.00">
<input type="hidden" name="shipping2" value="5.00">
<input type="hidden" name="handling_cart" value="5.00">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_cart_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
</form>
Second button:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="paypal">
<input type="hidden" name="business" value="testing#testing123.com">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="add" value="1">
<input type="hidden" name="amount" value="2.00">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="item_name" value="Apple">
<input type="hidden" name="item_number" value="Apple123">
<input type="hidden" name="shipping" value="5.00">
<input type="hidden" name="shipping2" value="5.00">
<input type="hidden" name="handling_cart" value="5.00">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_cart_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
</form>
Thanks Esham, we have worked out the solution.
I didnt realise there was a difference between protected buttons - I always generate paypal buttons from the paypal account.
The variables you mentioned dont work properly for protected buttons if adding to the html code, but what did work was to check the button for "advanced variables" under Step 3 of creating the button.
We added this:
shipping2=5
handling_cart=5
Other settings required include:
When editing a product button - Use specific postage amount ($5)
On the postage calculations page, ensure "Click here to allow transaction-based postage values" is checked

How to display only order total in paypal checkout page as like ebay do

have a weird problem.As I have a shopping cart on my website I decided to integrate this to paypal. Its working like charm
<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="seller#test.com">
<input type="hidden" name="item_name_1" value="Item Name 1">
<input type="hidden" name="amount_1" value="1.00">
<input type="hidden" name="shipping_1" value="1.75">
<input type="hidden" name="item_name_2" value="Item Name 2">
<input type="hidden" name="amount_2" value="2.00">
<input type="hidden" name="shipping_2" value="2.50">
<input type="submit" value="PayPal">
</form>
What happens was I decided to not to show item wise descriptions except order total in paypal cehckout page(just like ebay do).
So i change my code as follows
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="seller#test.com">
<input type="hidden" name="amount" value="5.40">
<input type="submit" value="PayPal">
</form>
But when i use this,on the checkout page it appears like this
Please help what I have done wrong? Thanks in Advance.
I dont't know how they do that but i know that, Owner of paypal is eBay Inc.
You can display your company logo by just putting one more hidden field
value="http://fedoraproject.org/w/uploads/e/e2/Fedora-infinity-logo-64-64.png">

How to use paypal for products belongs to several sellers in a cart from a one transaction?

Friends, I am developing a website for product sales.Products can be submitted by different sellers.So if a buyer add different products from different sellers for his cart,I need to do the paypal process in a single transaction.
I have no problem with if the items are belongs to one seller as below
<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="abc#abc.com">
<input type="hidden" name="item_name_1" value="Item Name 1">
<input type="hidden" name="amount_1" value="1.00">
<input type="hidden" name="shipping_1" value="1.75">
<input type="hidden" name="item_name_2" value="Item Name 2">
<input type="hidden" name="amount_2" value="2.00">
<input type="hidden" name="shipping_2" value="2.50">
<input type="submit" value="PayPal">
</form>
But if items are from different sellers,that makes me trouble. Do i need to loop all the items and submit each by each or Can you advise me to overcome this problem thanks.
try PayPal adaptive payments "parallel payments" APIs - https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_APIntro
You can download sample code/SDK from above same URL.

Is it possible make a PayPal 'Buy Now' button with an HTML form?

I have a Google Checkout 'Buy Now' button on my site. It's very simple, all I do is produce the order information in an HTML form thus:
<form action="https://checkout.google.com/cws/v2/Merchant/xxxxxxxxxx/checkoutForm" id="BB_BuyButtonForm" method="post" name="BB_BuyButtonForm">
<input name="item_name_1" type="hidden" value="Some Stuff">
<input name="item_description_1" type="hidden" value="Product">
<input name="item_quantity_1" type="hidden" value="1">
<input name="item_price_1" type="hidden" value="0.25">
<input name="item_currency_1" type="hidden" value="GBP">
<input name="item_name_2" type="hidden" value="Delivery">
<input name="item_description_2" type="hidden" value="standard">
<input name="item_quantity_2" type="hidden" value="1">
<input name="item_price_2" type="hidden" value="2.5">
<input name="item_currency_2" type="hidden" value="GBP">
<input name="_charset_" type="hidden" value="utf-8">
<input alt="" src="https://checkout.google.com/buttons/buy.gif?merchant_id=xxxxxxxxxx&w=117&h=48&style=white&variant=text&loc=en_US" type="image">
</form>
This form is generated by a bit of PHP, it's fairly trivial to put together. Is there a way of creating a PayPal button in the same way? Some customers have requested it, but I don't have time to delve into complex APIs, and static saved buttons are no good (the customer fills out a short order form, which then generates the button).
Is this what you´re looking for?
=> http://net.tutsplus.com/tutorials/html-css-techniques/creating-a-paypal-payment-form/
=> https://www.paypal.com/cgi-bin/webscr?cmd=_pdn_xclick_techview_outside