Paypal Cart Discount - paypal

How do I add code to give a discount of $19.99 if my paypal cart total is over $ 99.00?
<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="hnsabc#mail.com">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="Apex Creatine .47lbs">
<input type="hidden" name="item_number" value="91037 97366 Promo">
<input type="hidden" name="amount" value="35.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">

Related

Why I get error 'Things don't appear to be working at the moment. Please try again later.' on submit form Paypal?

<form action="https://www.paypal.com/us/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="askerov.ibraqim#mail.ru">
<input type="hidden" name="item_name_1" value="Item Name">
<input type="hidden" name="item_number_1" value="213">
<input type="hidden" name="quantity_1" value="1">
<input type="hidden" name="amount_1" value="21.00">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="cancel_return" value="http://localhost/cart">
<input type="hidden" name="notify_url" value="http://localhost/cart">
<input type="hidden" name="return" value="http://localhost/cart">
<button class="checkout black-btn" id="checkout" name="submit" type="submit">Checkout</button>
Why I get error 'Things don't appear to be working at the moment. Please try again later.' on submit form Paypal?

Multiple item in PayPal HTML Form not working

I can add an item just fine with this form:
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="item_name" value="Item 1">
<input type="hidden" name="amount" value="20">
<input type="hidden" name="business" value="myemail#hidden.com">
<input type="submit" name="submit">
However, I'd like to add multiple items. I've been struggling and reading all over. This is not working:
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="item_name_1" value="Item 1">
<input type="hidden" name="amount_1" value="20">
<input type="hidden" name="item_name_2" value="Item 2">
<input type="hidden" name="amount_2" value="25">
<input type="hidden" name="business" value="myemail#hidden.com">
<input type="submit" name="submit">
Source: https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/
Finally found the problem. It's not mentionned anywhere but you need this following line;
<input type="hidden" name="upload" value="1">
Hours wasted. T.T

Paypal Payments Standard Multi-Product Carts Failing - BADINPUTERROR

Having a very hard to explain issue. I have a custom cart implementation. Some of my cart forms go through fine, but some give back a bad input error with not much additional explanation.
For example, this form submits fine and the payment gateway appears:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="charset" value="utf-8">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="business" value="m-app#thezyx.com">
<input type="hidden" name="item_name_1" value="Power Long Sleeve L-Black">
<input type="hidden" name="item_number_1" value="06034">
<input type="hidden" name="amount_1" value="45.00">
<input type="hidden" name="shipping_1" value="4">
<input type="hidden" name="quantity_1" value="1">
<input type="hidden" name="item_name_2" value="Classic B1100 Beanie">
<input type="hidden" name="item_number_2" value="39856">
<input type="hidden" name="amount_2" value="40.00">
<input type="hidden" name="shipping_2" value="0">
<input type="hidden" name="quantity_2" value="1">
<input type="hidden" name="custom" value="custom_string">
<input type="hidden" name="tax_cart" value="0">
<input type="hidden" name="notify_url" value="http://mynotificationurl.com">
<input type="hidden" name="rm" value="1">
<input type="hidden" name="cbt" value="Back to Store">
<input type="hidden" name="bn" value="MY_ShoppingCart_WPS_US">
<input type="hidden" name="return" value="http://www.example.com">
<input type="hidden" name="cancel_return" value="http://www.example.com">
</form>
However this form, generated by the same script, continues to fail:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="charset" value="utf-8">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="business" value="m-app#thezyx.com">
<input type="hidden" name="item_name_1" value="Power Long Sleeve L-Black">
<input type="hidden" name="item_number_1" value="06034">
<input type="hidden" name="amount_1" value="45.00">
<input type="hidden" name="shipping_1" value="4">
<input type="hidden" name="quantity_1" value="1">
<input type="hidden" name="item_name_2" value="Classic B1100 Beanie">
<input type="hidden" name="item_number_2" value="39856">
<input type="hidden" name="amount_2" value="40.00">
<input type="hidden" name="shipping_2" value="0">
<input type="hidden" name="quantity_2" value="1">
<input type="hidden" name="item_name_3" value="EXS R1 Poster">
<input type="hidden" name="item_number_3" value="80069">
<input type="hidden" name="amount_3" value="25.00">
<input type="hidden" name="shipping_3" value="0">
<input type="hidden" name="quantity_3" value="1">
<input type="hidden" name="custom" value="custom_string">
<input type="hidden" name="tax_cart" value="0">
<input type="hidden" name="notify_url" value="https://mynotificationurl.com">
<input type="hidden" name="rm" value="1">
<input type="hidden" name="cbt" value="Back to Store">
<input type="hidden" name="bn" value="MY_ShoppingCart_WPS_US">
<input type="hidden" name="return" value="http://www.example.com">
<input type="hidden" name="cancel_return" value="http://www.example.com">
</form>`
These forms are identical with exception to the third product in the list. The first form works and the second does not. I see no issues with any of the input data.
Also important to note that I ONLY get this error with more than 1 item in the cart, and it has nothing to do with individual products. When the third product in the second form is the only item in the cart, it submits fine. All of the data is the same. Am I crazy or is this a Paypal bug, or are they doing maintenance?
Here is the url Paypal redirects to when it fails:
https://www.paypal.com/webapps/shoppingcart/error?flowlogging_id=4936eeb7c68aa&code=BAD_INPUT_ERROR&mfid=1493965871301_4936eeb7c68aa
Thank you in advance for any help!!
Got a response back from Paypal today. It seems that in recent updates to their platform, they set a character limit on the custom field to 256.
My custom fields would fill up with more data the more items that were added to the cart, so that's why the error was only on multi-item carts. There seems to be not a lot of documentation on this.
Here was another question I found useful: Paypal html button custom field limit

Subscription auto canceled after payment paypal

this is my code (form subscription):
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="enrique.sevilla.11#gmail.com ">
<input type="hidden" name="custom" value="<? echo $user; ?>">
<input type="hidden" name="lc" value="ES">
<input type="hidden" name="item_name" value="Pago mensual Monetiza.me">
<input type="hidden" name="item_number" value="1">
<input type="hidden" name="amount" value="39">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="button_subtype" value="Servicios">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="return" value="<?php echo $urlPredeterminada; ?>pago/ok">
<input type="hidden" name="cancel_return" value="<?php echo $urlPredeterminada; ?>pago/ko">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="image_url" value="http://www.monetiza.me/images/logo-monetiza.png">
<input type="hidden" name="notify_url" value="<?php echo $urlPredeterminada; ?>ipn.php">
<input type="hidden" name="suscripcion" value="si">
<input type="hidden" name="a3" value="39">
<input type="hidden" name="p3" value="1">
<input type="hidden" name="t3" value="M">
This form records the payment and subscription, but after a few minutes the subscription is canceled and get an email confirming that has been canceled. How do I prevent self unsubscribe?
Sorry for my English, i am a peruvian developer :(
You need to include src=1 to indicate that the payments will recur on a monthly basis:
<input type="hidden" name="src" value="1">

return URL for non-paypal user

will a person that pays with their credit card (not associated with a PayPal account) go to the return URL below...if not where do they go?
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="something">
<input type="hidden" name="lc" value="US" />
<input type="hidden" name="upload" value="1" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="invoice" value="900000000">
<input type="hidden" name="item_name_1" value="mem" />
<input type="hidden" name="item_number_1" value="1">
<input type="hidden" name="amount_1" value="0">
<input type="hidden" name="item_name_2" value="CP" />
<input type="hidden" name="item_number_2" value="2">
<input type="hidden" name="amount_2" value="10"/>
<input type="hidden" name="item_name_3" value="AD" />
<input type="hidden" name="item_number_3" value="3">
<input type="hidden" name="amount_3" value="0">
<input type="hidden" name="return" value="https://www.something.com/ppd.aspx?TransID=<%=request.querystring("IDUNNO")%>
<input type="hidden" name="cancel_return" value="https://www.something.com/ppc.aspx">
<input type="hidden" name="modify" value="0">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="undefined_quantity" value="1">
<input type="image" src="images/btn_paynow.gif" border="0" name="submit" alt="use PayPal!">
</form>