Issue with incorrect text in Hebrew PayPal button - html

I have a PayPal button problem
When I press the button it leads me to the payment page
But the product name
No Hebrew
You can see the picture
I also added the code of the page
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>bookstore</title>
</head>
<body>
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post" accept-charset="utf-8">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="myemail#gmail.com">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="ספר בישול">
<input type="hidden" name="item_number" value="K8003">
<input type="hidden" name="amount" value="2.99">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="button_subtype" value="products">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="tax_rate" value="17.000">
<input type="hidden" name="shipping" value="1.00">
<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.paypalobjects.com/en_US/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.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
</body>
</html>
Thanks for anyone who can help

you can change this line:
<input type="hidden" name="lc" value="US">
to:
<input type="hidden" name="lc" value="he_IL">
to solved your problem you can add this line:
<input type="hidden" name="charset" value="utf-8">
but there is a problem with post back hebrew text from IPN.

Looks to me like this is more of a PayPal issue than an HTML/HTML5 issue.
I had a quick Google and found this fix:
Login to your PayPal account at http://www.paypal.com/ and proceed to the "My Account Overview -> Profile -> My Selling Tools" section.
Within "More Selling Tools" click the "PayPal Button Language Encoding" link.
Ensure that setting for "Your website’s language" is correct.
Click the "More Options" button, select the "UTF-8" option for "Encoding" and leave the "Yes" option selected for "Do you want to use
the same encoding for data sent from PayPal to you (e.g., IPN,
downloadable logs, emails)?".
Click "Save" to save your changes.

Related

Dynamic redirect url for PayPal Buy Now button

I have integrated a PayPal Buy Now button on my site as follows:
<form name="_xclick" action="https://www.paypal.com/uk/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="RECEIVER#RECEIVER.com">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="item_name" value="description here">
<input type="hidden" name="amount" value="100">
<input type="image" src="https://www.paypalobjects.com/en_US/NL/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>
Upon a succesfull purchase, I would like to redirect the user to a certain page (not known in advance - dynamic). How can this be achieved?
You will need to set "return" field in your form. Like this:
<input type="hidden" name="return" value="URLspecificToThisTransaction">
For more information please visit the documentation here

Access custom variable without using IPN

Is it possible to get the value of the custom variable from without using IPN?
I have a very simple project that doesn't need auto payment verification or anything like that, everything is done manually. I just need to like one input from the payment page along with that payment.
So is it possible to get the info from the custom variable in the payment confirmation email from paypal or the paypal payment receipt?
Check out button example:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" id="paypal-form" target="_top">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="paypal#email.com">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="Item Name">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="src" value="1">
<input type="hidden" name="a3" value="10.00">
<input type="hidden" name="p3" value="1">
<input type="hidden" name="t3" value="M">
<input type="hidden" name="custom" id="payment-custom" value="CUSTOM VALUE">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="bn" value="PP-SubscriptionsBF:btn_subscribeCC_LG.gif:NonHostedGuest">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
So I want to get that "CUSTOM VALUE" without using a ipn script, is it possible?
The GetTransactionDetails API will return it

How to keep a customer on the same page after they click "add to cart"

I'm attempting to create my first business webpage. I would like to add a message box where they can submit a personalized message. My question is, how can I code it so they can enter the message and submit it, but not be redirected to their shopping cart (paypal)?
This is the code as of now:
<!-- START SAMPLE PAYPAL FORM 5 -->
<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="website#email.com">
<input type="hidden" name="item_name" value="Custom Message">
<input type="hidden" name="custom" value="">
<input type="hidden" name="return" value="http://your-domain.com/thanks-payment.htm">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="quanity" value="1">
<input type="hidden" name="add" value="1">
<input type="hidden" name="amount" value="0.01">
<!-- START COMMENTS LINES -->
<input type="hidden" name="on0" value="Custom Message">Enter Item Comments:<br>
<TEXTAREA ROWS="4" COLS="17" name="os0">
</textarea><br>
<!-- END COMMENTS LINES -->
<input type="image" src="http://www.paypalobjects.com/en_US/i/btn/x-click-but22.gif" border="0" name="submit" alt="Submit Quote" vspace="4"><br>
</form>
<!-- END SAMPLE PAYPAL FORM 5 -->
A simple way,
Look here for basic jQuery UI Modal Window:
http://jqueryui.com/dialog/
And here to make the ajax call to the server with jQuery:
http://api.jquery.com/jquery.ajax/
See this Stackoverflow question for an example:
How Do I Create a multi submit form with no page reload?

Send note to seller with PayPal buy now button

I have generated a "buy now" button from the paypal sandbox website as follows :
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="abc#xyz.com">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="BuyItNow">
<input id="paypalamount" type="hidden" name="amount" value="{{totalprice}}">
<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="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHostedGuest">
<input type="image" src="img\paypal.png" border="0" name="submit" style="position:absolute;top:12px;left:10px">
</form>
When someone pays with the button, I want to send a default note to the seller. Is there a hidden field I can use?
Here's the code you are looking for. Check out variable list for all the acceptable variables.
You need to edit your security settings in paypal for the note itself to show up, then do
<input type="hidden" name="cn" value="Add special instructions to the seller:">
<input type="hidden" name="no_note" value="0">
A value of 1 will hide the box/prompt. It will appear on the checkout page. You can set up a buy now button to collect a text field entry, but you have to do that on set-up.
<input type="hidden" name="on1" value="Color" maxlength="200">Note
<input type="text" name="os1">
So if you have the no_note value correct (as you do in your code), you should look into your seller settings to make sure you are collecting instructions from customers.

Integrating PayPal buttons into site

I am trying to integrate PayPal buttons to a website. It was a really tough job making such a big number of buttons but I some how did it, but now I see that some of them work while some of them do not(and go to PayPal's homepage.) I am unable to determine what would have gone wrong which has caused this error.
The code was very big to fit in here so I am sharing to forms, the first one works while the second does not.
<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="xxxxx">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="Sumission Order 1- 3 articles ">
<input type="hidden" name="amount" value="xxx">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="button_subtype" value="products">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="tax_rate" value="0.000">
<input type="hidden" name="shipping" value="0.00">
<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.paypalobjects.com/en_US/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.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1"></p>
</form> </p>
<p>Sumission Order 2- <strong>5 articles</strong></p>
<p>
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<p>
<input type="hidden" name="cmd3" value="_cart">
<input type="hidden" name="business2" value="xxxxx">
<input type="hidden" name="lc2" value="US">
<input type="hidden" name="item_name2" value="Sumission Order 2- 5 articles">
<input type="hidden" name="amount2" value="xxxx">
<input type="hidden" name="currency_code2" value="USD">
<input type="hidden" name="button_subtype2" value="products">
<input type="hidden" name="no_note2" value="0">
<input type="hidden" name="tax_rate2" value="0.000">
<input type="hidden" name="shipping2" value="0.00">
<input type="hidden" name="add2" value="1">
<input type="hidden" name="bn2" value="PP-ShopCartBF:btn_cart_LG.gif:NonHostedGuest">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_cart_LG.gif" border="0" name="submit2" 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"></p>
</form>
Please help me out. Thanks
You have changed the names of the inputfields in the second form. These are the variables that are send to PayPal. This means you are now posting other variables; PayPal does not understand cmd2 for example, but it understands cmd. So rename the inputfields inside the second form to cmd, business, lc, item_name .. etc and it should work.
BTW It is not illegal to have duplicate names in html-tags, only duplicate ID's are not allowed.
Success!
Since your buttons are in different forms, you don't need to mark your input's name with number at the end. This violates PayPal's convention. Change cmd2 to cmd, etc.