Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

www.paypal.com/jp/cgi-bin/webscr? item_name encoding

I am working on a site that is trying pass a japanese item name to paypal through this form

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
          <input name="cmd" value="_xclick" type="hidden">

          <input name="item_name" value="フォトグラフィー基礎コース" type="hidden">
          <input name="amount" value="59000" type="hidden">
          <input name="currency_code" value="JPY" type="hidden">
          <input type="hidden" name="item_number" value="PHP001">
          <input name="no_note" value="0" type="hidden">
          <input type="hidden" name="lc" value="ja_JP">
          <input name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHostedGuest" type="hidden">
          <input class="coursepayment" name="submit" value="今すぐ購入" alt="PayPal - The safer, easier way to pay online!" border="0" type="submit">
        </form>

But the Item name comes out reading: フォトグラフィー基礎コース Is there a way to fix this?

like image 904
Nephets Naharnah Avatar asked Nov 29 '25 03:11

Nephets Naharnah


1 Answers

See the documentation for the form method: https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/formbasics/#setting-the-character-set--charset

Setting the Character Set — charset

Use the charset HTML variable to specify the character set and character encoding for the billing information/log-in page on the PayPal website. In addition, this variable sets the same values for information that you send to PayPal in your HTML button code.

For example, the following INPUT tag sets the encoding to UTF-8:

<INPUT TYPE="hidden" name="charset" value="utf-8">

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
      <input name="cmd" value="_xclick" type="hidden">

      <input type="hidden" name="charset" value="utf-8">

      <input name="item_name" value="フォトグラフィー基礎コース" type="hidden">
      <input name="amount" value="59000" type="hidden">
      <input name="currency_code" value="JPY" type="hidden">
      <input type="hidden" name="item_number" value="PHP001">
      <input name="no_note" value="0" type="hidden">
      <input type="hidden" name="lc" value="ja_JP">
      <input name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHostedGuest" type="hidden">
      <input class="coursepayment" name="submit" value="今すぐ購入" alt="PayPal - The safer, easier way to pay online!" border="0" type="submit">
    </form>
like image 120
Kristian Nelkert Avatar answered Dec 02 '25 03:12

Kristian Nelkert



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!