Ruby on rails Paypal交易详细信息中未显示项目说明

Ruby on rails Paypal交易详细信息中未显示项目说明,ruby-on-rails,paypal,activemerchant,Ruby On Rails,Paypal,Activemerchant,嗨,我正在使用Activemerchant集成Paypal express结账 我能够成功进行交易,但在“交易详细信息”页面中看不到我的项目说明。它正确显示所有其他选项,但“选项”列为空 但是我在结帐页面中看到了项目的详细信息 这是我的密码。我可能做错了什么 def express_checkout listing = Listing.find(session[:listing_id].to_f) response = EXPRESS_GATEWAY.setup_purc

嗨,我正在使用Activemerchant集成Paypal express结账

我能够成功进行交易,但在“交易详细信息”页面中看不到我的项目说明。它正确显示所有其他选项,但“选项”列为空

但是我在结帐页面中看到了项目的详细信息

这是我的密码。我可能做错了什么

def express_checkout

    listing = Listing.find(session[:listing_id].to_f)

    response = EXPRESS_GATEWAY.setup_purchase(session[:amount].to_f,
                                              ip: request.remote_ip,
                                              return_url: "http://esignature.lvh.me:3000/en/transactions/status",
                                              cancel_return_url: "http://esignature.lvh.me:3000/",
                                              currency: "USD",
                                              allow_guest_checkout: true,
                                              items: [{name: listing.title, description: listing.description, quantity: session[:number_of_days], amount: listing.price_cents},
                                                      {name: "Service Charge" ,description: "Service Charge", amount: session[:service_charge]}
                                              ]
    )


    redirect_to EXPRESS_GATEWAY.redirect_url_for(response.token)

  end

  def status
    if (params[:token].present? && params[:PayerID].present?)
      token = params[:token]
      @response = EXPRESS_GATEWAY.details_for(token).params
      listing = Listing.find(session[:listing_id].to_f)

      express_purchase_options = {
          :ip => request.remote_ip,
          :token => params[:token],
          :payer_id => params[:PayerID],
          items: [{ name: listing.title, description: listing.description, quantity: session[:number_of_days], amount: listing.price_cents},
                  { name: "Service Charge", description: "Service Charge", amount: session[:service_charge ]}
          ]
      }

      response = EXPRESS_GATEWAY.purchase(session[:amount].to_f, express_purchase_options)


      if response.message == "Success"
        listing = Listing.find(session[:listing_id].to_f)
        BookingInfo.create!(listing_id: listing.id, start_on: session[:start_date].to_date, end_on: session[:end_date].to_date)
        render 'status'
      else
        render 'status_error'
      end
      reset_session_params
    else
      reset_session_params
      redirect_to homepage_without_locale_path
    end

  end 

在这里,我将在setup_purchase和purchase中设置项目详细信息。如果您有任何建议,我们将不胜感激。谢谢您

不幸的是,Express Checkout不像PayPal Standard那样使用选项栏。您需要在项目名称中包含任何类似选项,以便在交易明细中显示。@AndrewAngell非常感谢。我按照您建议的方式完成了操作。再次非常感谢。你让我开心。