Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

paypal express checkout - questions marks in payment page

I just finished writing my php script for express checkout for my HEBREW website (database encoding is latin_swedish_ci, browser encoding windows-1255, files encoding in ANSI with notepad++).

When I pass data (written in hebrew) from the database to paypal, instead of text I see question marks. When I used utf8_encode on the text it showed gibberish.

no utf8_encode:

not utf8_encode

with utf8_encode:

with utf8_encode

Any ideas?

like image 944
Naxon Avatar asked Oct 06 '15 01:10

Naxon


2 Answers

The key is to set UTF-8 inside your account, by the quoted steps

  1. Login to your PayPal account
  2. Navigate to "My Account Overview -> Profile -> My Selling Tools" section. Within "More Selling Tools" click the "PayPal Button Language Encoding" link.
  3. Ensure that setting for "Your website’s language" is correct.
  4. 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)?".
  5. Click "Save" to save your changes.

Optionally, you may add LocaleCode = he_IL in your setExpressCheckout API payload, to change the checkout page language to Hebrew as well

like image 192
pp_pduan Avatar answered Sep 23 '22 09:09

pp_pduan


Can you try the following:

  • Set <meta charset="utf-8"> inside your html <head> of your webpage.
  • Set utf-8 inside your paypal account.

Log in to your PayPal Account click 'My selling preferences click on Update next to Language encoding on the next page choose Western European Languages and click on more Options Choose in both drop-down menues UTF-8 and click on save

like image 33
Vimalnath Avatar answered Sep 22 '22 09:09

Vimalnath