【问题标题】:Ruby on Rails - PayPal doesn't recognize payment URL with different currency (EUR)Ruby on Rails - PayPal 无法识别不同货币 (EUR) 的付款 URL
【发布时间】:2017-01-04 03:25:14
【问题描述】:

我想建立一个使用欧元货币的 PayPal 支付 URL。

我在以下位置找到了欧元 (EUR) 的国家代码: https://developer.paypal.com/docs/classic/api/currency_codes/

我把它放到我的网址中:

  def paypal_url(return_path)
    values = {
        business: "paypal@page.info",
        cmd: "_xclick",
        upload: 1,
        return: "#{Rails.application.secrets.app_host}#{return_path}",
        invoice: id,
        amount: amount, 
        currency: 'EUR',
        item_name: verwendungszweck,
        item_number: id,
        quantity: '1',
        notify_url: "#{Rails.application.secrets.app_host}/hook"
    }
    "#{Rails.application.secrets.paypal_host}/cgi-bin/webscr?" + values.to_query
  end

重定向到:

https://www.sandbox.paypal.com/cgi-bin/webscr?
amount=42.0&
business=paypal%40page.info&
cmd=_xclick&
currency=EUR&
invoice=7&
item_name=kostendeckung&
item_number=7&
notify_url=http%3A%2F%2F78.232.186.71%2Fhook&quantity=1
  &return=http%3A%2F%2F78.232.186.71%2Fdonations.7&upload=1

但是当我启动它时,paypal 会向我显示美元货币的价格。

【问题讨论】:

    标签: php ruby-on-rails ruby paypal


    【解决方案1】:

    【讨论】:

    • 是的,我以前做过。我的货币是“欧元(标准)”,但付款显示为美元
    猜你喜欢
    • 2016-07-08
    • 1970-01-01
    • 2013-07-01
    • 2017-01-23
    • 2020-10-30
    • 2014-08-24
    • 1970-01-01
    • 2013-09-12
    • 2014-10-22
    相关资源
    最近更新 更多