【发布时间】:2013-07-07 18:01:11
【问题描述】:
我正在努力弄清楚如何让数字商品与我的自适应支付一起使用。我正在使用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.
【问题讨论】:
-
对单个接收器有效吗?还是默认:paymentType?您是否在 build_pay 调用时收到此错误?
标签: ruby-on-rails ruby-on-rails-3 paypal