我正在使用 Stripe 进行付款。我想将资金转给其他人 Stripe 用户。我的帐户不在美国。
begin
Stripe::Charge.create(
:amount => amount_in_cents(amount),
:currency => DEFAULT_CURRENCY,
:customer => client.payment_token,
:description => session_or_purchase.payment_description
)
rescue Stripe::CardError, Stripe::InvalidRequestError, Stripe::APIConnectionError, Stripe::StripeError => e
body = e.json_body
err = body[:error]
return err
rescue => e
error = {type: 'Unknown', message: 'Some thing else happened ', param: ''}
end
有什么办法可以代表其他用户向我的客户收费吗?我必须在每笔交易中传递应用程序 API key ,并且所有付款都转到应用程序帐户,但我想向用户转移一笔金额并扣除一些金额:即向我的应用程序帐户支付应用程序费用。
最佳答案
Stripe 为您提供了一种使用 Stripe 连接来实现此目的的方法。检查this供引用。
关于ruby-on-rails - 代表用户进行 Stripe 付款,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28985594/