Ruby 贝宝协议审批没有显示价格

Ruby 贝宝协议审批没有显示价格,ruby,paypal,Ruby,Paypal,我通过RESTAPI使用PayPal,我对我得到的有点困惑 为了消耗它,我使用了 我正在制定这样一个计划: paypal_plan = PayPal::SDK::REST::DataTypes::Plan.new( name: 'foo', description: 'bar', type: 'FIXED', payment_definitions: [ { name: 'foo', type: 'REGULAR', frequenc

我通过RESTAPI使用PayPal,我对我得到的有点困惑

为了消耗它,我使用了

我正在制定这样一个计划:

paypal_plan = PayPal::SDK::REST::DataTypes::Plan.new(
  name: 'foo',
  description: 'bar',
  type: 'FIXED', 
  payment_definitions: [
    {
      name: 'foo',
      type: 'REGULAR',
      frequency_interval: '1',
      frequency: 'MONTH',
      cycles: '12', 
      amount: {
        currency: 'EUR',
        value: '15'
      }
    }
  ],
  merchant_preferences: {
    cancel_url: 'http://foo.com/cancel',
    return_url: 'http://foo.com/return'
  }
)
paypal_plan.create
# Active the plan on PayPal
patch = {
  path: '/',
  value: {
    state: 'ACTIVE'
  },
  op: 'replace'
}
paypal_plan.update(patch)
然后,我创建了一个与此计划相关的协议:

PayPal::SDK::REST::DataTypes::Agreement.new(
  name: 'foo', 
  description: 'bar', 
  start_date: (Time.now + 1.hour).utc.iso8601,
  payer: {
    payment_method: 'paypal'
  },
  plan: {
    id: PLAN_ID
  }
)
一切似乎都正常,但当我导航到批准url时,它会给我一个网页,没有任何关于我要订阅的计划的细节


我实际上只是在玩Express Checkout API中的计费协议,并注意到了同样的事情。似乎在处理账单协议时,PayPal结账页面变得简单,除了账单协议之外什么也没有显示。它让您自行显示一个漂亮的查看页面,其中包括站点或应用程序中的整个订单。

这没有多大意义,客户在确认其PayPal帐户和账单时没有太多信息。他真的必须相信给他开账单的网站。。。