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

标签 encoding paypal payment-gateway

我在一个网站上工作,该网站正在尝试将日文商品名称传递给 paypal 这个表格

<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>

但项目名称显示为: フォトグラフィー基礎コース 有办法解决这个问题吗?

最佳答案

查看表单方法的文档: 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>

关于encoding - www.paypal.com/jp/cgi-bin/webscr? item_name 编码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34634417/

相关文章:

javascript - react-native-bluetooth-escpos-printer 编码土耳其语字符问题

video - 创建视频时ffmpeg挂起

Paypal 订阅错误 : The link you have used to enter the PayPal system is invalid. 请检查链接并重试

paypal - PayPal 经典 API 是否仍然有效?

php - 学生项目的模拟付款

Python CSV 编码

c++ - 带有可选字段的 ASN.1 编码

php - Paypal 快速支付错误 SetExpressCheckout 失败 : Could not resolve host: api-3t(6)

paypal - 在不符合 PCI 的情况下保存信用卡

ios - 如何阻止 objc 代码转换为可选代码