ruby-on-rails - 数字商品的 Paypal 自适应支付

标签 ruby-on-rails ruby-on-rails-3 paypal

我正在努力弄清楚如何让数字商品与我的自适应支付一起使用。我正在使用 Paypal ruby​​ gem 谁能给我一个代码示例,用于使用 2 个接收方和 Digital Goods 进行付款?

我已获准通过 paypal 进行小额支付。

# Build request object
        @pay = @api.build_pay({
          :actionType => "PAY",
          :cancelUrl => "http://localhost:3000/account", #sandbox
          :currencyCode => "USD",
          #:feesPayer => "SENDER",
          :ipnNotificationUrl => "http://596w.localtunnel.com/pay/#{purchased.id}", #sandbox
          :memo => "Test payment",
          :receiverList => {
            :receiver => [{
              :amount => price.round(2),
              :email => "an email", #sandbox
              :paymentType => "DIGITALGOODS",
              :primary => true
              },
              unless account.user.email == "an email"
              {
                :amount => mycut.round(2),
                :email => "anemail", #sandbox
                :paymentType => "DIGITALGOODS" 
                }
              end
                ] },
          :returnUrl => "http://localhost:3000/pay/complete/" #sandbox 
          })

我得到错误:

This feature (Digital Goods) is not supported.

最佳答案

据我所知,Paypal 的快速支付选项支持数字商品。如果您可以将集成替换为使用 activemerchant 并使用 PaypalDigitalGoodsGateway,那么您会帮自己一个忙。

关于ruby-on-rails - 数字商品的 Paypal 自适应支付,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17559934/

相关文章:

Paypal自适应支付(并行)550001错误

ruby-on-rails - Rails,DEVISE - 防止用户更改他们的电子邮件地址

ruby-on-rails - 每次生成脚手架时,Rails 脚手架 scss 都会重置

Paypal 沙箱 IPN 不发送请求

iphone - PayPal iOS MECL getInstance方法崩溃

javascript - JQuery 更改类并在选中复选框时显示 div

ruby-on-rails - Rails、Devise gem、使用路由或在 Controller 中进行身份验证?哪个最好?

ruby-on-rails - RSpec 和 protected 方法,current_user 的 Controller 规范

ruby-on-rails - Rails4 - 如何在 Rails 应用程序中将 image_tag 作为参数传递?

ruby-on-rails - 如何在 Rails 5 中编写两个内部连接