Nephets Naharnah
Nephets Naharnah

Reputation: 89

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?

Upvotes: 3

Views: 2126

Answers (2)

Preston PHX
Preston PHX

Reputation: 30377

Another alternative is to set the default encoding accepted by the PayPal account (which as of today is still not utf-8 until you set it that way).

Check "More Options" under https://www.paypal.com/cgi-bin/customerprofileweb?cmd=_profile-language-encoding

Upvotes: 0

Kristian Nelkert
Kristian Nelkert

Reputation: 61

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>

Upvotes: 6

Related Questions