【发布时间】:2020-03-16 02:03:08
【问题描述】:
我正在查看有关如何在 rails 中实施 PayPal 支付的指南,在此代码框中,材料来自 here
Statement.pendings.find_in_batches(batch_size: 500) do |payout_batch|
@payout = Payout.new({
:sender_batch_header => {
:sender_batch_id => SecureRandom.hex(10),
:email_subject => 'You have received a payment from CookiesHQ'
},
:items => payout_items(payout_batch)
});
end
begin
@payout_batch = @payout.create
# Logic to update any statements
rescue ResourceNotFound => err
logger.error @payout.error.inspect
end
我不知道 Statement 类是否还在使用,我也没有在 PayPal 官方文档中找到任何帮助。
【问题讨论】:
标签: ruby-on-rails paypal payment